Hello all,
I recently setup Nagios2Jboss, but have not gotten it to work with nagios XI correctly
Steps done:
Create command in NagiosXI
$USER1$/check_mbean_collector -H $HOSTADDRESS$ -p $ARG1$ -m $ARG2$ -a $ARG3$ -w $ARG4$ -c $ARG5$
Installed collector.sar in jboss
installed mbean connector in Nagios libexec
verified my ports were open and active.
From command line I run this command
pwd: /usr/local/nagios/libexec
./check_mbean_collector -H xxx.xxx.xxx.xxx -p 5566 -m jboss.system:type=ServerInfo -a ActiveThreadCount -w 200 -c 400
and get these results:
MX attribute ActiveThreadCount has value 171|jboss.system:type=ServerInfo:ActiveThreadCount=171
This tells me its working from the Nagios XI server to the Jboss server
But in NagiosXI web interface I get this
ServerName Down 1d 11h 30m 53s 1/5 2010-07-14 12:31:49 (null)
I have it configured to accept 5 different variables:
$USER1$/check_mbean_collector -H $HOSTADDRESS$ -p $ARG1$ -m $ARG2$ -a $ARG3$ -w $ARG4$ -c $ARG5$
Under my assumption with the above given command and parameters listed below should give me the same results as the command line
ARG1= 5566
ARG2 = jboss.system:type=ServerInfo
ARG3 = ActiveThreadCount
ARG4 = 200
ARG5= 400
so the end result should look like this?
./check_mbean_collector -H xxx.xxx.xxx.xxx -p 5566 -m jboss.system:type=ServerInfo -a ActiveThreadCount -w 200 -c 400
Can anyone shed some light on why I am getting a null value in NagiosXI? My immediate thought is I have configure incorrectly in the web interface.
help configuring addon in NagiosXI
Re: help configuring addon in NagiosXI
For "jboss.system:type=ServerInfo" where "ServerInfo" is not numerical, like 171. This seams like a big problem to me.
I also wonder if you tested from another directory and as the nagios user. Most of the time these problems are a result of incorrectly configuring the test environment... The fact that you are getting a different result suggests that you are indeed not performing the same steps.
To further test this you will need to more closely mimic the environment that Nagios Core used when it runs. What I do is strace the Nagios Core process and follow forks.
I also wonder if you tested from another directory and as the nagios user. Most of the time these problems are a result of incorrectly configuring the test environment... The fact that you are getting a different result suggests that you are indeed not performing the same steps.
To further test this you will need to more closely mimic the environment that Nagios Core used when it runs. What I do is strace the Nagios Core process and follow forks.
Re: help configuring addon in NagiosXI
You were exactly correct with the environment.
I switched to nagios user and it worked direct from the libexec dir, as soon as I dropped back one directory I got
Can't locate utils.pm in @INC (@INC contains: /usr/lib/nagios/plugins /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at libexec/check_mbean_collector line 33.
I did a few other test etc.. but then just ended up with this solution:
yum search utils.pm
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: hpc.arc.georgetown.edu
* base: mirror.highspeedweb.net
* epel: serverbeach1.fedoraproject.org
* extras: hpc.arc.georgetown.edu
* updates: centos.mirror.nac.net
======================================================== Matched: utils.pm =========================================================
nagios-plugins-perl.i386 : Nagios plugins perl dep.
yum install nagios-plugins-perl.i386
and now its working perfect.
I switched to nagios user and it worked direct from the libexec dir, as soon as I dropped back one directory I got
Can't locate utils.pm in @INC (@INC contains: /usr/lib/nagios/plugins /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at libexec/check_mbean_collector line 33.
I did a few other test etc.. but then just ended up with this solution:
yum search utils.pm
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: hpc.arc.georgetown.edu
* base: mirror.highspeedweb.net
* epel: serverbeach1.fedoraproject.org
* extras: hpc.arc.georgetown.edu
* updates: centos.mirror.nac.net
======================================================== Matched: utils.pm =========================================================
nagios-plugins-perl.i386 : Nagios plugins perl dep.
yum install nagios-plugins-perl.i386
and now its working perfect.