{"id":70,"date":"2010-08-12T02:14:05","date_gmt":"2010-08-11T18:14:05","guid":{"rendered":"http:\/\/cowman-chiang.no-ip.org\/wordpress\/?p=70"},"modified":"2023-10-31T15:48:03","modified_gmt":"2023-10-31T07:48:03","slug":"nagios","status":"publish","type":"post","link":"https:\/\/cowmanchiang.me\/wp\/?p=70","title":{"rendered":"Nagios"},"content":{"rendered":"<p>\u4e0a\u6b21\u78b0Nagios\u597d\u50cf\u662f\u56db\u6708\u4efd\u7684\u6642\u5019<br \/>\n\u4eca\u5929\u53c8\u6478\u4e86\u4e00\u4e0b<br \/>\n\u9806\u5e36\u89e3\u6c7a\u8001\u5996\u63d0\u7684<code>\"CHECK_NRPE: Error - Could not complete SSL handshake.\"<\/code>\u554f\u984c<\/p>\n<p>\u56e0\u70baNagios\u9810\u8a2d\u662f\u8d70SSL\u53bbpooling\u53d6\u5f97\u5404\u4e3b\u6a5f\u7684\u8cc7\u8a0a<br \/>\n\u8a18\u5f97\u525b\u958b\u59cb\u7684\u6642\u5019\u6211\u90fd\u6703\u4e0b<code>\"-n\"<\/code>\u7684\u53c3\u6578\u4f86\u898f\u907fSSL<\/p>\n<p><!--more--><\/p>\n<p><code><br \/>\n\/usr\/local\/nagios\/libexec\/check_nrpe -n -H \u4e3b\u6a5f\u4f4d\u7f6e -c \u6307\u4ee4<br \/>\n<\/code><\/p>\n<p>\u4e3b\u8981\u539f\u56e0\u9084\u662f\u56e0\u70ba\u4ed6\u5c31\u662f\u4e0d\u904e\u554a<br \/>\n\u4eca\u5929\u6709\u6bd4\u8f03\u4ed4\u7d30\u770b\u4e86\u4e00\u4e0bnrpe.cfg<br \/>\n<code><\/p>\n<h1>ALLOWED HOST ADDRESSES<\/h1>\n<h1>This is an optional comma-delimited list of IP address or hostnames<\/h1>\n<h1>that are allowed to talk to the NRPE daemon.<\/h1>\n<p>#<\/p>\n<h1>Note: The daemon only does rudimentary checking of the client's IP<\/h1>\n<h1>address. I would highly recommend adding entries in your \/etc\/hosts.allow<\/h1>\n<h1>file to allow only the specified host to connect to the port<\/h1>\n<h1>you are running this daemon on.<\/h1>\n<p>#<\/p>\n<h1><span style=\"color: #ff0000;\">NOTE: This option is ignored if NRPE is running under either inetd or xinetd<\/span><\/code><\/h1>\n<p><code>allowed_hosts=127.0.0.1,120.101.10.202<br \/>\n<\/code><\/p>\n<p>\u6240\u4ee5\u53ea\u597d\u53bb\u7de8\u8f2f\/etc\/xinetd.d\/nrpe<\/p>\n<p><code>service nrpe<br \/>\n{<br \/>\nflags = REUSE<br \/>\nsocket_type = stream<br \/>\nport = 5666<br \/>\nwait = no<br \/>\nuser = nagios<br \/>\ngroup = nagios<br \/>\nserver = \/usr\/local\/nagios\/bin\/nrpe<br \/>\nserver_args = -c \/usr\/local\/nagios\/etc\/nrpe.cfg --inetd<br \/>\nlog_on_failure += USERID<br \/>\ndisable = no<br \/>\n<span style=\"color: #ff0000;\">only_from = 127.0.0.1 120.101.10.202<\/span><br \/>\n}<br \/>\n<\/code><\/p>\n<p>\u63a5\u8457\u5c31\u91cd\u8dd1\u76e3\u63a7\u7aef\u7684nagios\u770b\u6709\u90a3\u4e9b\u554f\u984c\u9700\u8981\u89e3\u6c7a<br \/>\n\u6211\u4e3b\u8981\u662f\u56e0\u70ba\u4e4b\u524d\u90fd\u6703\u591a\u5e36\u4e00\u500b<code>\"-n\"<\/code>\u7684\u53c3\u6578<br \/>\n\u6240\u4ee5\u90fd\u5fc5\u9808\u8981\u62ff\u6389<br \/>\n\u7136\u5f8c\u770b\u770b\u8a2d\u5b9a\u6a94\u6709\u6c92\u6709\u554f\u984c<br \/>\n<code>\/usr\/local\/nagios\/bin\/nagios -v \/usr\/local\/nagios\/etc\/nagios.cfg<\/code><br \/>\n\u78ba\u5b9a\u6c92\u554f\u984c\u5f8c\u518d\u8b93nagios\u5403\u9032\u65b0\u7684\u8a2d\u5b9a<br \/>\n<code>\/usr\/local\/nagios\/bin\/nagios -d \/usr\/local\/nagios\/etc\/nagios.cfg<\/code><br \/>\n\u63a5\u8457\u91cd\u555fnagios\u670d\u52d9<br \/>\n<code>service nagios restart<\/code><\/p>\n<p>\u5927\u81f4\u4e0a\u61c9\u8a72\u5c31\u6b63\u5e38\u4e86<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0a\u6b21\u78b0Nagios\u597d\u50cf\u662f\u56db\u6708\u4efd\u7684\u6642\u5019 \u4eca\u5929\u53c8\u6478\u4e86\u4e00\u4e0b \u9806\u5e36\u89e3\u6c7a\u8001\u5996\u63d0\u7684&#8221;CHECK_NRPE: Error &#8211; Could not complete SSL handshake.&#8221;\u554f\u984c \u56e0\u70baNagios\u9810\u8a2d\u662f\u8d70SSL\u53bbpooling\u53d6\u5f97\u5404\u4e3b\u6a5f\u7684\u8cc7\u8a0a \u8a18\u5f97\u525b\u958b\u59cb\u7684\u6642\u5019\u6211\u90fd\u6703\u4e0b&#8221;-n&#8221;\u7684\u53c3\u6578\u4f86\u898f\u907fSSL<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63],"tags":[],"class_list":["post-70","post","type-post","status-publish","format-standard","hentry","category-nagios"],"_links":{"self":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=70"}],"version-history":[{"count":1,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":2308,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/70\/revisions\/2308"}],"wp:attachment":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}