{"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: #666666; font-style: italic;\">#!\/bin\/bash<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;install tools nagios&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">dnf <span style=\"color: #660033;\">-y<\/span> <span style=\"color: #c20cb9; font-weight: bold;\">install<\/span> nagios nagios-devel nagios-plugins<span style=\"color: #000000; font-weight: bold;\">*<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;enable start nagios on boot&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">systemctl <span style=\"color: #7a0874; font-weight: bold;\">enable<\/span> nagios.service<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;set config owner&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">chown<\/span> nagios:nagios <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span> <span style=\"color: #660033;\">-R<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">service nagios reload<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;check_http get a 403 'forbidden' if index.html is missing. so we create it&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">touch<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>var<span style=\"color: #000000; font-weight: bold;\">\/<\/span>www<span style=\"color: #000000; font-weight: bold;\">\/<\/span>html<span style=\"color: #000000; font-weight: bold;\">\/<\/span>index.html<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">myip<\/span>=<span style=\"color: #000000; font-weight: bold;\">`<\/span><span style=\"color: #c20cb9; font-weight: bold;\">hostname<\/span> -I<span style=\"color: #000000; font-weight: bold;\">`<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;Now meet you here: http:\/\/<span style=\"color: #007800;\">$myip<\/span>\/nagios\/&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;Note, login\/passord is nagiosadmin\/nagiosadmin&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/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: #666666; font-style: italic;\">#!\/bin\/bash<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">dnf <span style=\"color: #660033;\">-y<\/span> <span style=\"color: #c20cb9; font-weight: bold;\">install<\/span> ndoutils ndoutils-mysql<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;update \/etc\/nagios\/ndomod.cfg&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(instance_name=\\).*\/\\1Central\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndomod.cfg<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(output_type=\\).*\/\\1tcpsocket\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndomod.cfg<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(output=\\).*\/\\1localhost\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndomod.cfg<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(tcp_port=\\).*\/\\15668\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndomod.cfg<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(output_buffer_items=\\).*\/\\15000\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndomod.cfg<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;update \/etc\/nagios\/ndo2db.cfg&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">ln<\/span> <span style=\"color: #660033;\">-s<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>var<span style=\"color: #000000; font-weight: bold;\">\/<\/span>run<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndoutils<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndoutils.sock <span style=\"color: #000000; font-weight: bold;\">\/<\/span>var<span style=\"color: #000000; font-weight: bold;\">\/<\/span>run<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo.sock<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(ndo2db_user=\\).*\/\\1nagios\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo2db.cfg<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(ndo2db_group=\\).*\/\\1nagios\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo2db.cfg<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(socket_type=\\).*\/\\1tcp\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo2db.cfg<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(socket_name=\\).*\/\\1\\\/var\\\/run\\\/ndo.sock\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo2db.cfg<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(tcp_port=\\).*\/\\15668\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo2db.cfg<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(db_servertype=\\).*\/\\1mysql\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo2db.cfg<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(db_host=\\).*\/\\1localhost\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo2db.cfg<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(db_port=\\).*\/\\13306\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo2db.cfg<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(db_name=\\).*\/\\1centreon_status\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo2db.cfg<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(db_prefix=\\).*\/\\1nagios_\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo2db.cfg<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(db_user=\\).*\/\\1centreon\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo2db.cfg<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/^\\(db_pass=\\).*\/\\1centreon\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>ndo2db.cfg<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;update \/etc\/nagios\/nagios.cfg&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/event_broker_options=-1\/event_broker_options=-1\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios.cfg<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">sed<\/span> <span style=\"color: #660033;\">-i<\/span> <span style=\"color: #ff0000;\">&quot;s\/#broker_module=\\\/somewhere\\\/module1.o\/broker_module=\\\/usr\\\/lib64\\\/nagios\\\/brokers\\\/ndomod.so config_file=\\\/etc\\\/nagios\\\/ndomod.cfg\/g&quot;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios.cfg<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">chown<\/span> nagios:nagios <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>nagios<span style=\"color: #000000; font-weight: bold;\">\/<\/span> <span style=\"color: #660033;\">-R<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;activate ndo2db at startup and start it&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">systemctl <span style=\"color: #7a0874; font-weight: bold;\">enable<\/span> ndo2db.service<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">systemctl stop ndo2db.service<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">systemctl start ndo2db.service<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">systemctl restart nagios.service<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/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}]}}