Check for updates using the NCPA agent
Check for updates using the NCPA agent
Hello,
How can we monitor updates on Linux servers using the NCPA agent? With the help of an NRPE agent, it was possible, but we don't want to use it now. Is there a command or plugin for this?
Thank you for your help.
In the initial configuration, only the options in the picture are offered.
How can we monitor updates on Linux servers using the NCPA agent? With the help of an NRPE agent, it was possible, but we don't want to use it now. Is there a command or plugin for this?
Thank you for your help.
In the initial configuration, only the options in the picture are offered.
You do not have the required permissions to view the files attached to this post.
Re: Check for updates using the NCPA agent
Hi
NCPA can be used to run scripts on remote systems in addition to the base set of
services it provides. You can check for scripts and plugins at:
https://exchange.nagios.org/index.php?o ... %20updates
You can also create your own. I cobbled one together from something I found online and it is attached
as check_rpm.txt. Once you download it rename it to check_rpm
Install ncpa on the machine to be monitored.
(https://www.nagios.org/ncpa/getting-started.php)
Here is the minimum you have to configure on the remote machine:
Make sure port 5693 is open on the machine to be monitored.
Then put the script in /usr/local/ncpa/plugins on the remote machine.
Next run the NCPA Configuration Wizard, I have created a video on how to do that and
have attached it as ncpa_rpm.zip.
The script will return the last item installed or updated via rpm. The first number is
the Unix timestamp. You can tweak the script in any way you please.
Give the above a try and let me know how you make out or if I sparked any
further questions.
Thanks
NCPA can be used to run scripts on remote systems in addition to the base set of
services it provides. You can check for scripts and plugins at:
https://exchange.nagios.org/index.php?o ... %20updates
You can also create your own. I cobbled one together from something I found online and it is attached
as check_rpm.txt. Once you download it rename it to check_rpm
Install ncpa on the machine to be monitored.
(https://www.nagios.org/ncpa/getting-started.php)
Here is the minimum you have to configure on the remote machine:
Initial Configuration on Linux
By default the token will be set to mytoken and you will want to change this right away since it allows authentication into the web GUI and access to the API. To change it, open up your NCPA configuration file /usr/local/ncpa/etc/ncpa.cfg and edit the following config section:
[api]
community_string = <your new token>
You must make sure that the community_string value is under the [api] section for it to work. After saving the changes, restart the NCPA listener service:
/etc/init.d/ncpa_listener restart
The service should stop and start without errors. You are now ready to start using NCPA.
Make sure port 5693 is open on the machine to be monitored.
Then put the script in /usr/local/ncpa/plugins on the remote machine.
Code: Select all
[root@localhost plugins]# pwd
/usr/local/ncpa/plugins
[root@localhost plugins]# ll
total 4
-rwxrwxr-x 1 apache apache 994 Nov 9 16:05 check_rpm
have attached it as ncpa_rpm.zip.
The script will return the last item installed or updated via rpm. The first number is
the Unix timestamp. You can tweak the script in any way you please.
Give the above a try and let me know how you make out or if I sparked any
further questions.
Thanks
You do not have the required permissions to view the files attached to this post.
Re: Check for updates using the NCPA agent
Hello,
thank you for help. Unfortunately the plugin does not work, see the screen in the appendix.
thank you for help. Unfortunately the plugin does not work, see the screen in the appendix.
You do not have the required permissions to view the files attached to this post.
Re: Check for updates using the NCPA agent
Hi
From a command line on your Nagios server run:
where XXX.XXX.XX.XXX is the IP of the machine you are trying to monitor
If it comes back with:
Next on the remote machine run:
it should come back with:
those commands return.
Thank you
From a command line on your Nagios server run:
Code: Select all
curl -v telnet://XXX.XXX.XX.XXX:5693
If it comes back with:
then that means we have connectivity. Use ctrl-c to exit out of the curl command.[root@gs-rhel8-23-84 audit]# curl -v telnet://192.168.23.81:5693
* Rebuilt URL to: telnet://192.168.23.81:5693/
* Trying 192.168.23.81...
* TCP_NODELAY set
* Connected to 192.168.23.81 (192.168.23.81) port 5693 (#0)
Next on the remote machine run:
Code: Select all
systemctl status | grep ncpa
Let me know the results. Probably best to just copy/paste anything[root@localhost ~]# systemctl status | grep ncpa
│ │ └─5216 grep --color=auto ncpa
├─ncpa_listener.service
│ └─4707 /usr/local/ncpa/ncpa_listener --start
├─ncpa_passive.service
│ └─2536 /usr/local/ncpa/ncpa_passive --start
those commands return.
Thank you
Re: Check for updates using the NCPA agent
Hello,
I have problem with route to nagios. I attach pictures.
How do I fix a connection?
I have problem with route to nagios. I attach pictures.
How do I fix a connection?
You do not have the required permissions to view the files attached to this post.
Re: Check for updates using the NCPA agent
Hi
What operating system is on the remote machine (192.168.200.41) ?
Thanks
What operating system is on the remote machine (192.168.200.41) ?
Thanks
Re: Check for updates using the NCPA agent
HI
On 192.168.200.41 please run the following:
If it comes back with:
then that means we have connectivity. Use ctrl-c to exit out of the curl command.
Please let me know how things go.
Thanks
On 192.168.200.41 please run the following:
Code: Select all
sudo firewall-cmd --add-port=5693/tcp --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --list-ports
curl -v telnet://XXX.XXX.XX.XXX:5693
Code: Select all
[root@gs-rhel8-23-84 audit]# curl -v telnet://192.168.23.81:5693
* Rebuilt URL to: telnet://192.168.23.81:5693/
* Trying 192.168.23.81...
* TCP_NODELAY set
* Connected to 192.168.23.81 (192.168.23.81) port 5693 (#0)
Please let me know how things go.
Thanks
Re: Check for updates using the NCPA agent
I did as instructed, but unfortunately it didn't help. I have the same problems.
You do not have the required permissions to view the files attached to this post.
Re: Check for updates using the NCPA agent
Hi
Looks like there might be a misunderstanding on my part.
for the following assume the IPs are:
Nagios server 192.168.1.NAGIOS
machine to be monitored: 192.168.1.MONITORME
On the Nagios server (192.168.1.NAGIOS) in a CLI try:
note: 192.168.1.MONITORME should be the server you are trying to monitor(aka the remote machine)
If the above command doesn't work, log into 192.168.1.MONITORME (the remote machine) and run:
Then back on the Nagios server (192.168.1.NAGIOS) try the curl command again:
Please capture the commands and outputs of the above.
Thank you!
Looks like there might be a misunderstanding on my part.
for the following assume the IPs are:
Nagios server 192.168.1.NAGIOS
machine to be monitored: 192.168.1.MONITORME
On the Nagios server (192.168.1.NAGIOS) in a CLI try:
Code: Select all
curl -v telnet://192.168.1.MONITORME:5693
If the above command doesn't work, log into 192.168.1.MONITORME (the remote machine) and run:
Code: Select all
sudo firewall-cmd --add-port=5693/tcp --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --list-ports
Code: Select all
curl -v telnet://192.168.1.MONITORME:5693
Thank you!