Page 3 of 8
Re: Informix Monitoring
Posted: Fri Nov 16, 2018 11:38 am
by donnyforbes
what I have notice is the following below in the nrpe.cfg file worked except the informix.sh one.
Code: Select all
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
command[check_disk_new]=/usr/local/nagios/libexec/check_folder_size $ARG1$
command[check_informix]=/usr/local/nagios/libexec/check_informix.sh
I am not sure why I am getting this error below. Can someone please assist me with this I need to get in working for our production.
Code: Select all
[root@nag libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.42 -c check_informix
NRPE: Command 'check_informix' not defined
[root@nag libexec]#
Please advise so I can get this working.
Re: Informix Monitoring
Posted: Fri Nov 16, 2018 12:36 pm
by donnyforbes
Can someone please assist me with this? I really would like to get this working today.
Thanks
Re: Informix Monitoring
Posted: Fri Nov 16, 2018 1:53 pm
by scottwilkerson
did you edit the nrpe.cfg on the remote machine or the nagios machine?
It needs to be edited on the remote machien (client), and then xinetd restarted on that machine
Re: Informix Monitoring
Posted: Fri Nov 16, 2018 1:55 pm
by donnyforbes
no there is nothing in the nrpe on the remote machine. I was not sure if there needed to be. Do I put this command below in that nrpe.cfg file on the remote machines?
Code: Select all
command[check_informix]=/usr/local/nagios/libexec/check_informix.sh
There is nothing i that file now. How could the others ones work if there is nothing in there? is that different?
Re: Informix Monitoring
Posted: Fri Nov 16, 2018 1:59 pm
by donnyforbes
I added this to the remote server (client)
Code: Select all
#command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
#command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
#command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
#command[check_procs]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
command[check_informix]=/usr/local/nagios/libexec/check_informix.sh
then I did systemctl restart xinetd &&& tested again and got this ......
Code: Select all
[root@nag libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.42 -c check_informix
NRPE: Unable to read output
why would I get this now?
Here is what I don't understand .. From the NAGIOS server I can run the following command and get these results, and this command is not added to the NRPE on the remote server (client) .
Code: Select all
[root@nag libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.42 -c check_procs
PROCS OK: 671 processes | procs=671;;;0;
How would this work and not the check_informix.sh ??
I tried changing it from .sh to check_informix in the nrpe.cfg on the remote server as well.
Code: Select all
command[check_informix]=/usr/local/nagios/libexec/check_informix
then try to run the following command below and go the same output please see...
Code: Select all
[root@nag libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.42 -c check_informix
NRPE: Unable to read output
[root@nag libexec]#
Re: Informix Monitoring
Posted: Fri Nov 16, 2018 2:45 pm
by donnyforbes
scottwilkerson can you please advise on this issue so that I can get this working please....
Re: Informix Monitoring
Posted: Fri Nov 16, 2018 3:23 pm
by tgriep
I have included a link to a KB article that has some solutions for the Unable To Read Output message.
https://support.nagios.com/kb/article/n ... t-620.html
In addition to this article, make sure the plugin is executable by the nagios user.
To test this, login to the remote server, change to the nagios user and run the plugin.
Code: Select all
su - nagios
/usr/local/nagios/libexec/check_informix.sh
If the plugin does run but does not output any data at all, that would cause the error as well.
The plugin has to output something when the check passes as well as fails.
Re: Informix Monitoring
Posted: Fri Nov 16, 2018 4:02 pm
by donnyforbes
tgriep wrote:I have included a link to a KB article that has some solutions for the Unable To Read Output message.
https://support.nagios.com/kb/article/n ... t-620.html
In addition to this article, make sure the plugin is executable by the nagios user.
To test this, login to the remote server, change to the nagios user and run the plugin.
Code: Select all
su - nagios
/usr/local/nagios/libexec/check_informix.sh
If the plugin does run but does not output any data at all, that would cause the error as well.
The plugin has to output something when the check passes as well as fails.
Here is what I got when doing this.
Code: Select all
[nagios@huey ~]$ /usr/local/nagios/libexec/check_informix.sh
-bash: /usr/local/nagios/libexec/check_informix.sh: Permission denied
[nagios@huey ~]$
Re: Informix Monitoring
Posted: Fri Nov 16, 2018 4:04 pm
by tgriep
The permissions are not set on the plugin, run this to fix that.
Code: Select all
chown nagios.nagios /usr/local/nagios/libexec/check_informix.sh
chmod a+x /usr/local/nagios/libexec/check_informix.sh
Then try it again.
Re: Informix Monitoring
Posted: Fri Nov 16, 2018 4:07 pm
by donnyforbes
changed the permission to 777 and ownership to nagios and this time when running got this
[
Code: Select all
nagios@huey ~]$ /usr/local/nagios/libexec/check_informix.sh
USE: check_ifx informixdir informixserver
informixdir = Informix directory
informixserver = server name
[nagios@huey ~]$ /usr/local/nagios/libexec/check_informix.sh
USE: check_ifx informixdir informixserver
informixdir = Informix directory
informixserver = server name
[nagios@huey ~]$
here is what the listing says for that directory now .. when I switched back to root
Code: Select all
[root@huey ~]# ls -l /usr/local/nagios/libexec/check_informix.sh
-rwxrwxrwx. 1 nagios nagios 684 Nov 15 06:58 /usr/local/nagios/libexec/check_informix.sh