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 - Conversion for VirtualBox
Viewed 4905 times since Thu, Jan 28, 2016
Nagios XI - Monitoring Apache Tomcat With XI
Viewed 4450 times since Wed, Jan 27, 2016
Nagios XI - Monitoring VMware Virtualization Using vMA - NWC14
Viewed 6266 times since Thu, Feb 4, 2016
Nagios XI - Installing The AIX Agent
Viewed 7749 times since Wed, Jan 27, 2016
Nagios XI - How to Integrate SNMP Traps With Nagios XI
Viewed 15486 times since Thu, Jan 28, 2016
Enabling Oracle Linux Optional Repository
Viewed 16258 times since Mon, May 14, 2018
Nagios XI - How To Install On Windows Using Hyper-V
Viewed 5263 times since Wed, Jul 19, 2017
Nagios XI - Upgrading Nagios Core
Viewed 8189 times since Fri, Feb 15, 2019
Nagios XI - Using the Negate Plugin
Viewed 6805 times since Thu, Jan 28, 2016
Nagios XI - Adding Windows Disk Usage Checks In XI
Viewed 7106 times since Thu, Jan 14, 2016