{"id":6309,"date":"2021-04-07T12:44:00","date_gmt":"2021-04-07T07:14:00","guid":{"rendered":"https:\/\/www.skynats.com\/?p=6309"},"modified":"2022-12-13T12:34:49","modified_gmt":"2022-12-13T07:04:49","slug":"apply-configuration-fails-in-nagios-server","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/apply-configuration-fails-in-nagios-server\/","title":{"rendered":"How to Apply Configuration Fails in Nagios Server"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before we drive to the solution part, let&#8217;s have a glance at the reason that cause an error.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This Blog will drive you to how to apply configuration fails in the Nagios server. If you need any assistance to fix the error, you can take&nbsp;our <span class=\"has-inline-color has-primary-color\">technical team support<\/span>&nbsp;to be done on your behalf.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s have a look at the cause of the error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An error message will be displayed on the screen when apply configuration fails.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Backend login to the Core Config Manager failed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While you try to apply the configuration to Nagios core a pop-up error message will be displayed on the screen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Monitoring engine configuration files have been rolled back to their last known good checkpoint.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The main reason could be the Nagios XI server which is not able to resolve the &#8220;localhost&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What to do when Apply Configuration fails in Nagios<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this, you need to open an SSH session to the Nagios XI server. then execute the following commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>su nagios\ncd \/usr\/local\/nagiosxi\/scripts\n.\/reconfigure_nagios.sh\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Output.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>URL: http:\/\/localhost\/nagiosxi\/includes\/components\/ccm\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">CMDLINE<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/bin\/wget --save-cookies nagiosql.cookies --keep-session-cookies http:\/\/localhost\/nagiosxi\/includes\/components\/ccm\/ --no-check-certificate --post-data \n'submit=Login&amp;hidelog=true&amp;loginSubmitted=true&amp;username=nagiosxi&amp;password=n@gweb' -O nagiosql.login--2016-08-03 10:10:46-- http:\/\/localhost\/nagiosxi\/includes\/components\/ccm\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Resolving localhost&#8230; failed: Name or service not known.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget: unable to resolve host address \u201clocalhost\u201d<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">NAGIOSQL LOGIN FAILED!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run the command to see the contents of the \/etc\/hosts file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/etc\/hosts<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4 xi-c6x-x64\n::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 xi-c6x-x64\nHere you can see no\" localhost\" entries where it has a similar entry but not the \"localhost\" entries at all.\nSo we edit \/etc\/hosts file and ensure the localhost entries in it. For example, we make the below changes in the file.\n127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4 localhost xi-c6x-x64\n::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost xi-c6x-x64\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Make the necessary changes and try &#8220;Apply configuration&#8221; from Core Configuration Manager, most probably the problem must be resolved.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Conclusion<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In brief, the main cause for the error is the Nagios XI server which is unable to resolve the &#8220;localhost&#8221;.Follow the steps to resolve the error or you can take our <a href=\"https:\/\/www.skynats.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"color:#0270a0\" class=\"has-inline-color\">technical team support<\/span><\/a> to fix the problem on your behalf.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before we drive to the solution part, let&#8217;s have a glance at the reason that cause an error.&nbsp; This Blog will drive you to how to apply configuration fails in the Nagios server. If you need any assistance to fix the error, you can take&nbsp;our technical team support&nbsp;to be done on your behalf.&nbsp; Let&#8217;s have [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[310,311],"class_list":["post-6309","post","type-post","status-publish","format-standard","hentry","category-blog","tag-nagios","tag-nagiosserver"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=6309"}],"version-history":[{"count":0,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6309\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=6309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=6309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=6309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}