Uninstall Nagios Agent Ubuntu

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
badcom
Posts: 11
Joined: Fri Oct 25, 2013 7:15 pm

Uninstall Nagios Agent Ubuntu

Post by badcom »

Hi,

I've messed with my Nagios Agent installation on Ubuntu and I'd like to re-install it using the instructions in the below link:
http://assets.nagios.com/downloads/nagi ... _Agent.pdf

Is there a command to uninstall it? Otherwise, what should I remove in order to be able to re-install it using apt-get install nagios-agent?

Thanks in advance,
Vilmondes
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Uninstall Nagios Agent Ubuntu

Post by tmcdonald »

apt-get generally supports the "apt-get --purge remove" command option, which should get rid of all related files. Check out the following link for more info:

http://www.linuxquestions.org/questions ... ge-237772/
Former Nagios employee
badcom
Posts: 11
Joined: Fri Oct 25, 2013 7:15 pm

Re: Uninstall Nagios Agent Ubuntu

Post by badcom »

Hi tmcdonald,

I had managed to do it before you reply, but I couldn't update this thread 'cause it hasn't been approved yet.

However, there's something really odd happening. I have two Ubuntu remote servers where I have installed nagios-agent following the below link:
http://assets.nagios.com/downloads/nagi ... _Agent.pdf

Then I added the following commands to the "/etc/nagios/nrpe.d/agent.cfg" file:

Code: Select all

command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_all_disks]=/usr/lib/nagios/plugins/check_disk -w 20 -c 10
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 20 -c 10
In one of the servers all the commands are responding as they should when I call them from the nagios server, but they won't work when I change the IP to ther another remote server. I.e.:
/usr/local/nagios/libexec/check_nrpe -H remote_server -c check_load

The only command that works well is the check_total_procs because it doesn't require any argument.

I have restarted the nagios-nrpe-server several times, I have re-installed the nagios-agent but it won't work.

The error message is:

check_load: Could not parse arguments
Usage:
check_load [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15

If I call the command from the remote server, it works. I.e.:

Code: Select all

/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
Any suggestion?

Thanks,
Vilmondes
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Uninstall Nagios Agent Ubuntu

Post by slansing »

Ahh, make sure you turn the following on:

Code: Select all

dont_blame_nrpe=1
Then save the nrpe.cfg and restart the daemon. This should allow you to pass arguments.
badcom
Posts: 11
Joined: Fri Oct 25, 2013 7:15 pm

Re: Uninstall Nagios Agent Ubuntu

Post by badcom »

slansing,

It was already = 1.

I've managed to make it work by adding a -a parameter to the nrpe command.

Thanks for your help,
Vilmondes
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Uninstall Nagios Agent Ubuntu

Post by slansing »

Ah yes to add arguments. Interesting, I did not think that it would require that as you had already defined the values on the nrpe.cfg, I guess you must have switched to passing arguments.
Locked