service-perfdata file space usage

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

service-perfdata file space usage

Post by IT-OPS-SYS »

Hi Team,

I could see that my root directory is getting filled with the "service-perfdata" file which is under the directory "/usr/local/pnp4nagios/var". Do you think its safe to delete this file without hampering my Nagios XI running production in order to release the space on the root partition.

attached is the system report
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: service-perfdata file space usage

Post by pbroste »

Hello @IT-OPS-SYS

Thanks for reaching out, to start you can delete that service and host perfdata. Be aware that you will lose historical data as well.

host and service perfdata

Code: Select all

> /usr/local/pnp4nagios/var/service-perfdata
> /usr/local/pnp4nagios/var/host-perfdata
Increase the following values in these files:
  • /usr/local/nagios/etc/pnp/process_perfdata.cfg:
  • [list]
  • TIMEOUT = 15
[/list]
  • /usr/local/nagios/etc/pnp/npcd.cfg:
  • [list]
  • sleep_time = 10
[/list]

Try a timeout of 30 and a sleep time of 15 and see if that improves things.

Then do:

Code: Select all

service nagios restart  #restart nagios.service
systemctl restart npcd     #check status to make sure running
systemctl restart ramdisk.service     #check status to make sure running
Please look over the following logs to review for underline issues:

Code: Select all

/usr/local/pnp4nagios/var/perfdata.log
/usr/local/pnp4nagios/var/npcd.log
Thanks,
Perry
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

Re: service-perfdata file space usage

Post by IT-OPS-SYS »

if i delete the files in the directory : /usr/local/pnp4nagios/var/perfdata will it affect my nagios production system.

removing the file (hostname file) from this location should not affect the host entry in the nagios XI database.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: service-perfdata file space usage

Post by pbroste »

Hello @IT-OPS-SYS

Thanks for following up, you are correct that you can delete that data and it will only affect the performance data and history of the perfdata.
IT-OPS-SYS wrote:if i delete the files in the directory : /usr/local/pnp4nagios/var/perfdata will it affect my nagios production system.

removing the file (hostname file) from this location should not affect the host entry in the nagios XI database.
We see that 'nagiosramdisk' is configured and want to take a look to see if 'pnp4nagios' is also aware as we see messages:
NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /var/nagiosramdisk/spool/perfdata//1603278862.perfdata.service'
NPCD: Error while get file list from spooldir (/var/nagiosramdisk/spool/perfdata/) - No such file or directory
Please follow up and send the following:

Code: Select all

systemctl status npcd nagiosramdisk > /tmp/systemservices.txt

Code: Select all

tar -czvf /tmp/results.tar.gz /tmp/systemservices.txt /usr/local/nagios/etc/nagios.cfg /usr/local/pnp4nagios/etc/npcd.cfg /usr/local/nagios/var/perfdata.log /usr/local/nagios/var/npcd.log /usr/local/nagios/etc/objects/commands.cfg  /usr/local/nagios/etc/commands.cfg /usr/local/pnp4nagios/libexec/process_perfdata.pl /usr/local/pnp4nagios/etc/npcd.cfg /usr/local/pnp4nagios/etc/process_perfdata.cfg
Please send the results so we can see what is going on,
Perry
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

Re: service-perfdata file space usage

Post by IT-OPS-SYS »

[root@cvrmnagiosxi001 ~]# systemctl status npcd nagiosramdisk > /tmp/systemservices.txt
Unit nagiosramdisk.service could not be found.
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

Re: service-perfdata file space usage

Post by IT-OPS-SYS »

find the results
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: service-perfdata file space usage

Post by pbroste »

Hello @IT-OPS-SYS

Thanks for following up with the information, we see that the environment is trying to use 'nagiosramdisk' we see the example. Want to find out if this issue happened after an install or upgrade please provide the details.
NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /var/nagiosramdisk/spool/perfdata//
Appears that there are configs configured to use 'nagiosramdisk' and 'pnp4nagios'.

Please run through the attached repair script and then review the configs through the installation guides.

Please verify the services:

Code: Select all

systemctl status ramdisk

Code: Select all

systemctl daemon-reload

Code: Select all

systemctl enable ramdisk.service
Please let us know how things look,
Perry
You do not have the required permissions to view the files attached to this post.
Locked