{"id":517,"date":"2014-06-17T16:22:42","date_gmt":"2014-06-17T14:22:42","guid":{"rendered":"http:\/\/www.orlio.eu\/?p=517"},"modified":"2014-06-17T16:23:47","modified_gmt":"2014-06-17T14:23:47","slug":"%d0%bc%d0%be%d0%bd%d0%b8%d1%82%d0%be%d1%80%d0%b8%d0%bd%d0%b3-%d0%bd%d0%b0-%d0%be%d0%bf%d1%80%d0%b5%d0%b4%d0%b5%d0%bb%d0%b5%d0%bd-%d1%81%d1%82%d1%80%d0%b8%d0%bd%d0%b3-%d0%b2-%d1%81%d0%b0%d0%b9%d1%82","status":"publish","type":"post","link":"https:\/\/www.orlio.eu\/?p=517","title":{"rendered":"\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0441\u0442\u0440\u0438\u043d\u0433 \u0432 \u0441\u0430\u0439\u0442 \u0441 nagios"},"content":{"rendered":"<p><code><br \/>\n1. cd \/usr\/local\/nagios\/etc\/objects<\/p>\n<p>2. \u0422\u044a\u0440\u0441\u0438\u043c \u0434\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f\u0442\u0430 \u043d\u0430 check_http. \u0412 99% \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0438\u0442\u0435 \u0441\u0442\u043e\u0438 \u0432\u044a\u0432 \u0444\u0430\u0439\u043b\u0430 commands.cfg. \u0414\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f\u0442\u0430 \u043d\u0430 check_http \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0438\u0437\u0433\u043b\u0435\u0436\u0434\u0430 \u0433\u043e\u0440\u0435-\u0434\u043e\u043b\u0443 \u0442\u0430\u043a\u0430:<\/p>\n<p>define command {<br \/>\n    command_name  check_http<br \/>\n    command_line  $USER1$\/check_http -I $HOSTADDRESS$ $ARG1$<br \/>\n}<\/p>\n<p>3. \u0414\u043e\u0431\u0430\u0432\u044f\u043c\u0435 \u043d\u043e\u0432\u0430 \u0434\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f \u043a\u0430\u0442\u043e \u0442\u0430\u0437\u0438 \u043f\u043e-\u0434\u043e\u043b\u0443. (-s) \u0435 \u0440\u0430\u0437\u043b\u0438\u043a\u0430\u0442\u0430: \u0438 \u0438\u043c\u0435\u0442\u043e \u043d\u0430 command_name<\/p>\n<p>define command {<br \/>\n    command_name  check_http_content<br \/>\n    command_line  $USER1$\/check_http -I $HOSTADDRESS$ -s $ARG1$<br \/>\n}<\/p>\n<p>4. \u0414\u0435\u0444\u0438\u043d\u0438\u0440\u0430\u043c\u0435 \u0445\u043e\u0441\u0442\u0430, \u043a\u043e\u0439\u0442\u043e \u0449\u0435 \u0435 \u043f\u043e\u0434 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433<\/p>\n<p>define host {<br \/>\n    use        linux-server<br \/>\n    host_name  host_name_for_monitoring<br \/>\n    alias      host_name_for_monitoring<br \/>\n    address    XXX.XXX.XXX.XXX<br \/>\n}<\/p>\n<p>5. \u0421\u043b\u0430\u0433\u0430\u043c\u0435 \u043d\u043e\u0432\u0438\u044f\u0442 service, \u043a\u043e\u0439\u0442\u043e \u0434\u0435\u0444\u0438\u043d\u0438\u0440\u0430\u0445\u043c\u0435 check_http_content. \u0412 \u0441\u043b\u0443\u0447\u0430\u044f \u0449\u0435 \u043f\u0440\u0430\u0432\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0430\u043b\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u043d\u0430\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0435 \u043d\u0430\u043b\u0438\u0447\u0435\u043d \u0441\u0442\u0440\u0438\u043d\u0433\u0430 orlio<\/p>\n<p>define service {<br \/>\n    use                  generic-service<br \/>\n    host_name            host_name_for_monitoring<br \/>\n    service_description  HTTP-content<br \/>\n    check_command        check_http_content!orlio<br \/>\n}<br \/>\n6. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0432\u0430\u043c\u0435 \u0437\u0430 \u0433\u0440\u0435\u0448\u043a\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0438 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u043c\u0435:<\/p>\n<p># \/usr\/local\/nagios\/bin\/nagios -v \/usr\/local\/nagios\/etc\/nagios.cfg<br \/>\n# \/etc\/init.d\/nagios restart<\/p>\n<p>* \u0414\u0440\u0443\u0433\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u0438 \u043e\u043f\u0446\u0438\u0438 \u0441\u0430 -e \u0438\u043b\u0438 --expect , \u043c\u043e\u0436\u0435 \u0434\u0430 \u0437\u0430\u0434\u0430\u0434\u0435\u043c \u0441\u0442\u0440\u0438\u043d\u0433\u043e\u0432\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438 \u0441\u044a\u0441 \u0437\u0430\u043f\u0435\u0442\u0430\u0439\u043a\u0430, \u0438\u043c\u0430 \u0438 \u0434\u0440\u0443\u0433\u0438 \u043e\u043f\u0446\u0438\u0438 -r \u043f\u043e\u0434\u0434\u044a\u0440\u0436\u0430 regular expression \u0438  --invert-regex<br \/>\n\u0422\u043e\u0432\u0430 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0431\u044a\u0434\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u0434\u0430 \u0441\u0435 \u0441\u043b\u0435\u0434\u0438 \u0434\u0430\u043b\u0438 \u0434\u0430\u0434\u0435\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u0441\u0430\u0439\u0442 \u0438 \u0442.\u043d. \u043d\u0435 \u0441\u0430 \u0434\u0435\u0444\u0435\u0439\u0441\u043d\u0430\u0442\u0438.<\/p>\n<p>* host_name_for_monitoring \u0441\u0435 \u0437\u0430\u043c\u0435\u0441\u0442\u0432\u0430 \u0441 hostname-\u0430, \u043d\u0430 \u043a\u043e\u0439\u0442\u043e \u0438\u0441\u043a\u0430\u043c\u0435 \u0434\u0430 \u043f\u0440\u0430\u0432\u0438\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433<\/p>\n<p>* XXX.XXX.XXX.XXX - \u0437\u0430\u043c\u0435\u0441\u0442\u0432\u0430\u043c\u0435 \u0441 IP \u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0430 hosta, \u043a\u043e\u0439\u0442\u043e \u0449\u0435 \u0435 \u043f\u043e\u0434 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433.<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. cd \/usr\/local\/nagios\/etc\/objects 2. \u0422\u044a\u0440\u0441\u0438\u043c \u0434\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f\u0442\u0430 \u043d\u0430 check_http. \u0412 99% \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0438\u0442\u0435 \u0441\u0442\u043e\u0438 \u0432\u044a\u0432 \u0444\u0430\u0439\u043b\u0430 commands.cfg. \u0414\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f\u0442\u0430 \u043d\u0430 check_http \u0442\u0440\u044f\u0431\u0432\u0430 &hellip; <a href=\"https:\/\/www.orlio.eu\/?p=517\" class=\"more-link\">More <span class=\"screen-reader-text\">\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0441\u0442\u0440\u0438\u043d\u0433 \u0432 \u0441\u0430\u0439\u0442 \u0441 nagios<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[19],"tags":[],"_links":{"self":[{"href":"https:\/\/www.orlio.eu\/index.php?rest_route=\/wp\/v2\/posts\/517"}],"collection":[{"href":"https:\/\/www.orlio.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.orlio.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.orlio.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.orlio.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=517"}],"version-history":[{"count":2,"href":"https:\/\/www.orlio.eu\/index.php?rest_route=\/wp\/v2\/posts\/517\/revisions"}],"predecessor-version":[{"id":519,"href":"https:\/\/www.orlio.eu\/index.php?rest_route=\/wp\/v2\/posts\/517\/revisions\/519"}],"wp:attachment":[{"href":"https:\/\/www.orlio.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.orlio.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.orlio.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}