NAME

jmx4perl - JMX acccess tool

SYNOPSIS

jmx4perl

jmx4perl .... --shell http://server:8080/j4p-agent

jmx4perl .... ["info"] <agent-url>

jmx4perl .... list <agent-url>

jmx4perl .... attributes <agent-url>

jmx4perl .... read <mbean-name> <attribute-name> [path] <agent-url>

jmx4perl .... aliases

jmx4perl --help

jmx4perl --version

Options:

--product <id>          Product to use for aliasing (ommits autodetection)
--user <user>           Credential used for authentication
--password <pwd>  
--proxy-user <user>     Authentication information for a proxy
--proxy-password <pwd>
--verbose               Print out more information

DESCRIPTION

jmx4perl is a command line utility for easily accessing an instrumented application server. Before you can use this tool, you need to deploy a small agent application. In the following agent-url is the URL for accessing this agent. See JMX::Jmx4Perl::Manual for details.

You can use jmx4perl in two modes: Directly by providing an agent-url or enter an interactive mode if you ommit the agent-url or provide the the command line options --shell (to be done).

jmx4perl servers also an example of how to use the JMX::Jmx4Perl package. See its documentation for more details on how to embed JMX access into your programs.

NON-INTERACTIVE COMMANDS

info

If you use the non-interactive mode without any command or with info as command, you get a description about the server, including the application server's product name and version. This works by autodetection and only for the supported application servers (see JMX::Jmx4Perl::Manual for a list of supported products). The only argument required is the url which points to the deployed jmx4perl agent.

With --verbose info prints the system properties and runtime arguments as well.

list

List meta data of all registered mbeans on the target application server. This includes attributes and operations along whith their descriptions and parameters (as far as they are provided by mbean's info).

You can provide an inner path as an additional argument as well. See JMX::Jmx4Perl::Request for an explanation about inner pathes (in short, it's some sort of XPath expression which selects only a subset of all MBeans and their values). See JMX::Jmx4Perl, method "list()" for a more rigorous documentation abouting listing of MBeans.

attributes

Show all attributes of all registerd mbeans and their values. For simple scalar values they are shown on one line, for more complex data structures, Data::Dumper is used. Please note, that it is normal, that for certain attributes an error is returned (i.e. when this attribute is not implemented on the server side e.g. or an MXMbean). To see the full server side stacktrace for this errors, use --verbose as command line option

read

Read an JMX attribute's value and print it out. The required arguments are the MBean's name and the attribute's name. Additionally, you can provide a path within the return value to pick a sub-value. See JMX::Jmx4Perl::Request for a detailed explanation of pathes.

For a single value, the value itself is printed (without additional newline), for a more complex data structure, Data::Dumper is used.

aliases

Print out all known aliases. See JMX::Jmx4Perl::Manual for a discussion about aliases. In short, you can use an alias as a shortcut for an MBean's and attribute's name.

SHELL MODE

Some ideas for the interactive mode, which needs still to be implemented:

  • Readline support

  • TAB completion of MBean names, attributes and operations

  • Autodetection of various application servers

  • Reading and writing of attributes

  • Excecution of MBean operations

SEE ALSO

JMX::Jmx4Perl - Entry point for programmatic JMX access which is used by this tool.

check_jmx4perl - a production ready Nagios check using JMX::Jmx4Perl

LICENSE

This file is part of jmx4perl.

Jmx4perl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

jmx4perl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with jmx4perl. If not, see <http://www.gnu.org/licenses/>.

AUTHOR

roland@cpan.org