Page 2 of 7
Re: Need to Monitor Informix
Posted: Fri Jul 07, 2017 4:06 pm
by scottwilkerson
Your first If on line 19 is capitalized and needs to be lower case
Re: Need to Monitor Informix
Posted: Fri Jul 07, 2017 4:07 pm
by lmiltchev
"If" in:
should be lower case:
Try changing it and let us know if this helped.
Re: Need to Monitor Informix
Posted: Fri Jul 07, 2017 4:13 pm
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.
Re: Need to Monitor Informix
Posted: Fri Jul 07, 2017 4:25 pm
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.
Re: Need to Monitor Informix
Posted: Fri Jul 07, 2017 4:26 pm
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
Re: Need to Monitor Informix
Posted: Fri Jul 07, 2017 5:27 pm
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?
Re: Need to Monitor Informix
Posted: Fri Jul 07, 2017 5:46 pm
by donnyforbes
Is what I do?
Re: Need to Monitor Informix
Posted: Mon Jul 10, 2017 9:04 am
by donnyforbes
Can someone please provide me with the next steps?
Thank you,
Re: Need to Monitor Informix
Posted: Mon Jul 10, 2017 9:29 am
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:
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:
Place the following in $ARG2$ field in the CCM under the "Common Settings" tab:
Save, and apply configuration.
Re: Need to Monitor Informix
Posted: Mon Jul 10, 2017 4:17 pm
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