How Can I stop the email notifications. I am setting up a new server and getting tons of notifications. Wants to disable them for time being.
I'm half way through writing a nagios script and I've hit an annoyance with SSH.
According to the man page:
-q Quiet mode. Causes all warning and diagnostic messages to be
suppressed.
Yet if I enable the quiet flag and then pass an invalid port, I still get an error:
$ ssh user@localhost -q -p test
Bad port 'test'
This is a problem, because that will make that message the first line out and that's what is grabbed by Nagios. I need to output something like "Warning|SSH error" after picking up on a != 0
exit code from ssh, but the first line I can output on is going to be line 2.
How can I make SSH TRULY quiet?
Note: I wasn't sure whether to post this question on serverfault, on superuser or on stackoverflow. I went with serverfault as the user base are probably most experienced with cli SSH and cli scripting workarounds.
When defining and testing new services in nagios I have been restarting nagios, then clicking the service, and rescheduling a check for as soon as possible, then waiting until the check happens.
Is there a more efficient way to do this? I'd like to use the command line to run that particular check and get the output.
I have this problem with NRPE, all the stuff I've found so far on the net seems to point me at things I've already tried.
# /usr/local/nagios/plugins/check_nrpe -H nrpeclient
gives
NRPE v2.12
as expected.
Running the command by hand (as defined in nrpe.cfg on "nrpeclient", gives the expected response
nrpe.cfg:
command[check_openmanage]=/usr/lib/nagios/plugins/additional/check_openmanage -s -e -b ctrl_driver=0 bat_charge
"Expected response"
But if I try to run the command from the Nagios server I get the following:
# /usr/local/nagios/plugins/check_nrpe -H comxps -c check_openmanage
NRPE: Unable to read output
Can anyone think of anywhere else I might have made a mistake with this? I've done the same thing on multiple other servers with no problem. The only difference I can think of with this is that this box is RHEL 5 based, whereas the others are RHEL 4 based.
Those two bits above that I've tested are the what most people seem to suggest when people have had this problem.
I should mention that I get a weird error in the logs when I restart nrpe
:
nrpe[14534]: Unable to open config file '/usr/local/nagios/etc/nrpe.cfg' for reading
nrpe[14534]: Continuing with errors...
nrpe[14535]: Starting up daemon
nrpe[14535]: Warning: Daemon is configured to accept command arguments from clients!
nrpe[14535]: Listening for connections on port 5666
nrpe[14535]: Allowing connections from: bodbck,combck,nam-bck
Even though, it's plainly reading that /usr/local/nagios/etc/nrpe.cfg
file to get the stuff it's talking about further down..
We're currently using Nagios to monitor about 20 Linux machines (services and functional links). I just find out about Munin and I wonder if this is a Nagios replacement, or it can be used together with Nagios? I don't want to spend hours setting it up, just to discover that I already have all that functionality with Nagios.
I'd especially appreciate if someone who used both programs can give some insight about your experience. Which is better for which task and what do you recommend to use?
Note: we also used Cacti for some time. The main problem we have with Nagios is that setup takes too long and isn't very straightforward.