Roland Huß > jmx4perl > cacti_jmx4perl

Download:
jmx4perl-1.10.tar.gz

Annotate this POD

CPAN RT

Open  3
View/Report Bugs
Source  

NAME ^

cacti_jmx4perl - Script for a Cacti Data Input Method

SYNOPSIS ^

 # Print out used heap memory (absolute values)
 cacti_jmx4perl --url http://localhost:8888/jolokia \
                --name memory_used \
                --mbean java.lang:type=Memory \
                --attribute HeapMemoryUsage \ 
                --path used 

 # Print out relative value
 cacti_jmx4perl --url http://localhost:8888/jolokia \
                --alias MEMORY_HEAP_USED \
                --base MEMORY_HEAP_MAX 

 # Use predefined checks in a configuration file with a server alias Server
 # alias is 'webshop', output is the number of requests per minute for the servlet
 # 'socks_shop'
 cacti_jmx4perl --config /etc/nagios/check_jmx4perl/tomcat.cfg
                --server webshop \
                --check tc_servlet_requests \
                socks_shop
 
 # Number of threads started within a minute
 cacti_jmx4perl --url http://localhost:8888/jolokia \
                --alias THREAD_COUNT_STARTED \
                --delta 60 

 # Proxy-mode usage
 cacti_jmx4perl --url http://localhost:8888/jolokia \
                --alias MEMORY_HEAP_USED \
                --critical 10000000 \
                --target service:jmx:rmi:///jndi/rmi://bhut:9999/jmxrmi

DESCRIPTION ^

This script is a simplified version of check_jmx4perl which does not check for thresshold and prints out the measured data in a simplified format, which can be used by Cacti (www.cacti.net). For single checks, it simply returns the number measured, for multi checks, the numbers are returned with labels and space separated. See "Multichecks" in check_jmx4perl for more about multichecks.

Example:

  $ cacti_jmx4perl --url http://localhost:8080/jolokia --alias MEMORY_HEAP_USED
  15308376

  $ cacti_jmx4perl -u http://localhost:8080/jolokia --config config/memory.cfg --check memory
  Heap:15341168 Non-Heap:19450312

For the possible options and the configuration syntax, please refer to the documentation of check_jmx4perl. Certain options are not available for this Cacti Script, since they make no sense here:

--warning
--critical
--unit
--null
--string
--numeric
--label

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

syntax highlighting: