NCPA PID file location change

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
shoreypu
Posts: 93
Joined: Wed Mar 13, 2019 2:06 pm

NCPA PID file location change

Post by shoreypu »

Our team is looking into intermittent issues where NCPA services do not start on Linux because the prior PID file still exists after a reboot. The ncpa.cfg is configured to put both the pid files and associated log files, for ncpa_passive & listener, in var/run/ncpa_..., which is putting the the files in /usr/local/ncpa/var/run/. If we update the location, by adding a front /, for example, pidfile = /var/run/ncpa_listener.pid and /var/log/ncpa_listener.log, then restart the services, we noted that the ncpa_listener.log moves to /var/log/, as expected, but the ncpa_listener.pid remains in /usr/local/ncpa/var/run/. Why does the log file move as expected, but the pid file does not? Is there another way or place we need to update to move the pid file?

The reason we are trying to move the pid file is to ensure that it is deleted on reboot.

Thanks in advance.
jsimon
Posts: 112
Joined: Wed Aug 23, 2023 11:27 am

Re: NCPA PID file location change

Post by jsimon »

Hi @shoreypu,

My first thought is that it's possible a permissions issue is preventing the user that ncpa runs as from moving the pid files. I would recommend taking a look at the permissions on the existing pid files that are in the location you are trying to move them out of. You'll want to make sure they match whatever user you have ncpa configured to run as (nagios user by default)
bbahn
Posts: 121
Joined: Thu Jan 12, 2023 5:42 pm

Re: NCPA PID file location change

Post by bbahn »

Hello @shoreypu,

It would seem that you are encountering an issue with NCPA 2. Have you set your loglevel to debug and checked your logs to see if any errors are occuring?

Also, NCPA 3.0.2 recently got an upgrade in how it handles its PID file and I suggest that you try upgrading to solve your issue.
April: Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
oilumiun12
Posts: 2
Joined: Tue Dec 26, 2023 8:25 pm

Re: NCPA PID file location change

Post by oilumiun12 »

bbahn wrote: Fri Apr 05, 2024 9:43 am Hello @shoreypu,

It would seem that you are encountering an issue with NCPA 2. Have you set your loglevel to debug and checked your logs to see if any errors are occuring?

Also, NCPA 3.0.2 recently got an upgrade in how it handles its PID file and I suggest that you try upgrading to solve your issue.
i was also having this trouble and after debugging it seems to be fixed. Thank you for sharing so much
Post Reply