Need to Monitor Informix
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Need to Monitor Informix
Your first If on line 19 is capitalized and needs to be lower case
Re: Need to Monitor Informix
"If" in:
should be lower case:
Try changing it and let us know if this helped.
Code: Select all
If [ $# -lt 2 ]Code: Select all
if [ $# -lt 2 ]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
Ok I saw the problem fixed the scirpt now I see the following when it runs.
It still shows like this in the XI and i restarted the xinetd & nrpe services.
Code: Select all
[root@huey libexec]# ./check_ifx.sh
USE: check_ifx informixdir informixserver
informixdir = Informix directory
informixserver = server name
[root@huey libexec]#
You do not have the required permissions to view the files attached to this post.
Re: Need to Monitor Informix
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".
Most probably, you are not passing any, that's why you see the error in the GUI.USE: check_ifx informixdir informixserver
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
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-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Need to Monitor Informix
Where do I add this ?
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?
&check_ifx informixdir informixserver
Code: Select all
./check_ifx.sh /my/informixdir IP.OF.INFORMIX.SERVER
#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
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
Can someone please provide me with the next steps?
Thank you,
Thank you,
Re: Need to Monitor Informix
First of all, you need to fix the typo in your command. Change this:
to this:
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
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
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.
Code: Select all
command[check_ifx]=/usr/lccal/nagios/libexec/check_ifx.sCode: Select all
command[check_ifx]=/usr/lccal/nagios/libexec/check_ifx.shExample 1 (hard-coded arguments)
On the client
Code: Select all
command[check_ifx]=/usr/lccal/nagios/libexec/check_ifx.sh /usr/informix hueynetOn the Nagios XI server
Place the following in $ARG1$ field in the CCM under the "Common Settings" tab:
Code: Select all
check_ifxExample 2 (passing arguments in XI)
On the client
Code: Select all
command[check_ifx]=/usr/lccal/nagios/libexec/check_ifx.sh $ARG1$On the Nagios XI server
Place the following in $ARG1$ field in the CCM under the "Common Settings" tab:
Code: Select all
check_ifxCode: Select all
-a '/usr/informix hueynet'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
Here is what I did.
modified the /usr/local/nagios/etc/nrpe.cfg
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:
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]#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 outputYou do not have the required permissions to view the files attached to this post.