sensu-plugins / sensu-plugins-java

Sensu Java Plugins
http://sensu-plugins.io
MIT License
5 stars 25 forks source link

Make it possible to use sudo for check-java-permgen.rb #24

Closed sovaa closed 7 years ago

sovaa commented 7 years ago

The jstat and jps commands may require root access; let check-java-permgen.rb use sudo if told to. Requires the following in /etc/sudoers:

sensu ALL=(ALL) NOPASSWD: /path/to/java/jdk1.8.0_92/bin/jps
sensu ALL=(ALL) NOPASSWD: /path/to/java/jdk1.8.0_92/bin/jstat
majormoses commented 7 years ago

:+1: though it's best to put it into /etc/sudoers.d/sensu to keep things cleaner.