linux-nrpe-agent uninstall / remove

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Nags007
Posts: 58
Joined: Wed Mar 08, 2017 12:32 pm

linux-nrpe-agent uninstall / remove

Post by Nags007 »

Hi Team,
I am using RHEL 6.8. I have installed the linux-nrpe-agent without NagiosXI server IP.

I want to uninstall the linux-nrpe-agent , is there any uninstall scripts available

Reason: want to install linux-nrpe-agent freshly install it, so that when it asks for NagiosXI server IP i can enter. or where to enter NagiosXI server IP in the Agent files ? how many files i need to enter NagiosXI Server IP in the linux-nrpe-agent files ?

Please guide.

Thank you,
Nag.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: linux-nrpe-agent uninstall / remove

Post by dwhitfield »

In /usr/local/nagios/etc/nrpe.cfg you should change the allowed_hosts= line. You'll need to open firewall ports and such too.

NRPE 3 comes with an uninstall script. You can get NRPE 3 from github. However, the one branded as the linux agent is NRPE 2.15 and does not have an uninstall script. We can help you uninstall it if you still prefer to go that route.
Nags007
Posts: 58
Joined: Wed Mar 08, 2017 12:32 pm

Re: linux-nrpe-agent uninstall / remove

Post by Nags007 »

I have changed the NagiosXI Server IP in below line. /usr/local/nagios/etc/nrpe.cfg
#allowed_hosts=127.0.0.1

and entered the new serverIP there.

Thank you,
Nag
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: linux-nrpe-agent uninstall / remove

Post by dwhitfield »

For clarity, you did not leave it commented correct? I just notice the #. Also, is it working for you now?
Nags007
Posts: 58
Joined: Wed Mar 08, 2017 12:32 pm

Re: linux-nrpe-agent uninstall / remove

Post by Nags007 »

Please note:

Right now, I have started with Nagios Agent installation as i know the IP of NagiosXI server.
I have not installed NagiosXI server yet.

==========================================================
Actually i have installed the linux-nrpe-agent on other system( new client). there during the installation i gave the NagiosXI server IP, which i know.

That NagiosXI Server IP entered, is not recorded or inserted in the Allowed HOST tag in /usr/local/nagios/etc/nrpe.cfg ( which you mentioned).

==============================================================

I have already installed almost 20+ agents.


I would like to uninstall or remove the linux-nrpe-agent and freshly install the nrpe agent as i know the New NagiosXI server IP now.

Earlier entered NagiosXI server was decomissioned so i need to change the NagiosServer IP, in many files of NagiosAgent i guess. ( i am not sure ).

=========================================================================

I have downloaded to below /tmp folder. I can see the below files there.

/tmp/linux-nrpe-agent/
=====================

[root@linux-nrpe-agent]# ll
total 244
-rwxrwxrwx 1 root root 2409 Jun 23 2016 0-repos
-rwxrwxrwx 1 root root 1086 Jan 5 2015 1-prereqs
-rwxrwxrwx 1 root root 1340 Jan 5 2015 2-usersgroups
-rwxrwxrwx 1 root root 458 Jan 5 2015 3-services
-rwxrwxrwx 1 root root 3964 Aug 16 2016 4-firewall
-rwxrwxrwx 1 root root 969 Jul 13 2016 A-subcomponents
-rwxrwxrwx 1 root root 1064 Sep 12 2016 CHANGES.txt
-rwxrwxrwx 1 root root 4752 Jun 23 2016 fullinstall
-rwxrwxrwx 1 root root 1832 Jan 5 2015 get-os-info
-rwxrwxrwx 1 root root 1197 Apr 2 2015 init.sh
-rw-r----- 1 root root 0 Mar 16 14:07 installed.firewall
-rw-r----- 1 root root 0 Mar 16 14:07 installed.prereqs
-rw-r----- 1 root root 0 Mar 16 14:06 installed.repos
-rw-r----- 1 root root 0 Mar 16 14:07 installed.services
-rw-r----- 1 root root 0 Mar 16 14:08 installed.subcomponents
-rw-r----- 1 root root 0 Mar 16 14:07 installed.usersgroups
-rw-r----- 1 root root 174321 Mar 20 16:32 install.log
-rwxrwxrwx 1 root root 240 Jan 5 2015 nagios.firewallapps
drwxrwxrwx 2 root root 4096 Jan 5 2015 packages
drwxrwxrwx 6 root root 4096 Jan 5 2015 subcomponents
drwxrwxrwx 2 root root 4096 Jan 5 2015 xinrpe
-rwxrwxrwx 1 root root 790 Mar 20 16:32 xi-sys.cfg
-rwxrwxrwx 1 root root 610 Jan 5 2015 xivar

which are all the files to remove ? how to remove ? please provide the commands so that i can go for fresh linux nrpe installation.

Thank you,
Nag
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: linux-nrpe-agent uninstall / remove

Post by dwhitfield »

Code: Select all

delgroup nagios
deluser nagios
rm -f /etc/xinet.d/nrpe
service xinetd restart
rm -rf /usr/local/nagios
...but changing the one file should do it, if you have the ports open.
Nags007
Posts: 58
Joined: Wed Mar 08, 2017 12:32 pm

Re: linux-nrpe-agent uninstall / remove

Post by Nags007 »

Thank you very much. I am able to uninstall and reinstall the agent again.

Thanks a lot
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: linux-nrpe-agent uninstall / remove

Post by dwhitfield »

Did reinstalling the agent resolve your issue?
Nags007
Posts: 58
Joined: Wed Mar 08, 2017 12:32 pm

Re: linux-nrpe-agent uninstall / remove

Post by Nags007 »

I am doing Nagios XI server installation now as i got the sudo / root access now. Will update you soon.

Thanks,
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: linux-nrpe-agent uninstall / remove

Post by dwhitfield »

Ok, great!

One thing I will note since you mentioned sudo access. Modified sudoers files can mess things up, so just be careful.
Locked