Page 1 of 1

Uninstall Nagios Agent Ubuntu

Posted: Fri Oct 25, 2013 7:21 pm
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

Re: Uninstall Nagios Agent Ubuntu

Posted: Mon Oct 28, 2013 10:11 am
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/

Re: Uninstall Nagios Agent Ubuntu

Posted: Mon Oct 28, 2013 6:31 pm
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

Re: Uninstall Nagios Agent Ubuntu

Posted: Tue Oct 29, 2013 10:14 am
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.

Re: Uninstall Nagios Agent Ubuntu

Posted: Mon Nov 04, 2013 5:22 pm
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

Re: Uninstall Nagios Agent Ubuntu

Posted: Mon Nov 04, 2013 5:49 pm
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.