ericbla / check_jstat Goto Github PK
View Code? Open in Web Editor NEWA Nagios plugin to get memory statistics of a Java application using jstat
License: GNU Lesser General Public License v2.1
A Nagios plugin to get memory statistics of a Java application using jstat
License: GNU Lesser General Public License v2.1
When /bin/sh used, script reports:
check_jstat.sh: 28: /usr/local/lib/nagios/plugins/check_jstat.sh: Syntax error: "(" unexpected
It should be '/bin/bash' in shebang.
Thanks.
When calculating the heapmx I believe the calculation should be adding $ygcmx + $ogcmx. When running this we are getting a false positive error stating we are using 147% of heap.
It seems that performance data is not in the expected 'Nagios Plugins' format, which is:
'label'=value[UOM];[warn];[crit];[min];[max]
https://www.monitoring-plugins.org/doc/guidelines.html#AEN200
http://docs.icinga.org/latest/en/perfdata.html#formatperfdata
This makes it hard to graph performance data with 'standard' tools (like pnp4nagios).
I don't see a need for PID in performance data output, so I would suggest this format (split into lines here for better view):
heap=heap-size-used(Bytes)
heap_max=heap-max-size(Bytes)
heap_ratio=%ratio;warning-threshold-%ratio;critical-threshold-%ratio
perm=perm-size-used(Bytes)
perm_max=perm-max-size(Bytes)
perm_ratio=%ratio;warning-threshold-%ratio;critical-threshold-%ratio
In JDK 8, jstat display Metaspace's statistics, but not PermGen's.
Hi
i want to monitor just Java service ps -aux | grep java
when i tried to run this plugin i got this message plz help me out what is the complete command
plugins]# ./check_jstat.sh -s Java
/var/run/Java.pid not found
Locally on the host works ok. When running remotely via nrpe on the monitoring server, the nagiosa shows: CRITICAL: process pid [] seems not to be a JAVA application
cat /etc/nagios/nrpe.d/check_SupportedKafka_memory.cfg
command[check_supportedkafka]=/usr/bin/sudo /etc/nagios/check.d/check_jstat.sh -j SupportedKafka -w 85 -c 95
su - nagios -c "/usr/bin/sudo /etc/nagios/check.d/check_jstat.sh -j SupportedKafka -w 85 -c 95"
OK: jstat process SupportedKafka alive|pid=2979 heap=258802;2097152;12;85;95 perm=46930;1091584;4;85;95
i have in sudoers files
Defaults:nagios !requiretty
nagios ALL=(ALL) NOPASSWD: /etc/nagios/check.d/check_jstat.sh
a try
nagios ALL=(root) NOPASSWD: /etc/nagios/check.d/check_jstat.sh
and the same result :(
edit:
I did a simple test - a check calling jps only. Locally, with sudo, he gives everything. After nrpe remotely only PID jps.
Maybe something with java or a new ubuntu?
Testing out the plugin and nagios is not accepting the input. Constantly getting 'CRITICAL: Can't get GC statistics' though I've edited the sudoers file. Any suggestions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.