Xml and rrd files are not created automatically

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Xml and rrd files are not created automatically

Post by abrist »

Comment out the following lines:

Code: Select all

host_perfdata_command=process-host-perfdata
service_perfdata_command=process-service-perfdata
With pound signs:

Code: Select all

#host_perfdata_command=process-host-perfdata
#service_perfdata_command=process-service-perfdata
Restart nagios:

Code: Select all

service nagios 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.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Xml and rrd files are not created automatically

Post by imran_khan »

Hello,

This is already commented out in nagios configuration

[root@localhost nagios]# cat nagios.cfg | grep "service_perfdata\|host_perfdata"
# host_perfdata_command (defined below) and service performance
# data will be processed using the service_perfdata_command (also
host_perfdata_command=process-host-perfdata
service_perfdata_command=process-service-perfdata

Thanks,
Imran Khan.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Xml and rrd files are not created automatically

Post by abrist »

They are not commented out, as they do not have a pound sign at the beginning of the lines . . . .
imran_khan wrote:host_perfdata_command=process-host-perfdata
service_perfdata_command=process-service-perfdata
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.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Xml and rrd files are not created automatically

Post by imran_khan »

Hello,

Commented the lines in Nagios configuration file and reloaded the Nagios service. Still getting same error.

Thanks,
Imran Khan.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Xml and rrd files are not created automatically

Post by abrist »

Can your post the output of:

Code: Select all

perl verify_pnp_config --mode bulk --config=/etc/nagios/nagios.cfg --pnpcfg=/etc/pnp4nagios
cat nagios.cfg | grep "service_perfdata\|host_perfdata"
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.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Xml and rrd files are not created automatically

Post by imran_khan »

Hello,

Please find the out put of commands. I am getting critical message for all the servers, so I have reverted the changes.

[root@localhost ~]# perl verify_pnp_config --mode bulk --config=/etc/nagios/nagios.cfg --pnpcfg=/etc/pnp4nagios
service_perfdata_file_processing_command at verify_pnp_config line 462.
host_perfdata_file_processing_command at verify_pnp_config line 462.
[INFO] ========== Starting Environment Checks ============
[INFO] My version is: verify_pnp_config-0.6.21-R.40
[INFO] Start Options: verify_pnp_config --mode bulk --config=/etc/nagios/nagios.cfg --pnpcfg=/etc/pnp4nagios
[INFO] Reading /etc/nagios/nagios.cfg
[OK ] Running product is 'nagios'
[OK ] object_cache_file is defined
[OK ] object_cache_file=/var/nagios/objects.cache
[INFO] Reading /var/nagios/objects.cache
[OK ] resource_file is defined
[OK ] resource_file=/etc/nagios/resource.cfg
[INFO] Reading /etc/nagios/resource.cfg
[INFO] Reading /etc/pnp4nagios/process_perfdata.cfg
[INFO] Reading /etc/pnp4nagios/pnp4nagios_release
[OK ] Found PNP4Nagios version "0.6.11"
[OK ] Effective User is 'nagios'
[OK ] User nagios exists with ID '101'
[OK ] Effective group is 'nagios'
[OK ] Group nagios exists with ID '103'
[INFO] ========== Checking Bulk Mode Config ============
[OK ] process_performance_data is 1 compared with '/1/'
[OK ] service_perfdata_file is defined
[OK ] service_perfdata_file=/var/log/pnp4nagios/service-perfdata
[OK ] service_perfdata_file_template is defined
[OK ] service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPE
RFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTA
TETYPE$
[OK ] PERFDATA template looks good
[OK ] service_perfdata_file_mode is defined
[OK ] service_perfdata_file_mode=a
[OK ] service_perfdata_file_processing_interval is defined
[OK ] service_perfdata_file_processing_interval=15
[OK ] service_perfdata_file_processing_command is defined
[OK ] service_perfdata_file_processing_command=process-service-perfdata-file
[OK ] host_perfdata_file is defined
[OK ] host_perfdata_file=/var/log/pnp4nagios/host-perfdata
[OK ] host_perfdata_file_template is defined
[OK ] host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOM
MAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
[OK ] PERFDATA template looks good
[OK ] host_perfdata_file_mode is defined
[OK ] host_perfdata_file_mode=a
[OK ] host_perfdata_file_processing_interval is defined
[OK ] host_perfdata_file_processing_interval=15
OK ] host_perfdata_file_processing_command is defined
[OK ] host_perfdata_file_processing_command=process-host-perfdata-file
[INFO] Nagios config looks good so far
[INFO] ========== Checking config values ============
[OK ] Command process-service-perfdata-file is defined
[OK ] '/usr/lib/pnp4nagios/libexec/process_perfdata.pl --bulk=/var/log/pnp4nagios/service-perfdata'
[OK ] Command looks good
[OK ] Script /usr/lib/pnp4nagios/libexec/process_perfdata.pl is executable
[OK ] Command process-host-perfdata-file is defined
[OK ] '/usr/lib/pnp4nagios/libexec/process_perfdata.pl --bulk=/var/log/pnp4nagios/host-perfdata'
[OK ] Command looks good
[OK ] Script /usr/lib/pnp4nagios/libexec/process_perfdata.pl is executable
[INFO] ========== Starting global checks ============
[OK ] status_file is defined
[OK ] status_file=/var/nagios/status.dat
[INFO] host_query =
[INFO] service_query =
[INFO] Reading /var/nagios/status.dat
[INFO] ==== Starting rrdtool checks ====
[OK ] RRDTOOL is defined
[OK ] RRDTOOL=/usr/bin/rrdtool
[OK ] /usr/bin/rrdtool is executable
[OK ] RRDtool 1.4.4 Copyright 1997-2010 by Tobias Oetiker <[email protected]>
[OK ] USE_RRDs is defined
[OK ] USE_RRDs=1
[OK ] Perl RRDs modules are loadable
[INFO] ==== Starting directory checks ====
[OK ] RRDPATH is defined
[OK ] RRDPATH=/var/lib/pnp4nagios/perfdata
[OK ] Perfdata directory '/var/lib/pnp4nagios/perfdata' exists
[CRIT] /var/lib/pnp4nagios/perfdata/example.com/CPU_Load_Average.xml: group is ecryptfs
[CRIT] /var/lib/pnp4nagios/perfdata/example.com/_HOST_.xml: group is ecryptfs
[CRIT] /var/lib/pnp4nagios/perfdata/example.com/CPU_Load_Average.rrd: group is ecryptfs
[CRIT] /var/lib/pnp4nagios/perfdata/example.com/_HOST_.rrd: group is ecryptfs

[root@localhost ~]# cat /etc/nagios/nagios.cfg | grep "service_perfdata\|host_perfdata"
# host_perfdata_command (defined below) and service performance
# data will be processed using the service_perfdata_command (also
host_perfdata_command=process-host-perfdata
service_perfdata_command=process-service-perfdata
#host_perfdata_file=/tmp/host-perfdata
#service_perfdata_file=/tmp/service-perfdata
#host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$
#service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$
#host_perfdata_file_mode=a
#service_perfdata_file_mode=a
#host_perfdata_file_processing_interval=0
#service_perfdata_file_processing_interval=0
#host_perfdata_file_processing_command=process-host-perfdata-file
#service_perfdata_file_processing_command=process-service-perfdata-file
#service_perfdata_file=/var/spool/nagios/service-perfdata
#service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
#service_perfdata_file_mode=a
#service_perfdata_file_processing_interval=15
#service_perfdata_file_processing_command=process-service-perfdata-file
#host_perfdata_file=/var/spool/nagios/host-perfdata
#host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
#host_perfdata_file_mode=a
#host_perfdata_file_processing_interval=15
#host_perfdata_file_processing_command=process-host-perfdata-file
service_perfdata_file=/var/log/pnp4nagios/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file
host_perfdata_file=/var/log/pnp4nagios/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
host_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file

Thanks,
Imran Khan.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Xml and rrd files are not created automatically

Post by abrist »

