Need to Monitor Informix

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Need to Monitor Informix

Post by scottwilkerson »

Your first If on line 19 is capitalized and needs to be lower case
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Need to Monitor Informix

Post by lmiltchev »

"If" in:

Code: Select all

If [ $# -lt 2 ]
should be lower case:

Code: Select all

if [ $# -lt 2 ]
Try changing it and let us know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Need to Monitor Informix

Post by donnyforbes »

Ok I saw the problem fixed the scirpt now I see the following when it runs.

Code: Select all

[root@huey libexec]# ./check_ifx.sh
USE: check_ifx informixdir informixserver

         informixdir = Informix directory
         informixserver = server name
[root@huey libexec]#
It still shows like this in the XI and i restarted the xinetd & nrpe services.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Need to Monitor Informix

Post by lmiltchev »

You need to use the correct syntax... whatever is required by the plugin/script. It seems like "check_ifx.sh" requires two parameters - "informixdir" and "informixserver".
USE: check_ifx informixdir informixserver
Most probably, you are not passing any, that's why you see the error in the GUI.
Be sure to check out our Knowledgebase for helpful articles and solutions!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Need to Monitor Informix

Post by scottwilkerson »

Yes the plugin is going to require you to setup the command to specify the Informix directory & server name

Code: Select all

./check_ifx.sh /my/informixdir IP.OF.INFORMIX.SERVER
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Need to Monitor Informix

Post by donnyforbes »

Where do I add this ?
check_ifx informixdir informixserver
&

Code: Select all

./check_ifx.sh /my/informixdir IP.OF.INFORMIX.SERVER
I do have this in the nrpe.cfg file
#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
command[check_http]=/usr/local/nagios/libexec/check_http
command[check_ifx]=/usr/lccal/nagios/libexec/check_ifx.s

Here is the INFORMIXDIR

INFORMIXDIR=/usr/informix
INFORMIXSERVER=hueynet

so do do this for the arugument in the XI and where?
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Need to Monitor Informix

Post by donnyforbes »

Is what I do?
You do not have the required permissions to view the files attached to this post.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Need to Monitor Informix

Post by donnyforbes »

Can someone please provide me with the next steps?

Thank you,
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Need to Monitor Informix

Post by lmiltchev »

First of all, you need to fix the typo in your command. Change this:

Code: Select all

command[check_ifx]=/usr/lccal/nagios/libexec/check_ifx.s
to this:

Code: Select all

command[check_ifx]=/usr/lccal/nagios/libexec/check_ifx.sh
Next, you need to decide if you want to have the arguments "hard-coded" or passed in Nagios XI".

Example 1 (hard-coded arguments)


On the client

Code: Select all

command[check_ifx]=/usr/lccal/nagios/libexec/check_ifx.sh /usr/informix hueynet
Note: of the servername doesn't work, you could use the IP address (192.168.1.42). You will need to restart xinetd (or nrpe if it's running as a "standalone" daemon) in order for changes to take effect.

On the Nagios XI server

Place the following in $ARG1$ field in the CCM under the "Common Settings" tab:

Code: Select all

check_ifx
Save, and apply configuration.


Example 2 (passing arguments in XI)


On the client

Code: Select all

command[check_ifx]=/usr/lccal/nagios/libexec/check_ifx.sh $ARG1$
Note: of the servername doesn't work, you could use the IP address (192.168.1.42). You will need to restart xinetd (or nrpe if it's running as a "standalone" daemon) in order for changes to take effect.

On the Nagios XI server

Place the following in $ARG1$ field in the CCM under the "Common Settings" tab:

Code: Select all

check_ifx
Place the following in $ARG2$ field in the CCM under the "Common Settings" tab:

Code: Select all

-a '/usr/informix hueynet'
Save, and apply configuration.
Be sure to check out our Knowledgebase for helpful articles and solutions!
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Need to Monitor Informix

Post by donnyforbes »

Here is what I did.

modified the /usr/local/nagios/etc/nrpe.cfg

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
command[check_http]=/usr/local/nagios/libexec/check_http
command[check_ifx]=/usr/lccal/nagios/libexec/check_ifx.sh $ARG1$
[root@huey etc]#
here is what i did on the XI . Is this correct? When I run the command from the XI under "run command" I get the following:

Code: Select all

[nagios@nag ~]$ /usr/local/nagios/libexec/check_nrpe -H 192.168.1.42 -t 30 -c check_ifx -a '/usr/informix hueynet'
NRPE: Unable to read output
You do not have the required permissions to view the files attached to this post.
Locked