Home » Categories » Multiple Categories

Nagios XI - Restoring Default Configuration

Overview

This guide explains how to restore the monitoring configuration to the defaults as shipped with XI. You may want to perform this if you've somehow messed up your configurations irreparably, or simply want to reset a test system.

 
Warning

 This is a destructive process and your existing monitoring configuration will be lost after performing this action.

 

Restoring Default Configuration

Open an SSH or console session to your Nagios XI server and execute the following:

cd /usr/local/nagiosxi/scripts/
./restore_defaults.sh

 

The following output is produced:

URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.login--2016-01-27 10:38:12--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'

    [ <=>                                                                        ] 33,954      --.-K/s   in 0.01s   

2016-01-27 10:38:12 (2.95 MB/s) - `nagiosql.login' saved [33954]

LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
RESETTING PERMS
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.login--2016-01-27 10:38:12--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'

    [ <=>                                                                        ] 33,954      --.-K/s   in 0.01s   

2016-01-27 10:38:12 (3.10 MB/s) - `nagiosql.login' saved [33954]

LOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2016-01-27 10:38:12--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.export.monitoring'

    [ <=>                                                                        ] 15,226      --.-K/s   in 0.1s    

2016-01-27 10:38:12 (101 KB/s) - `nagiosql.export.monitoring' saved [15226]

WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
    Checked 8 services.
    Checked 1 hosts.
    Checked 1 host groups.
    Checked 0 service groups.
    Checked 2 contacts.
    Checked 2 contact groups.
    Checked 109 commands.
    Checked 7 time periods.
    Checked 0 host escalations.
    Checked 0 service escalations.
Checking for circular paths...
    Checked 1 hosts
    Checked 0 service dependencies
    Checked 0 host dependencies
    Checked 7 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...
Stopping nagios: done.
Starting nagios: done.

 

Once complete Nagios XI (monitoring configurations) will appear just like it did when it was first installed.

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

3.5 (2)
Article Rating (2 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios XI - Core Configuration Mananger Mass Changes
Viewed 5972 times since Tue, Jan 26, 2016
Nagios XI - Installation Options
Viewed 7558 times since Sun, Dec 21, 2014
Nagios XI - Monitoring VMware Virtualization Using vMA - NWC14
Viewed 6257 times since Thu, Feb 4, 2016
Nagios XI - How To Install On Windows Using vSphere
Viewed 4067 times since Wed, Jul 19, 2017
Nagios XI - Installing Nagios XI In An Offline Environment
Viewed 6214 times since Thu, Feb 18, 2016
Nagios XI - Core Config Manager - Bulk Modification Tool
Viewed 7009 times since Sun, Jul 30, 2017
Nagios XI - Problems with $ Signs in the Check Command
Viewed 7263 times since Tue, Jan 26, 2016
Enabling Oracle Linux Optional Repository
Viewed 16230 times since Mon, May 14, 2018
Nagios XI - How To Monitor Website Defacement With Nagios XI
Viewed 4273 times since Thu, Jan 28, 2016
Nagios XI - Automated Host Management In Nagios XI
Viewed 5787 times since Wed, Jan 27, 2016