{"id":273,"date":"2013-03-02T17:48:59","date_gmt":"2013-03-02T16:48:59","guid":{"rendered":"http:\/\/blog.rabahi.net\/?page_id=273"},"modified":"2014-08-04T17:32:10","modified_gmt":"2014-08-04T15:32:10","slug":"nagios","status":"publish","type":"page","link":"https:\/\/blog.rabahi.net\/?page_id=273","title":{"rendered":"Nagios \/ NDOutils"},"content":{"rendered":"<p>Centreon can link with multiple Nagios.<br \/>\nThey speak throw NDOutils.<br \/>\nThe following configuration shows how to configure Nagios and NDOutils to communicate with a local Centreon.<\/p>\n<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#Nagios\"><span class=\"toc_number toc_depth_1\">1<\/span> Nagios<\/a><ul><li><a href=\"#Prerequiste\"><span class=\"toc_number toc_depth_2\">1.1<\/span> Prerequiste<\/a><\/li><li><a href=\"#Installation\"><span class=\"toc_number toc_depth_2\">1.2<\/span> Installation<\/a><\/li><\/ul><\/li><li><a href=\"#NDOutils\"><span class=\"toc_number toc_depth_1\">2<\/span> NDOutils<\/a><ul><li><a href=\"#Link_with_centreon\"><span class=\"toc_number toc_depth_2\">2.1<\/span> Link with centreon<\/a><\/li><li><a href=\"#Troubleshooting\"><span class=\"toc_number toc_depth_2\">2.2<\/span> Troubleshooting<\/a><ul><li><a href=\"#ndomod_Still_unable_to_reconnect_to_data_sink\"><span class=\"toc_number toc_depth_3\">2.2.1<\/span> ndomod: Still unable to reconnect to data sink<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/div>\n<h1><span id=\"Nagios\">Nagios<\/span><\/h1>\n<h2><span id=\"Prerequiste\">Prerequiste<\/span><\/h2>\n<p>I assume that you have a Centos installation.<\/p>\n<h2><span id=\"Installation\">Installation<\/span><\/h2>\n<p>You can copy\/paste this script and use it to configure automatically your server.<\/p>\n<pre class=\"bash\" style=\"font-family:monospace;\"><ol><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #000000;\">404<\/span>: Not Found<\/div><\/li><\/ol><\/pre>\n<p>That&#8217;s all \ud83d\ude42<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.rabahi.net\/wp-content\/uploads\/2013\/03\/Administration-\u2013-Nagios.png\" alt=\"Administration \u2013 Nagios\" width=\"1040\" height=\"423\" class=\"alignnone size-full wp-image-347\" \/><\/p>\n<h1><span id=\"NDOutils\">NDOutils<\/span><\/h1>\n<p>Install NDOutils:<\/p>\n<pre class=\"bash\" style=\"font-family:monospace;\"><ol><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #000000;\">404<\/span>: Not Found<\/div><\/li><\/ol><\/pre>\n<h2><span id=\"Link_with_centreon\">Link with centreon<\/span><\/h2>\n<p>In \/etc\/nagios\/ndomod.cfg, check you have theses parameters<\/p>\n<pre lang=\"init\">\r\ninstance_name=Central\r\noutput_type=tcpsocket\r\noutput=localhost\r\ntcp_port=5668\r\noutput_buffer_items=5000\r\n<\/pre>\n<p>And check you have the same values in Centreon : Configuration -> Centreon -> ndomod.cfg<\/p>\n<p>In \/etc\/nagios\/ndo2db.cfg, check you have theses parameters<\/p>\n<pre lang=\"init\">\r\nndo2db_user=nagios\r\nndo2db_group=nagios\r\n\r\nsocket_type=tcp\r\nsocket_name=\/var\/run\/ndo.sock\r\ntcp_port=5668\r\n\r\ndb_servertype=mysql\r\ndb_host=localhost\r\ndb_name=centreon_status\r\ndb_port=3306\r\ndb_prefix=nagios_\r\ndb_user=centreon\r\ndb_pass=centreon\r\n<\/pre>\n<p>And check you have the same values in Centreon : Configuration -> Centreon -> ndo2db.cfg<\/p>\n<p>In \/etc\/nagios\/nagios.cfg, configure blockers:<\/p>\n<pre lang=\"ini\">\r\nevent_broker_options=-1\r\nbroker_module=\/usr\/lib64\/nagios\/brokers\/ndomod.so config_file=\/etc\/nagios\/ndomod.cfg\r\n<\/pre>\n<p>And check you have the same values in Centreon : Configuration -> Monitoring Engines -> main.cfg (tab Data)<\/p>\n<p>Now restart services:<\/p>\n<pre lang=\"bash\">\r\n\/etc\/init.d\/ndo2db start\r\n\/etc\/init.d\/nagios restart\r\n<\/pre>\n<h2><span id=\"Troubleshooting\">Troubleshooting<\/span><\/h2>\n<h3><span id=\"ndomod_Still_unable_to_reconnect_to_data_sink\">ndomod: Still unable to reconnect to data sink<\/span><\/h3>\n<p>ndo2db process do not manage to access to ndo2db.cgf file. Execute the following command:<\/p>\n<pre lang=\"bash\">\r\nchown apache:apache \/etc\/nagios\/ -R\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Centreon can link with multiple Nagios. They speak throw NDOutils. The following configuration shows how to configure Nagios and NDOutils to communicate with a local Centreon. Contents1 Nagios1.1 Prerequiste1.2 Installation2 NDOutils2.1 Link with centreon2.2 Troubleshooting2.2.1 ndomod: Still unable to reconnect to data sink Nagios Prerequiste I assume that you have a Centos installation. Installation You [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":271,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-273","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=273"}],"version-history":[{"count":18,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/273\/revisions"}],"predecessor-version":[{"id":1011,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/273\/revisions\/1011"}],"up":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/271"}],"wp:attachment":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}