Hi All,
I installed the NCPA agent on a CentOS 7.9 server using the Nagios repository. I added a rule for the default port on the firewall and added the host to Nagios XI using the Linux NCPA configuration wizard. I was able to set the metrics for CPU, Memory and disk as well as select the processes I wanted to monitor. After Nagios XI added the new host to monitor I checked the host and noticed that no services are showing for this host. I can ping the host so I know it is being seen and the host is added to Nagios XI but I can't see any metrics for this host. It appears that the services were not created for the host in Nagios. I tried this a few times to make sure I was not missing anything but no services are being created for the host. Are there any steps I need to complete that are not listed in the NCPA installation guide?
Anyone have any suggestions to get this working would be greatly appreciated.
Thank you
No Services showing on NCPA Linux Host
Re: No Services showing on NCPA Linux Host
First, let's make sure the ncpa service is running on your other machine:
ps waux | grep ncpa_listener
If not, try restarting it:
systemctl restart ncpa_listener
See if it shows up in ps now; if not, do a status:
systemctl status ncpa_listener
If there's a problem, it should give you some clue about what.
Then, let's make sure ncpa is really answering on the other end.
From your XI server, try:
/usr/local/nagios/libexec/check_ncpa.py -H yourothermachine -t yourtoken --list
That should give you a whole lot of json output. If you get an error instead, we know something is wrong.
Let us know what you find.
--Jeffrey
ps waux | grep ncpa_listener
If not, try restarting it:
systemctl restart ncpa_listener
See if it shows up in ps now; if not, do a status:
systemctl status ncpa_listener
If there's a problem, it should give you some clue about what.
Then, let's make sure ncpa is really answering on the other end.
From your XI server, try:
/usr/local/nagios/libexec/check_ncpa.py -H yourothermachine -t yourtoken --list
That should give you a whole lot of json output. If you get an error instead, we know something is wrong.
Let us know what you find.
--Jeffrey
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: No Services showing on NCPA Linux Host
Hi,
I ran the command ps waux | grep ncpa_listener as suggested and the listener is showing up on both a CentOS 6 (this will be upgraded soon) and CentOS 7 system.
Looked at the status as well and don't see any issues. Here is the output:
CentOS 6
[root@wa-norl-175 ~]# /etc/init.d/ncpa_listener status
NCPA Listener: Service is running. (pid 24147)
[root@wa-norl-175 ~]#
CentOS 7
[root@wa-grpd-pbs ~]# systemctl status ncpa_listener
● ncpa_listener.service - LSB: This manages the NCPA Listener service
Loaded: loaded (/etc/rc.d/init.d/ncpa_listener; bad; vendor preset: disabled)
Active: active (running) since Thu 2021-11-25 10:27:17 EST; 29min ago
Docs: man:systemd-sysv-generator(8)
Process: 23141 ExecStop=/etc/rc.d/init.d/ncpa_listener stop (code=exited, status=0/SUCCESS)
Process: 23151 ExecStart=/etc/rc.d/init.d/ncpa_listener start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/ncpa_listener.service
└─23162 /usr/local/ncpa/ncpa_listener --start
Nov 25 10:27:17 wa-grpd-pbs.abctech.com systemd[1]: Stopped LSB: This manages the NCPA Listener service.
Nov 25 10:27:17 wa-grpd-pbs.abctech.com systemd[1]: Starting LSB: This manages the NCPA Listener service...
Nov 25 10:27:17 wa-grpd-pbs.abctech.com ncpa_listener[23151]: Starting NCPA Listener: [ OK ]
Nov 25 10:27:17 wa-grpd-pbs.abctech.com systemd[1]: Started LSB: This manages the NCPA Listener service.
[root@wa-grpd-pbs ~]#
From the Nagios XI server, ran the command /usr/local/nagios/libexec/check_ncpa.py -H yourothermachine -t yourtoken --list which produced a whole lot of json output on both the CentOS 6 and 7 server.
I have attached a text file of the output for both the CentOS 6 and 7 servers.
I ran the command ps waux | grep ncpa_listener as suggested and the listener is showing up on both a CentOS 6 (this will be upgraded soon) and CentOS 7 system.
Looked at the status as well and don't see any issues. Here is the output:
CentOS 6
[root@wa-norl-175 ~]# /etc/init.d/ncpa_listener status
NCPA Listener: Service is running. (pid 24147)
[root@wa-norl-175 ~]#
CentOS 7
[root@wa-grpd-pbs ~]# systemctl status ncpa_listener
● ncpa_listener.service - LSB: This manages the NCPA Listener service
Loaded: loaded (/etc/rc.d/init.d/ncpa_listener; bad; vendor preset: disabled)
Active: active (running) since Thu 2021-11-25 10:27:17 EST; 29min ago
Docs: man:systemd-sysv-generator(8)
Process: 23141 ExecStop=/etc/rc.d/init.d/ncpa_listener stop (code=exited, status=0/SUCCESS)
Process: 23151 ExecStart=/etc/rc.d/init.d/ncpa_listener start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/ncpa_listener.service
└─23162 /usr/local/ncpa/ncpa_listener --start
Nov 25 10:27:17 wa-grpd-pbs.abctech.com systemd[1]: Stopped LSB: This manages the NCPA Listener service.
Nov 25 10:27:17 wa-grpd-pbs.abctech.com systemd[1]: Starting LSB: This manages the NCPA Listener service...
Nov 25 10:27:17 wa-grpd-pbs.abctech.com ncpa_listener[23151]: Starting NCPA Listener: [ OK ]
Nov 25 10:27:17 wa-grpd-pbs.abctech.com systemd[1]: Started LSB: This manages the NCPA Listener service.
[root@wa-grpd-pbs ~]#
From the Nagios XI server, ran the command /usr/local/nagios/libexec/check_ncpa.py -H yourothermachine -t yourtoken --list which produced a whole lot of json output on both the CentOS 6 and 7 server.
I have attached a text file of the output for both the CentOS 6 and 7 servers.
You do not have the required permissions to view the files attached to this post.
Re: No Services showing on NCPA Linux Host
Please PM me a copy of your profile.zip, you can download it from Admin > System Profile by clicking the Download Profile button.
Also, go to Admin > Manage Config Wizards:
- Click Check for Updates and install any wizard updates for NCPA or the Linux Server wizards
- If there are updates, try running through the wizard again
Additionally, please send the output of this command:
- NOTE: You may need to adjust the -h 127.0.0.1, the -uroot, and -pnagiosxi in the command if your DB is offloaded to another server and/or you've changed the root mysql password
Also, go to Admin > Manage Config Wizards:
- Click Check for Updates and install any wizard updates for NCPA or the Linux Server wizards
- If there are updates, try running through the wizard again
Additionally, please send the output of this command:
- NOTE: You may need to adjust the -h 127.0.0.1, the -uroot, and -pnagiosxi in the command if your DB is offloaded to another server and/or you've changed the root mysql password
Code: Select all
echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table