Alright, the first errors are resolved, but you have new errors:
imran_khan wrote:[CRIT] /var/lib/pnp4nagios/perfdata/example.com/CPU_Load_Average.xml: group is ecryptfs
[CRIT] /var/lib/pnp4nagios/perfdata/example.com/_HOST_.xml: group is ecryptfs
[CRIT] /var/lib/pnp4nagios/perfdata/example.com/CPU_Load_Average.rrd: group is ecryptfs
[CRIT] /var/lib/pnp4nagios/perfdata/example.com/_HOST_.rrd: group is ecryptfs
Can you post a listing of:

Code: Select all

ls -la /var/lib/pnp4nagios/perfdata/example.com/
ls -lad /var/lib/pnp4nagios/perfdata/
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.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Xml and rrd files are not created automatically

Post by imran_khan »

Hello,

Thanks.

Please find the output of mentioned commands.

[root@localhost ~]# ls -al /var/lib/pnp4nagios/perfdata/example.com/
total 5792
drwxr-xr-x 2 nagios ecryptfs 4096 Feb 26 13:34 .
drwxr-xr-x 1224 nagios root 69632 Feb 25 18:08 ..
-rw-r--r-- 1 nagios ecryptfs 768232 Feb 26 13:31 CHECK_RBL_BLACKLIST.rrd
-rw-r--r-- 1 nagios ecryptfs 2661 Feb 26 13:31 CHECK_RBL_BLACKLIST.xml
-rw-r--r-- 1 nagios ecryptfs 384960 Feb 26 13:32 CURRENT-USERS.rrd
-rw-r--r-- 1 nagios ecryptfs 2007 Feb 26 13:32 CURRENT-USERS.xml
-rw-r--r-- 1 nagios ecryptfs 384960 Feb 26 13:33 FTP.rrd
-rw-r--r-- 1 nagios ecryptfs 1980 Feb 26 13:33 FTP.xml
-rw-r--r-- 1 nagios ecryptfs 768232 Feb 26 13:30 _HOST_.rrd
-rw-r--r-- 1 nagios ecryptfs 2641 Feb 26 13:30 _HOST_.xml
-rw-r--r-- 1 nagios ecryptfs 0 Feb 16 06:25 _HOST_.xml.24682
-rw-r--r-- 1 nagios ecryptfs 2601 Feb 15 04:55 _HOST_.xml.25721
-rw-r--r-- 1 nagios ecryptfs 768232 Feb 26 13:34 HTTP.rrd
-rw-r--r-- 1 nagios ecryptfs 2609 Feb 26 13:34 HTTP.xml
-rw-r--r-- 1 nagios ecryptfs 1151504 Feb 26 13:30 LOAD-AVG.rrd
-rw-r--r-- 1 nagios ecryptfs 3400 Feb 26 13:30 LOAD-AVG.xml
-rw-r--r-- 1 nagios ecryptfs 0 Feb 23 00:35 LOAD-AVG.xml.15789
-rw-r--r-- 1 nagios ecryptfs 768232 Feb 26 13:31 PING.rrd
-rw-r--r-- 1 nagios ecryptfs 2701 Feb 26 13:31 PING.xml
-rw-r--r-- 1 nagios ecryptfs 0 Feb 16 11:02 PING.xml.16646
-rw-r--r-- 1 nagios ecryptfs 384960 Feb 26 13:34 _.rrd
-rw-r--r-- 1 nagios ecryptfs 384960 Feb 26 13:34 SMTP.rrd
-rw-r--r-- 1 nagios ecryptfs 1960 Feb 26 13:34 SMTP.xml
-rw-r--r-- 1 nagios ecryptfs 1981 Feb 26 13:34 _.xml

[root@localhost ~]# ls -lad /var/lib/pnp4nagios/perfdata/
drwxr-xr-x 1224 nagios root 69632 Feb 25 18:08 /var/lib/pnp4nagios/perfdata/

Thanks,
Imran Khan.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Xml and rrd files are not created automatically

Post by sreinhardt »

I'm not sure what the encryptfs group is, but the current issue is that apache is generally a part of the nagios or nagcmd group so that it has access to these files, in this case I highly doubt it is a part of this group and therefore does not have permission to access the xml and rrd files.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked