Difference between revisions of "Change default check mem function nagios"

From James Dooley's Wiki
Jump to: navigation, search
 
Line 5: Line 5:
 
==Code==
 
==Code==
  
<code>[bash,n]
+
<source lang='bash'>
 
wget https://raw.github.com/justintime/nagios-plugins/master/check_mem/check_mem.pl -O /usr/local/nagios/libexec/check_mem.pl
 
wget https://raw.github.com/justintime/nagios-plugins/master/check_mem/check_mem.pl -O /usr/local/nagios/libexec/check_mem.pl
  
Line 13: Line 13:
  
 
service xinetd restart
 
service xinetd restart
</code>
+
</source>

Latest revision as of 14:35, 25 March 2014

Code to change out the check_mem script in nagios to use check_mem.pl instead. Right now values are hard coded, will continue to look in to getting this to accept values from nrpe.

Code

wget https://raw.github.com/justintime/nagios-plugins/master/check_mem/check_mem.pl -O /usr/local/nagios/libexec/check_mem.pl

chmod +x /usr/local/nagios/libexec/check_mem.pl

echo "command[check_mem]=/usr/local/nagios/libexec/check_mem.pl -w 15 -c 5 -f -C" >> /usr/local/nagios/etc/nrpe.cfg

service xinetd restart