Hi,
I have setup a new physical server for Nagios. installation and recovery from old server went fine, NPCD process was running fine until today, it stopped running. I tried restarting the process, the output says NPCD is running but the status is not updating in GUI. Please help!
Thanks!
NPCD process not running in GUI
Re: NPCD process not running in GUI
Attached here is the status as seen on the GUI.
You do not have the required permissions to view the files attached to this post.
Re: NPCD process not running in GUI
[nagios@nagios ~]$ ps -ef | grep npcd
nagios 5502 1 0 16:13 ? 00:00:00 /usr/local/nagios/bin/npcd -d -f /usr/local/nagios/etc/pnp/npcd.cfg
nagios 45743 44373 0 16:34 pts/1 00:00:00 grep --color=auto npcd
[nagios@nagios ~]$ uptime
16:34:51 up 7 days, 17:04, 2 users, load average: 3.35, 3.20, 4.41
[nagios@nagios ~]$ sudo /etc/init.d/npcd status
NPCD running (pid 5502).
[nagios@nagios ~]$
Here is some more info from command line.
nagios 5502 1 0 16:13 ? 00:00:00 /usr/local/nagios/bin/npcd -d -f /usr/local/nagios/etc/pnp/npcd.cfg
nagios 45743 44373 0 16:34 pts/1 00:00:00 grep --color=auto npcd
[nagios@nagios ~]$ uptime
16:34:51 up 7 days, 17:04, 2 users, load average: 3.35, 3.20, 4.41
[nagios@nagios ~]$ sudo /etc/init.d/npcd status
NPCD running (pid 5502).
[nagios@nagios ~]$
Here is some more info from command line.
Re: NPCD process not running in GUI
Following are the parameters set in npcd.cfg
[nagios@nagios ~]$ cat /usr/local/nagios/etc/pnp/npcd.cfg
user = nagios
group = nagios
log_type = file
log_file = /usr/local/nagios/var/npcd.log
max_logfile_size = 10485760
log_level = -1
perfdata_spool_dir = /usr/local/nagios/var/spool/perfdata/
perfdata_file_run_cmd = /usr/local/nagios/libexec/process_perfdata.pl
perfdata_file_run_cmd_args = -b
npcd_max_threads = 5
sleep_time = 15
load_threshold = 20.0
pid_file=/usr/local/nagiosxi/var/subsys/npcd.pid
[nagios@nagios ~]$ cat /usr/local/nagios/etc/pnp/npcd.cfg
user = nagios
group = nagios
log_type = file
log_file = /usr/local/nagios/var/npcd.log
max_logfile_size = 10485760
log_level = -1
perfdata_spool_dir = /usr/local/nagios/var/spool/perfdata/
perfdata_file_run_cmd = /usr/local/nagios/libexec/process_perfdata.pl
perfdata_file_run_cmd_args = -b
npcd_max_threads = 5
sleep_time = 15
load_threshold = 20.0
pid_file=/usr/local/nagiosxi/var/subsys/npcd.pid
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: NPCD process not running in GUI
Hello, @vy3734. What is the output of:
And:sudo /usr/local/nagiosxi/scripts/manage_services.sh status npcd
su - nagios
/etc/init.d/npcd status
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NPCD process not running in GUI
Here's what i found:
[root@ nagios]# /usr/local/nagiosxi/scripts/manage_services.sh status npcd
● npcd.service - SYSV: Visit the Website at http://sourceforge.net/projects/pnp4nagios/
Loaded: loaded (/etc/rc.d/init.d/npcd; bad; vendor preset: disabled)
Active: inactive (dead) since Wed 2018-10-31 16:47:37 EDT; 21min ago
Docs: man:systemd-sysv-generator(8)
Process: 26036 ExecStop=/etc/rc.d/init.d/npcd stop (code=exited, status=0/SUCCESS)
Process: 31731 ExecStart=/etc/rc.d/init.d/npcd start (code=exited, status=0/SUCCESS)
Main PID: 5502 (code=exited, status=0/SUCCESS)
Oct 31 16:25:55 NagiosServer systemd[1]: Starting SYSV: Visit the Website at http://sourceforge.net/projects/pnp4nagios/...
Oct 31 16:25:55 NagiosServer npcd[31731]: NPCD already started
Oct 31 16:25:55 NagiosServer systemd[1]: Started SYSV: Visit the Website at http://sourceforge.net/projects/pnp4nagios/.
Oct 31 16:47:37 NagiosServer npcd[26036]: NPCD Stopped.
You have new mail in /var/mail/root
[nagios@nagios]$ /etc/init.d/npcd status
head: cannot open ‘/usr/local/nagiosxi/var/subsys/npcd.pid’ for reading: Permission denied
error: list of process IDs must follow -p
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).
NPCD not running.
I then tried to restart the service
[nagios@nagios]$ sudo /etc/init.d/npcd restart
NPCD Stopped.
NPCD started.
[nagios@nagios]$ sudo /etc/init.d/npcd status
NPCD running (pid 17010).
[root@ nagios]# /usr/local/nagiosxi/scripts/manage_services.sh status npcd
● npcd.service - SYSV: Visit the Website at http://sourceforge.net/projects/pnp4nagios/
Loaded: loaded (/etc/rc.d/init.d/npcd; bad; vendor preset: disabled)
Active: inactive (dead) since Wed 2018-10-31 16:47:37 EDT; 21min ago
Docs: man:systemd-sysv-generator(8)
Process: 26036 ExecStop=/etc/rc.d/init.d/npcd stop (code=exited, status=0/SUCCESS)
Process: 31731 ExecStart=/etc/rc.d/init.d/npcd start (code=exited, status=0/SUCCESS)
Main PID: 5502 (code=exited, status=0/SUCCESS)
Oct 31 16:25:55 NagiosServer systemd[1]: Starting SYSV: Visit the Website at http://sourceforge.net/projects/pnp4nagios/...
Oct 31 16:25:55 NagiosServer npcd[31731]: NPCD already started
Oct 31 16:25:55 NagiosServer systemd[1]: Started SYSV: Visit the Website at http://sourceforge.net/projects/pnp4nagios/.
Oct 31 16:47:37 NagiosServer npcd[26036]: NPCD Stopped.
You have new mail in /var/mail/root
[nagios@nagios]$ /etc/init.d/npcd status
head: cannot open ‘/usr/local/nagiosxi/var/subsys/npcd.pid’ for reading: Permission denied
error: list of process IDs must follow -p
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).
NPCD not running.
I then tried to restart the service
[nagios@nagios]$ sudo /etc/init.d/npcd restart
NPCD Stopped.
NPCD started.
[nagios@nagios]$ sudo /etc/init.d/npcd status
NPCD running (pid 17010).
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: NPCD process not running in GUI
@vy3734, What is the permission of the npcd.pid file?
Then rerun this command again:
Please remove it, and then reboot the server shutdown -r now.ls -l /usr/local/nagiosxi/var/subsys/npcd.pid
Then rerun this command again:
[nagios@nagios]$ /etc/init.d/npcd status
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NPCD process not running in GUI
I removed the pid file and restarted the process.
[nagios@root ~]$ ls -l /usr/local/nagiosxi/var/subsys/npcd.pid
-rw------- 1 root root 5 Oct 31 17:42 /usr/local/nagiosxi/var/subsys/npcd.pid
[root@root]# rm /usr/local/nagiosxi/var/subsys/npcd.pid
rm: remove regular file ‘/usr/local/nagiosxi/var/subsys/npcd.pid’? y
[nagios@nagios ~]$
[nagios@nagios ~]$ sudo /etc/init.d/npcd status
NPCD not running.
[nagios@nagios~]$ sudo /etc/init.d/npcd restart
rm: cannot remove ‘/usr/local/nagiosxi/var/subsys/npcd.pid’: No such file or directory
NPCD was not running.
NPCD started.
[nagios@nagios~]$ sudo /etc/init.d/npcd status
NPCD running (pid 13933).
The GUI still shows the process as not running.
Would re-installing npcd help?
I do have root access to start/stop/restart processes related to nagios, but i cannot reboot the server. Is it mandatory that we reboot the server?
[nagios@root ~]$ ls -l /usr/local/nagiosxi/var/subsys/npcd.pid
-rw------- 1 root root 5 Oct 31 17:42 /usr/local/nagiosxi/var/subsys/npcd.pid
[root@root]# rm /usr/local/nagiosxi/var/subsys/npcd.pid
rm: remove regular file ‘/usr/local/nagiosxi/var/subsys/npcd.pid’? y
[nagios@nagios ~]$
[nagios@nagios ~]$ sudo /etc/init.d/npcd status
NPCD not running.
[nagios@nagios~]$ sudo /etc/init.d/npcd restart
rm: cannot remove ‘/usr/local/nagiosxi/var/subsys/npcd.pid’: No such file or directory
NPCD was not running.
NPCD started.
[nagios@nagios~]$ sudo /etc/init.d/npcd status
NPCD running (pid 13933).
The GUI still shows the process as not running.
Would re-installing npcd help?
I do have root access to start/stop/restart processes related to nagios, but i cannot reboot the server. Is it mandatory that we reboot the server?
Re: NPCD process not running in GUI
Please try this and see if it works:
Then see if it shows up properly.
Code: Select all
service npcd stop
systemctl npcd startRe: NPCD process not running in GUI
[nagios@NagiosServer ~]$ sudo /etc/init.d/npcd stop
NPCD Stopped.
You have new mail in /var/spool/mail/nagios
[root@NagiosServer chefsolo]# systemctl start npcd
[root@NagiosServer chefsolo]# systemctl status npcd
● npcd.service - SYSV: Visit the Website at http://sourceforge.net/projects/pnp4nagios/
Loaded: loaded (/etc/rc.d/init.d/npcd; bad; vendor preset: disabled)
Active: active (running) since Wed 2018-10-31 17:21:15 EDT; 40min ago
Docs: man:systemd-sysv-generator(8)
Process: 26254 ExecStop=/etc/rc.d/init.d/npcd stop (code=exited, status=0/SUCCESS)
Process: 37885 ExecStart=/etc/rc.d/init.d/npcd start (code=exited, status=0/SUCCESS)
Main PID: 27570 (npcd)
CGroup: /system.slice/npcd.service
‣ 27570 /usr/local/nagios/bin/npcd -d -f /usr/local/nagios/etc/pnp/npcd.cfg
Oct 31 17:21:15 NagiosServer systemd[1]: Starting SYSV: Visit the Website at http://sourceforge.net/projects/pnp4nagios/...
Oct 31 17:21:15 NagiosServer npcd[37885]: NPCD already started
Oct 31 17:21:15 NagiosServer systemd[1]: Started SYSV: Visit the Website at http://sourceforge.net/projects/pnp4nagios/.
NPCD Stopped.
You have new mail in /var/spool/mail/nagios
[root@NagiosServer chefsolo]# systemctl start npcd
[root@NagiosServer chefsolo]# systemctl status npcd
● npcd.service - SYSV: Visit the Website at http://sourceforge.net/projects/pnp4nagios/
Loaded: loaded (/etc/rc.d/init.d/npcd; bad; vendor preset: disabled)
Active: active (running) since Wed 2018-10-31 17:21:15 EDT; 40min ago
Docs: man:systemd-sysv-generator(8)
Process: 26254 ExecStop=/etc/rc.d/init.d/npcd stop (code=exited, status=0/SUCCESS)
Process: 37885 ExecStart=/etc/rc.d/init.d/npcd start (code=exited, status=0/SUCCESS)
Main PID: 27570 (npcd)
CGroup: /system.slice/npcd.service
‣ 27570 /usr/local/nagios/bin/npcd -d -f /usr/local/nagios/etc/pnp/npcd.cfg
Oct 31 17:21:15 NagiosServer systemd[1]: Starting SYSV: Visit the Website at http://sourceforge.net/projects/pnp4nagios/...
Oct 31 17:21:15 NagiosServer npcd[37885]: NPCD already started
Oct 31 17:21:15 NagiosServer systemd[1]: Started SYSV: Visit the Website at http://sourceforge.net/projects/pnp4nagios/.