NPCD Error Code 7

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
anoop
Posts: 95
Joined: Tue Jun 25, 2013 1:22 am

NPCD Error Code 7

Post by anoop »

Hi Team,

Im facing one issue when i checked my "npcd.log" like

[10-19-2013 13:33:51] NPCD: ERROR: Executed command exits with return code '7'
[10-19-2013 13:33:51] NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /var/nagiosramdisk/spool/perfdata//1382169791.perfdata.service'
[10-19-2013 13:36:05] NPCD: ERROR: Executed command exits with return code '7'
[10-19-2013 13:36:05] NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /var/nagiosramdisk/spool/perfdata//1382169941.perfdata.service'
[10-19-2013 13:36:42] NPCD: ERROR: Executed command exits with return code '7'
[10-19-2013 13:36:42] NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /var/nagiosramdisk/spool/perfdata//1382169963.perfdata.service'
[10-19-2013 13:45:24] NPCD: ERROR: Executed command exits with return code '7'
[10-19-2013 13:45:24] NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /var/nagiosramdisk/spool/perfdata//1382170485.perfdata.service'
[10-19-2013 13:45:24] NPCD: ERROR: Executed command exits with return code '7'
[10-19-2013 13:45:24] NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /var/nagiosramdisk/spool/perfdata//1382170485.perfdata.host'



Can u please let me know what is the root cause for this issue. And i also tried researching in support forum, i got some inputs like

1. output of ll /usr/local/nagios/var/spool/perfdata/

-rw-rw-r-- 1 nagios nagios 58212 Oct 11 19:13 1381498992.perfdata.service-PID-6412
-rw-rw-r-- 1 nagios users 233660 Oct 12 01:53 1381522990.perfdata.service-PID-18867

2. output of ls -ld /usr/local/nagios/var/spool/perfdata/

drwxr-xr-x 2 nagios nagios 417792 Oct 16 16:48 spool/perfdata/

3. And also used the permissions script to reload all the permissions, but still facing the issue with the above logs..

Please suggest us to solve the issue..

Thanks
System:
Nagios XI Version : 2012R2.2 | PHP Version: 5.3.3
Offloaded MySQL DB on another virtual machine
16 CPU with 2 cores each | 32 GB RAM | 1 TB HDD
CentOS-6.3 |Total = 4,000 hosts| 40,000 services.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NPCD Error Code 7

Post by slansing »

Code: Select all

/var/nagiosramdisk/spool/perfdata/
Is what you would want to be checking as it looks like you are using a ramdisk. Did you complete the sections that push performance data through the ramdisk? If it is misconfigured you could see the above error.

http://assets.nagios.com/downloads/nagi ... giosXI.pdf
anoop
Posts: 95
Joined: Tue Jun 25, 2013 1:22 am

Re: NPCD Error Code 7

Post by anoop »

HI Team,

Actually, we are facing this error before doing RAM Disk... Please find the attachment of the same. and i applied permissions, but it didn't resolve.. Is there anything we missed apart from that.. and also i cross-verified my RAM disk configuration, but everything seems to be fine ..
You do not have the required permissions to view the files attached to this post.
System:
Nagios XI Version : 2012R2.2 | PHP Version: 5.3.3
Offloaded MySQL DB on another virtual machine
16 CPU with 2 cores each | 32 GB RAM | 1 TB HDD
CentOS-6.3 |Total = 4,000 hosts| 40,000 services.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NPCD Error Code 7

Post by abrist »

Could you post a tail of the perfdata.log?

Code: Select all

tail -25 /usr/local/nagios/var/perfdata.log
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
anoop
Posts: 95
Joined: Tue Jun 25, 2013 1:22 am

Re: NPCD Error Code 7

Post by anoop »

Hi Team,

Please find the below output of

tail -25 /usr/local/nagios/var/perfdata.log
You do not have the required permissions to view the files attached to this post.
System:
Nagios XI Version : 2012R2.2 | PHP Version: 5.3.3
Offloaded MySQL DB on another virtual machine
16 CPU with 2 cores each | 32 GB RAM | 1 TB HDD
CentOS-6.3 |Total = 4,000 hosts| 40,000 services.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NPCD Error Code 7

Post by abrist »

Have you implemented rrdcached or a memdisk?
You will need to increase the timeout for perfdata processing, edit:

Code: Select all

/usr/local/nagios/etc/pnp/process_perfdata.cfg
Change:

Code: Select all

TIMEOUT = 20
To:

Code: Select all

TIMEOUT = 40
Restart npcd:

Code: Select all

service npcd restart
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ManojNamdev
Posts: 9
Joined: Sat Sep 07, 2013 10:49 am

Re: NPCD Error Code 7

Post by ManojNamdev »

thanks its working fine
Locked