Informix Monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Informix Monitoring

Post 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.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Informix Monitoring

Post by donnyforbes »

Can someone please assist me with this? I really would like to get this working today.

Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Informix Monitoring

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Informix Monitoring

Post 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?
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Informix Monitoring

Post 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]#
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Informix Monitoring

Post by donnyforbes »

scottwilkerson can you please advise on this issue so that I can get this working please....
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Informix Monitoring

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Informix Monitoring

Post 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 ~]$
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Informix Monitoring

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Informix Monitoring

Post 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
Locked