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 »

This is the same plugin from the previous that you worked on me with
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Informix Monitoring

Post by tgriep »

OK, take a look at the previous post then.
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 »

ok I have been... everything looks correct. I looked at the script and even ran this line from it and got the correct output.

Code: Select all

[root@huey libexec]# $INFORMIXDIR/bin/onstat -
IBM Informix Dynamic Server Version 12.10.FC8W2WE -- Updatable (Sec) -- Up 20 days 16:55:53 -- 1138808 Kbytes

[root@huey libexec]#

Code: Select all

[root@huey libexec]# /usr/local/nagios/libexec/check_informix.sh /usr/informix hueynet
IBM Informix Dynamic Server Version 12.10.FC8W2WE -- Updatable (Sec) -- Up 20 days 17:29:51 -- 1138808 Kbytes
[root@huey libexec]#

Code: Select all

[code][root@nag libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.42 -c check_informix -a '/usr/informix hueynet'
NRPE: Unable to read output
You have mail in /var/spool/mail/root
[root@nag libexec]#
[/code]

Not sure what is going on. I need to get this working and also, I have another one I need to get working as well.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Informix Monitoring

Post by tgriep »

Login to the huey server and add the following lines to the /etc/sudoers file on the remote servers.

Code: Select all

nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_informix.sh
nagios ALL=NOPASSWD: /usr/informix/bin/onstat *
then run the following to test and see if the plugin runs as the nagios user and post the output.

Code: Select all

su - nagios
/usr/local/nagios/libexec/check_informix.sh /usr/informix hueynet
It is passes, try running it from the Nagios server to see if it functions from there.
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 »

I got this

Code: Select all

[nagios@huey ~]$ /usr/local/nagios/libexec/check_informix.sh /usr/informix hueynet
-bash: /usr/local/nagios/libexec/check_informix.sh: Permission denied
[nagios@huey ~]$
do I need to change the script to this
chmod 777 & chgrp nagios.nagios

Here is what the permission are now...

Code: Select all

[nagios@huey ~]$ ls -l /usr/local/nagios/libexec/check_informix.sh
-rwxr-x---. 1 root root 684 Nov 19 12:35 /usr/local/nagios/libexec/check_informix.sh
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Informix Monitoring

Post by tgriep »

Run these commands again to set the permissions on that plugin again.

Code: Select all

chown nagios.nagios /usr/local/nagios/libexec/check_informix.sh
chmod a+x /usr/local/nagios/libexec/check_informix.sh
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 »

here is the output from the remote server.

Code: Select all

[nagios@huey ~]$ /usr/local/nagios/libexec/check_informix.sh /usr/informix hueynet
IBM Informix Dynamic Server Version 12.10.FC8W2WE -- Updatable (Sec) -- Up 20 days 19:32:58 -- 1138808 Kbytes

Here is the output from the NAGIOS server.

Code: Select all

[root@nag libexec]# [nagios@huey ~]$ /usr/local/nagios/libexec/check_informix.sh /usr/informix hueynet
-bash: [nagios@huey: command not found
[root@nag libexec]# IBM Informix Dynamic Server Version 12.10.FC8W2WE -- Updatable (Sec) -- Up 20 days 19:32:58 -- 1138808 Kbytes
-bash: syntax error near unexpected token `('
[root@nag libexec]#

Also when I run this from NAGIOS

Code: Select all

[root@nag libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.42 -c check_informix -a '/usr/informix hueynet'
IBM Informix Dynamic Server Version 12.10.FC8W2WE -- Updatable (Sec) -- Up 20 days 19:37:43 -- 1138808 Kbytes
[root@nag libexec]#

Any thoughts?
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Informix Monitoring

Post by donnyforbes »

I tested on all 3 remote servers and NAGIOS server after making those changes. And it seems to be good. Here is the output from the NAGIOS server

Code: Select all

[root@nag libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.39.10 -c check_informix -a '/usr/informix louienet'
IBM Informix Dynamic Server Version 12.10.FC8W2WE -- Updatable (RSS) -- Up 23 days 16:31:38 -- 1138808 Kbytes
[root@nag libexec]#

[root@nag libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.42 -c check_informix -a '/usr/informix hueynet'
IBM Informix Dynamic Server Version 12.10.FC8W2WE -- Updatable (Sec) -- Up 20 days 19:48:19 -- 1138808 Kbytes
[root@nag libexec]#

[root@nag libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.43 -c check_informix -a '/usr/informix dueynet'
IBM Informix Dynamic Server Version 12.10.FC8W2WE -- On-Line (Prim) -- Up 23 days 16:34:54 -- 1204344 Kbytes
[root@nag libexec]#
Now what I need to do is add to nagios right? I have this in there already. I believe, I will send you a screenshot shortly...
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Informix Monitoring

Post by tgriep »

The correct command to run on the nagios server to run the plugin on the remote server is this.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.42 -c check_informix -a '/usr/informix hueynet'
which is your 3rd example in your post and it passed.

Your second example looks like you tried to run this as a command "[nagios@huey ~]$" which would fail as it is not valid.
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 »

I got the command to run on all 3 servers and NAGIOS. I went and enable the service that was in XI and here is the screenshot. What does the status of 'Unknown" mean" It should say "OK"
You do not have the required permissions to view the files attached to this post.
Last edited by donnyforbes on Mon Nov 19, 2018 6:07 pm, edited 1 time in total.
Locked