http://support.nagios.com/forum/viewtopic.php?t=4857
I have the same issue.
[root@nagiosrl01 libexec]# /usr/local/nagios/libexec/check_mbean_collector -H pomona01 -p 5566 -m java.lang:type=Memory -a HeapMemoryUsage -w 60 -c 80
HEAPMEMORYUSAGE OK - HeapMemoryUsage is commited : 1433 MB init : 1536 MB max : 1433 MB used : 316 MB percentage : 22 % OK [root@nagiosrl01 libexec]#
[root@nagiosrl01 libexec]#
but Nagios status information says NULL
My command definition is:
$USER1$/check_mbean_collector.pl -H $HOSTADDRESS$ -p $ARG1$ -m $ARG2$ -a $ARG3$ -w $ARG4$ -c $ARG5$
jboss2nagios plugin problems
Re: jboss2nagios plugin problems
Try wrapping double quotes around your $ARGX$ values, I know that sometimes causes the null. Though it might also need to be changed in the plugin output itself.
Former Nagios employee
-
- Posts: 40
- Joined: Wed Sep 25, 2013 7:01 am
Re: jboss2nagios plugin problems
Seconding what tmcdonald said, but also adding my $0.02!
Make sure you become "nagios" before testing plugins on the commandline:
This might yield some exciting Perl errors.
Make sure you become "nagios" before testing plugins on the commandline:
Code: Select all
[root@nagiosrl01 libexec]# su - nagios
[nagios@nagiosrl01 libexec]# /usr/local/nagios/libexec/check_mbean_collector -H pomona01 -p 5566 -m java.lang:type=Memory -a HeapMemoryUsage -w 60 -c 80
Re: jboss2nagios plugin problems
I get the same result
[root@nagiosrl01 libexec]# ./check_mbean_collector -H pomona01 -p 5566 -m java.lang:type=Memory -a HeapMemoryUsage -w 60 -c 80
HEAPMEMORYUSAGE OK - HeapMemoryUsage is commited : 1472 MB init : 1536 MB max : 1472 MB used : 349 MB percentage : 23 % OK [root@nagiosrl01 libexec]# su - nagios
[nagios@nagiosrl01 ~]$ cd /usr/local/nagios/libexec
[nagios@nagiosrl01 libexec]$ ./check_mbean_collector -H pomona01 -p 5566 -m java.lang:type=Memory -a HeapMemoryUsage -w 60 -c 80
HEAPMEMORYUSAGE OK - HeapMemoryUsage is commited : 1472 MB init : 1536 MB max : 1472 MB used : 351 MB percentage : 23 % OK [nagios@nagiosrl01 libexec]$
If you look at the end of the command adds the promp. I tried to put the output in a file and then paint on screen, but does not work, should be something of execution
[root@nagiosrl01 libexec]# ./check_mbean_collector -H pomona01 -p 5566 -m java.lang:type=Memory -a HeapMemoryUsage -w 60 -c 80
HEAPMEMORYUSAGE OK - HeapMemoryUsage is commited : 1472 MB init : 1536 MB max : 1472 MB used : 349 MB percentage : 23 % OK [root@nagiosrl01 libexec]# su - nagios
[nagios@nagiosrl01 ~]$ cd /usr/local/nagios/libexec
[nagios@nagiosrl01 libexec]$ ./check_mbean_collector -H pomona01 -p 5566 -m java.lang:type=Memory -a HeapMemoryUsage -w 60 -c 80
HEAPMEMORYUSAGE OK - HeapMemoryUsage is commited : 1472 MB init : 1536 MB max : 1472 MB used : 351 MB percentage : 23 % OK [nagios@nagiosrl01 libexec]$
If you look at the end of the command adds the promp. I tried to put the output in a file and then paint on screen, but does not work, should be something of execution
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: jboss2nagios plugin problems
In know what you are saying but this should not affect Nagios. However if you wanted to change this to confirm it for yourself, I have looked at the code and you would need to change the following (this is script Revision: 1.2):mhinjos wrote:If you look at the end of the command adds the promp.
Line 120, 124, 128
print $1 . "\n";
Line 131
print $answer . "\n";
Change your command to this:tmcdonald wrote:Try wrapping double quotes around your $ARGX$ values, I know that sometimes causes the null. Though it might also need to be changed in the plugin output itself.
Code: Select all
$USER1$/check_mbean_collector.pl -H $HOSTADDRESS$ -p $ARG1$ -m \"$ARG2$\" -a \"$ARG3$\" -w \"$ARG4$\" -c \"$ARG5$\"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: jboss2nagios plugin problems
applying the two changes that suggest
Nagios
COMMAND: /usr/local/nagios/libexec/check_mbean_collector -H pomoa01 -p 5566 -m \"jboss.system:type=Memory\" -a \"HeapMemoryUsage\" -w \"60\" -c \"80\"
OUTPUT:
Line command
[root@nagiosrl01 libexec]# /usr/local/nagios/libexec/check_mbean_collector -H pomona01 -p 5566 -m \"java.lang:type=Memory\" -a \"HeapMemoryUsage\" -w \"60\" -c \"80\"
UNKNOWN ? UNKNOWN - MBeanServer responded: MalformedObjectNameException Invalid character '"' in value part of property
Nagios
COMMAND: /usr/local/nagios/libexec/check_mbean_collector -H pomoa01 -p 5566 -m \"jboss.system:type=Memory\" -a \"HeapMemoryUsage\" -w \"60\" -c \"80\"
OUTPUT:
Line command
[root@nagiosrl01 libexec]# /usr/local/nagios/libexec/check_mbean_collector -H pomona01 -p 5566 -m \"java.lang:type=Memory\" -a \"HeapMemoryUsage\" -w \"60\" -c \"80\"
UNKNOWN ? UNKNOWN - MBeanServer responded: MalformedObjectNameException Invalid character '"' in value part of property
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: jboss2nagios plugin problems
When we wrapped the $ARG$ values with \" they only apply to the command definition. Trying to use them at the command line will not work.
When you run the command after making these changes, what is the output?Box293 wrote:In know what you are saying but this should not affect Nagios. However if you wanted to change this to confirm it for yourself, I have looked at the code and you would need to change the following (this is script Revision: 1.2):
Line 120, 124, 128
print $1 . "\n";
Line 131
print $answer . "\n";
Code: Select all
[root@nagiosrl01 libexec]# ./check_mbean_collector -H pomona01 -p 5566 -m java.lang:type=Memory -a HeapMemoryUsage -w 60 -c 80
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.