Generally what should we put as in argument in command & service
pls. give example
you can consider this command & share command & service argument
./check_mbean_collector -H jbosseserver -p port -m java.lang:type=Memory -a NonHeapMemoryUsage -w 10 -c 30
How to monitor Jboss application
Re: How to monitor Jboss application
There are a number of ways that you can do this:
For Example...
./check_mbean_collector -H jbosseserver -p port -m java.lang:type=Memory -a NonHeapMemoryUsage -w 10 -c 30
Command:
Service Check Command:
This is kind of messy, but I'll walk through my thought process here, since I don't have anything jboss spun up to test against right now. This should give you a better idea of how to write service checks and commands in the future as well.
The command you provided me with is this: ./check_mbean_collector -H jbosseserver -p port -m java.lang:type=Memory -a NonHeapMemoryUsage -w 10 -c 30
The command_line I provided you with is this: $USER1$/check_mbeam_collector -H $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$
What I did here is split each part of the command you provided me into an argument. You could do this cleaner and with less arguments, but this is the best way that I can explain it to you.
In my example...
$USER1$ is the path to the plugin directory, which is /usr/local/nagios/libexec
check_mbeam_collector is the plugin that you installed.
-H $HOSTADDRESS$ is going to be -H jbosserver from your command.
$ARG1$ is going to be -p port from your command.
$ARG2$ is going to be -m java.lang:type=Memory from your command.
$ARG3$ is going to be -a NonHeapMemoryUsage from your command.
$ARG4$ is going to be -w 10 from your command.
$ARG5$ is going to be -c 30 from your command.
This is the best way that I can explain how it breaks down.
For Example...
./check_mbean_collector -H jbosseserver -p port -m java.lang:type=Memory -a NonHeapMemoryUsage -w 10 -c 30
Command:
Code: Select all
define command {
command_name check_mbeam
command_line $USER1$/check_mbeam_collector -H $HOSTADDRESS$ -p $ARG1$ -m '$ARG2$' $ARG3$ $ARG4$ $ARG5$
}
Code: Select all
check_command check_mbeam!port! java.lang:type=Memory!NonHeapMemoryUsage!10!30This is kind of messy, but I'll walk through my thought process here, since I don't have anything jboss spun up to test against right now. This should give you a better idea of how to write service checks and commands in the future as well.
The command you provided me with is this: ./check_mbean_collector -H jbosseserver -p port -m java.lang:type=Memory -a NonHeapMemoryUsage -w 10 -c 30
The command_line I provided you with is this: $USER1$/check_mbeam_collector -H $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$
What I did here is split each part of the command you provided me into an argument. You could do this cleaner and with less arguments, but this is the best way that I can explain it to you.
In my example...
$USER1$ is the path to the plugin directory, which is /usr/local/nagios/libexec
check_mbeam_collector is the plugin that you installed.
-H $HOSTADDRESS$ is going to be -H jbosserver from your command.
$ARG1$ is going to be -p port from your command.
$ARG2$ is going to be -m java.lang:type=Memory from your command.
$ARG3$ is going to be -a NonHeapMemoryUsage from your command.
$ARG4$ is going to be -w 10 from your command.
$ARG5$ is going to be -c 30 from your command.
This is the best way that I can explain how it breaks down.
Former Nagios Employee.
me.
me.
-
lafargeuser
- Posts: 341
- Joined: Thu Sep 27, 2012 12:23 am
Re: How to monitor Jboss application
We are able to get output using command line with root access. But using nagios user we are getting an below error. and i guess nagiosxi use nagios user to execute command . please help here
CRITICAL - cannot connect to 192.168.5.55:1521. install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC
contains: /usr/local/nagios/libexec /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl
CRITICAL - cannot connect to 192.168.5.55:1521. install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC
contains: /usr/local/nagios/libexec /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl
Re: How to monitor Jboss application
What are your permissions on the plugin?lafargeuser wrote:We are able to get output using command line with root access. But using nagios user we are getting an below error. and i guess nagiosxi use nagios user to execute command . please help here
CRITICAL - cannot connect to 192.168.5.55:1521. install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC
contains: /usr/local/nagios/libexec /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl
Code: Select all
ls -l /usr/local/nagios/libexecFormer Nagios Employee.
me.
me.