is it possible to uninstall Nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: is it possible to uninstall Nagios

Post by lmiltchev »

???
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: is it possible to uninstall Nagios

Post by benhank »

PERFECT!!!

You guys are teh bomb!

I got an access denied error at first but then I ran:

Code: Select all

cd /tmp
chmod +x /tmp/uninstall_xi.sh

Code: Select all

 
root@tmp#
root@# ./uninstall_xi.sh
        ==================================
        !! DESTRUCTIVE UNINSTALL NOTICE !!
        ==================================
        WARNING: This script will uninstall

        Nagios
        MySql
        Postgresql

        from this system as well as all data associated with these services.
        This action is irreversible and will result in the removal of
        all Nagios databases, configuration files, log files, and services.

Are you sure you want to continue? [y/N] y
Proceeding with uninstall...
Stopping services...
Stopping nagios: done.
NPCD Stopped.
Stopping ndo2db: done.
removing init files...
Removing users and suduoers...
userdel: user nagios is currently logged in
Removing crontabs...
Removing files...
Removing NagiosQL files...
Removing Apache configs...
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
Removing xinetd configs...
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
Removing Postgres and mysql databases...
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.1.61-4.el6 will be erased
--> Processing Dependency: mysql for package: nagiosxi-deps-2011r3.3-1.noarch
--> Processing Dependency: mysql = 5.1.61-4.el6 for package: mysql-devel-5.1.61-4.el6.x86_64
--> Processing Dependency: mysql = 5.1.61-4.el6 for package: mysql-server-5.1.61-4.el6.x86_64
---> Package postgresql.x86_64 0:8.4.12-1.el6_2 will be erased
--> Processing Dependency: postgresql(x86-64) = 8.4.12-1.el6_2 for package: postgresql-devel-8.4.12-1.el6_2.x86_64
--> Processing Dependency: postgresql(x86-64) = 8.4.12-1.el6_2 for package: postgresql-server-8.4.12-1.el6_2.x86_64
--> Running transaction check
---> Package mysql-devel.x86_64 0:5.1.61-4.el6 will be erased
---> Package mysql-server.x86_64 0:5.1.61-4.el6 will be erased
---> Package nagiosxi-deps.noarch 0:2011r3.3-1 will be erased
---> Package postgresql-devel.x86_64 0:8.4.12-1.el6_2 will be erased
---> Package postgresql-server.x86_64 0:8.4.12-1.el6_2 will be erased
--> Finished Dependency Resolution
base                                                     | 3.7 kB     00:00
cr                                                       | 3.0 kB     00:00
epel/metalink                                            |  11 kB     00:00
epel                                                     | 4.3 kB     00:00
epel/primary_db                                          | 4.8 MB     00:02
extras                                                   | 3.5 kB     00:00
rpmforge                                                 | 1.9 kB     00:00
updates                                                  | 3.5 kB     00:00
updates/primary_db                                       | 3.9 MB     00:04

Dependencies Resolved

================================================================================
 Package          Arch   Version        Repository                         Size
================================================================================
Removing:
 mysql            x86_64 5.1.61-4.el6   @base                             2.4 M
 postgresql       x86_64 8.4.12-1.el6_2 @updates                           14 M
Removing for dependencies:
 mysql-devel      x86_64 5.1.61-4.el6   @base                             387 k
 mysql-server     x86_64 5.1.61-4.el6   @base                              25 M
 nagiosxi-deps    noarch 2011r3.3-1     @/nagiosxi-deps-2011r3.3-1.noarch 0.0
 postgresql-devel x86_64 8.4.12-1.el6_2 @updates                          3.4 M
 postgresql-server
                  x86_64 8.4.12-1.el6_2 @updates                           14 M

Transaction Summary
================================================================================
Remove        7 Package(s)

Installed size: 59 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Erasing    : nagiosxi-deps-2011r3.3-1.noarch                              1/7
  Erasing    : mysql-devel-5.1.61-4.el6.x86_64                              2/7
  Erasing    : mysql-server-5.1.61-4.el6.x86_64                             3/7
warning: /var/log/mysqld.log saved as /var/log/mysqld.log.rpmsave
  Erasing    : postgresql-devel-8.4.12-1.el6_2.x86_64                       4/7
  Erasing    : postgresql-server-8.4.12-1.el6_2.x86_64                      5/7
  Erasing    : postgresql-8.4.12-1.el6_2.x86_64                             6/7
  Erasing    : mysql-5.1.61-4.el6.x86_64                                    7/7

Removed:
  mysql.x86_64 0:5.1.61-4.el6         postgresql.x86_64 0:8.4.12-1.el6_2

Dependency Removed:
  mysql-devel.x86_64 0:5.1.61-4.el6
  mysql-server.x86_64 0:5.1.61-4.el6
  nagiosxi-deps.noarch 0:2011r3.3-1
  postgresql-devel.x86_64 0:8.4.12-1.el6_2
  postgresql-server.x86_64 0:8.4.12-1.el6_2

Complete!
Removing database backup scripts...
        ====================
        UNINSTALL COMPLETED!
        ====================

[root@LkennagiosT01 tmp]#
Now I pride myself on being one greedy basket =D, If you add the script that automates the install of XI and call it "XI_CleanRebuild.SH or something like that" We can all flash back to the seventies and do the John Travola disco in your honor dance in the privacy of our own cubes muhahahah....


either way great job and awesome follow up. You hve just helped me to save a lot of gas and wasted time.

A not e for the fellas who may want to wipe out their nagvis and nagxyz addons this wont to it but it perfectly wipes out xi.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: is it possible to uninstall Nagios

Post by benhank »

benhank wrote:I started the thread, so I will be the first to boldy go where no >insert gender neutral politically correct word here< gone before! ...coughonmytestservercough =K
I was saying that since I asked 1st I would test the uninstall script 1st too. the rest was just a corny joke.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: is it possible to uninstall Nagios

Post by lmiltchev »

Thanks for the feedback...and for bringing back some nice memories from the 70s! :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked