{"id":39,"date":"2007-10-05T17:16:34","date_gmt":"2007-10-05T22:16:34","guid":{"rendered":"http:\/\/blogs.cae.tntech.edu\/mwr\/2007\/10\/05\/watching-remote-system-status-with-nagios-and-nrpe\/"},"modified":"2024-10-27T14:26:19","modified_gmt":"2024-10-27T14:26:19","slug":"watching-remote-system-status-with-nagios-and-nrpe","status":"publish","type":"post","link":"https:\/\/sites.tntech.edu\/renfro\/2007\/10\/05\/watching-remote-system-status-with-nagios-and-nrpe\/","title":{"rendered":"Watching Remote System Status with Nagios and NRPE"},"content":{"rendered":"<p>I know I&#8217;m late to the game with this part of my setup, but nonetheless, I&#8217;m happy with the results. The short form of it is that Debian&#8217;s <a href=\"http:\/\/packages.debian.org\/etch\/nagios-nrpe-server\">nagios-nrpe-server<\/a> package lets my central Nagios server keep track of my clients&#8217; disk space, load averages, etc. Granted, I already had most of that visible through Ganglia, too, but Ganglia&#8217;s more of a grapher and collector, and not a notifier. I used to keep track of that stuff with <a href=\"http:\/\/spong.sourceforge.net\/\">Spong<\/a>, but when I switched over to Nagios, that functionality went missing. Now, if one of the graduate students (let&#8217;s call him &#8220;new guy&#8221;) fills up 288 GB of \/tmp and tells his advisor &#8220;the program crashed for some reason&#8221;, I won&#8217;t be finding the bloody remains days later when another student asks me why their program won&#8217;t run at all.<\/p>\n<p><a href='http:\/\/sites.tntech.edu\/renfro\/wp-content\/uploads\/sites\/111\/2007\/10\/nrpe-output.png' title='nrpe-output.png'><img src='http:\/\/sites.tntech.edu\/renfro\/wp-content\/uploads\/sites\/111\/2007\/10\/nrpe-output.png' alt='nrpe-output.png' \/><\/a><\/p>\n<p>Puppet and other configuration excerpts follow.<\/p>\n<p>classes\/nagios-nrpe-server.pp:<\/p>\n<pre>\nclass nagios-nrpe-server {\n    # nagios-nrpe-server for remote monitoring\n    package {\n        [ \"nagios-nrpe-server\", \"nagios-plugins\" ]:\n            ensure =&gt; installed;\n    }\n    file {\n        \"\/etc\/nagios\":\n            ensure =&gt; directory,\n            owner  =&gt; root,\n            group  =&gt; root,\n            mode   =&gt; 0755;\n        \"\/etc\/nagios\/nrpe_local.cfg\":\n            source =&gt; \"puppet:\/\/\/files\/apps\/nagios-nrpe-server\/nrpe_local.cfg\";\n    }\n    service {\n        \"nagios-nrpe-server\":\n            ensure    =&gt; running,\n            pattern   =&gt; \"\/usr\/sbin\/nrpe\",\n            subscribe =&gt; File[\"\/etc\/nagios\/nrpe_local.cfg\"],\n            require   =&gt; Package[\"nagios-nrpe-server\"];\n    }\n}\n<\/pre>\n<p>files\/apps\/nagios-nrpe-server\/nrpe_local.cfg:<\/p>\n<pre>\nallowed_hosts=127.0.0.1,NAGIOSIP\ncommand[check_disk_root]=\/usr\/lib\/nagios\/plugins\/check_disk -w 20 -c 10 -p \/\ncommand[check_disk_boot]=\/usr\/lib\/nagios\/plugins\/check_disk -w 20 -c 10 -p \/boot\ncommand[check_disk_tmp]=\/usr\/lib\/nagios\/plugins\/check_disk -w 20 -c 10 -p \/tmp\ncommand[check_disk_var]=\/usr\/lib\/nagios\/plugins\/check_disk -w 20 -c 10 -p \/var\ncommand[check_disk_amanda]=\/usr\/lib\/nagios\/plugins\/check_disk -w 20 -c 10 -p \/opt\/amanda\ncommand[check_disk_home]=\/usr\/lib\/nagios\/plugins\/check_disk -w 20 -c 10 -p \/home\n<\/pre>\n<p>excerpt from \/etc\/nagios2\/conf.d\/hosts.cfg:<\/p>\n<pre>\ndefine service{\n        use                     generic-service\n        host_name               ch226-21, ch226-22, ch226-23, ch226-24, ch226-25, ch226-26, ch226-27, ch226-28, ch226-29, ch226-30, ch226-31, ch226-32\n        service_description     Disk Usage - \/\n        check_command           check_nrpe_1arg!check_disk_root\n        contact_groups  admins\n}\ndefine service{\n        use                     generic-service\n        host_name               ch226-21, ch226-22, ch226-23, ch226-24, ch226-25, ch226-26, ch226-27, ch226-28, ch226-29, ch226-30, ch226-31, ch226-32\n        service_description     Disk Usage - \/tmp\n        check_command           check_nrpe_1arg!check_disk_tmp\n        contact_groups  admins\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I know I&#8217;m late to the game with this part of my setup, but nonetheless, I&#8217;m happy with the results. The short form of it is that Debian&#8217;s nagios-nrpe-server package lets my central Nagios server keep track of my clients&#8217; disk space, load averages, etc. Granted, I already had most of that visible through Ganglia, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/sites.tntech.edu\/renfro\/2007\/10\/05\/watching-remote-system-status-with-nagios-and-nrpe\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Watching Remote System Status with Nagios and NRPE&#8221;<\/span><\/a><\/p>\n","protected":false},"author":87,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7,16],"tags":[],"class_list":["post-39","post","type-post","status-publish","format-standard","hentry","category-debian","category-infrastructures","category-puppet","entry"],"_links":{"self":[{"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":1,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":486,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/posts\/39\/revisions\/486"}],"wp:attachment":[{"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/media?parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/categories?post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.tntech.edu\/renfro\/wp-json\/wp\/v2\/tags?post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}