NPCD Messages

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
andyb4u
Posts: 114
Joined: Tue Aug 15, 2017 1:58 am

NPCD Messages

Post by andyb4u »

Hi,

I'm running XI 5.11.1 on Red Hat 9.

I'm seeing the following appear in /var/log/messages
npcd[1254218]: Use of uninitialized value $NAGIOS{"MULTI_PARENT"} in printf at /usr/local/nagios/libexec/process_perfdata.pl line 466, <PDFILE> line 3.
npcd[1254218]: Use of uninitialized value $NAGIOS{"MULTI_PARENT"} in substitution (s///) at /usr/local/nagios/libexec/process_perfdata.pl line 465, <PDFILE> line 4.
npcd[1254218]: Use of uninitialized value $NAGIOS{"MULTI_PARENT"} in printf at /usr/local/nagios/libexec/process_perfdata.pl line 466, <PDFILE> line 4.
npcd[1254218]: Use of uninitialized value $NAGIOS{"MULTI_PARENT"} in substitution (s///) at /usr/local/nagios/libexec/process_perfdata.pl line 465, <PDFILE> line 5.
npcd[1254218]: Use of uninitialized value $NAGIOS{"MULTI_PARENT"} in printf at /usr/local/nagios/libexec/process_perfdata.pl line 466, <PDFILE> line 5.
npcd[1254218]: Use of uninitialized value $NAGIOS{"MULTI_PARENT"} in substitution (s///) at /usr/local/nagios/libexec/process_perfdata.pl line 465, <PDFILE> line 6.
npcd[1254218]: Use of uninitialized value $NAGIOS{"MULTI_PARENT"} in printf at /usr/local/nagios/libexec/process_perfdata.pl line 466, <PDFILE> line 6.
npcd[1254217]: Use of uninitialized value $string in substitution (s///) at /usr/local/nagios/libexec/process_perfdata.pl line 699, <PDFILE> line 1.
npcd[1254217]: Use of uninitialized value $NAGIOS{"MULTI_PARENT"} in substitution (s///) at /usr/local/nagios/libexec/process_perfdata.pl line 465, <PDFILE> line 1.
npcd[1254217]: Use of uninitialized value $NAGIOS{"MULTI_PARENT"} in printf at /usr/local/nagios/libexec/process_perfdata.pl line 466, <PDFILE> line 1.
Performance graphs seem to be generating OK.

Has anyone ever seen messages like these?
sgardil
Posts: 350
Joined: Wed Aug 09, 2023 9:58 am

Re: NPCD Messages

Post by sgardil »

Hey @andyb4u

I haven't seen these message before however I haven't installed an xi instance on rhel 9. Was this on a fresh install, and if not do you notice these messages frequently?
richiecoy
Posts: 1
Joined: Tue Aug 29, 2023 8:05 am

Re: NPCD Messages

Post by richiecoy »

Did you ever get this fixed?
andyb4u
Posts: 114
Joined: Tue Aug 15, 2017 1:58 am

Re: NPCD Messages

Post by andyb4u »

No i haven't found a resolution for this.

It was actually a migration of XI from a RedHat 7 server to a RedHat 9 server. XI has since been upgraded to 5.11.2 but still seeing the messages appear.
ErnestoBlanda
Posts: 2
Joined: Wed Oct 25, 2023 10:03 pm

Re: NPCD Messages

Post by ErnestoBlanda »

andyb4u wrote: Tue Oct 17, 2023 9:05 am No i haven't found mr minea resolution for this.

It was actually a migration of XI from a RedHat 7 server to a RedHat 9 server. XI has since been upgraded to 5.11.2 but still seeing the messages appear.
:( :(
sgardil
Posts: 350
Joined: Wed Aug 09, 2023 9:58 am

Re: NPCD Messages

Post by sgardil »

andyb4u wrote: Tue Oct 17, 2023 9:05 am No i haven't found a resolution for this.

It was actually a migration of XI from a RedHat 7 server to a RedHat 9 server. XI has since been upgraded to 5.11.2 but still seeing the messages appear.
Ah it makes more sense that you are seeing these issues now that you did a migration from rhel7 to rhel9. Unfortunately migrating XI servers can be very touchy so weird issues can appear after the migration. May I ask did you follow the documentation for migrating the server found here Migrating XI to new servers unfortunate ... of issues ?
roelg
Posts: 1
Joined: Fri May 22, 2015 4:59 am

Re: NPCD Messages

Post by roelg »

Ran in this particular issue myself after an upgrade to a newer OS since CentOS 7 is no more. I know this is a late reply, but it might help someone who runs into the same issue.
What I did to fix it;
tail /var/log/messages -n 100
Log gets flooded by messages below:
Use of uninitialized value $NAGIOS{"MULTI_PARENT"} in printf at /usr/local/nagios/libexec/process_perfdata.pl line 466, <PDFILE> line 17.
Use of uninitialized value $NAGIOS{"MULTI_PARENT"} in substitution (s///) at /usr/local/nagios/libexec/process_perfdata.pl line 465, <PDFILE> line 41.


vi /usr/local/nagios/libexec/process_perfdata.pl

Replace following line:
$NAGIOS{MULTI_PARENT} = $data[0]{multi_parent};

With:
$NAGIOS{MULTI_PARENT} = $data[0]{multi_parent} || "";

Now again do: tail /var/log/messages -n 100
Log gets flooded with messages below:
Use of uninitialized value $string in substitution (s///) at /usr/local/nagios/libexec/process_perfdata.pl line 700, <PDFILE> line 11.

vi /usr/local/nagios/libexec/process_perfdata.pl
Replace following lines:
sub cleanup {
my $string = shift;
$string =~ s/[ :\/\\]/_/g;
return $string;
}

With:
sub cleanup {
my $string = shift;
if ($string) {
$string =~ s/[ :\/\\]/_/g;
}
return $string;
}

Final check on the logs to see if the errors are gon:
tail /var/log/messages -n 100

And finally, check after 15 minutes or so to see if your performance graphs are still updating.

Keep in mind that you might have to redo this once Nagios gets updated!
Post Reply