{"id":400,"date":"2010-09-30T20:16:53","date_gmt":"2010-10-01T00:16:53","guid":{"rendered":"http:\/\/www.xavignu.com\/?p=400"},"modified":"2010-10-01T04:27:37","modified_gmt":"2010-10-01T08:27:37","slug":"playing-around-with-nagios","status":"publish","type":"post","link":"https:\/\/www.xavignu.com\/?p=400","title":{"rendered":"Playing around with Nagios"},"content":{"rendered":"<p>I have been playing around with <a href=\"http:\/\/nagios.org\/\" target=\"_blank\">Nagios<\/a> lately. This is the most widely used monitoring tool. I&#8217;m not going to write another howto, but clarify some things I found missing in the configuration manuals I used. <\/p>\n<p>First you need the <a href=\"http:\/\/www.php.net\" target=\"_blank\">PHP<\/a> module on the <a href=\"http:\/\/www.apache.org\" target=\"_blank\">apache<\/a> server for Nagios to work. Else you will find yourself downloading a phtml file to some directory in your box. This is because of the following files in the nagios directory.<\/p>\n<pre>\r\nxavi@server:~$ sudo find \/nagios\/ -type f -name \"*.php\"\r\n\/nagios\/share\/side.php\r\n\/nagios\/share\/includes\/utils.inc.php\r\n\/nagios\/share\/main.php\r\n\/nagios\/share\/config.inc.php\r\n\/nagios\/share\/index.php\r\nxavi@server:~$ \r\n<\/pre>\n<p>Another issue I found was the with <a href=\"http:\/\/nagios.sourceforge.net\/docs\/3_0\/addons.html\" target=\"_blank\">nrpe<\/a> plugin. This plugin allows us to run commands on remote hosts. Issue is that default compilation values don&#8217;t allow us to pass arguments. To pass arguments from the server to the monitored host it must be compiled with the &#8211;enable-command-args argument when compiling the nrpe source. Another thing that must be done is setting the dont_blame_nrpe to 1 in the nrpe.cfg file.<\/p>\n<pre>\r\ndont_blame_nrpe=1\r\n<\/pre>\n<p>This changes allows us to run checks with arguments remotely. Example:<\/p>\n<pre>\r\nserver:\/nagios\/libexec# .\/check_nrpe -H 212.34.95.23 -c check_procs -a 100 120\r\nPROCS OK: 96 processes\r\nserver:\/nagios\/libexec#\r\n<\/pre>\n<p>Questions and suggestions are always welcome. \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been playing around with Nagios lately. This is the most widely used monitoring tool. I&#8217;m not going to write another howto, but clarify some things I found missing in the configuration manuals I used. First you need the PHP module on the apache server for Nagios to work. Else you will find yourself [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[3],"tags":[20,22,6,52,23,70],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/pTQgt-6s","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts\/400"}],"collection":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=400"}],"version-history":[{"count":0,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts\/400\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}