New answers tagged

0

As usual, this was due to a stupid error. The check script file was installed onto the nagios server instead of the client server. This nagios config is controlled by puppet and some custom checks are installed on the nagios server and some are installed on the client server. I followed the example of another custom check script which I installed. The only ...


0

You need to use the full path to your ruby binary at the top of your script. You can't use /usr/bin/env ruby as the interpreter, because NRPE is going to run with no ENV. This can be simulated by running your script through env -i, as the nagios/nrpe user: env -i /usr/lib/nagios/plugins/check_disk_usage.rb


0

It seems like Nagios is not properly forking into background -d option, what systemd expects here due to type=forking. So systemd counts a non-fork as a timeout during start. That might be related due to NERD, or another problem. You could run Nagios in foreground by: cp /usr/lib/systemd/system/nagios.service /etc/systemd/system/nagios.service vim ...


-1

Putting nagios in the sudoers file won't help if you don't actually invoke sudo. Try nagios ALL=ALL NOPASSWD: /usr/lib/nagios/plugins/check_filesys.sh in sudoers, and have nagios invoke sudo /usr/lib/nagios/plugins/check_filesys.sh


0

Your nagios plugin will run as your "nrpe_user" that you have defined in your /etc/nagios/nrpe.cfg. This is probably 'user nagios or user nrpe.' If you update your script to touch '/tmp/teste.txt' (in other words, touch a file in a location with open permissions) it should work.


2

You need to use a full path for the touch/rm, because your script is trying to run in /, and Nagios doesn't have write permission to /. (You might be able to get away with using ~/test.txt if $HOME is set to something sane.) You can verify this for yourself: # pgrep nagios 556 # ls -ls /proc/556/cwd 0 lrwxrwxrwx 1 root root 0 Feb 5 11:10 /proc/556/cwd ...


1

For any custom NRPE command to work, you need to add an additional command definition for it in your local NRPE config (usually /etc/nagios/nrpe_local.cfg), like: command[disk_usage]=/usr/lib/nagios/plugins/disk_usage.rb Then restart NRPE and try again with: check_nrpe -H localhost -c disk_usage


0

Have you added your Nagios server IP as a "SMTP Relay" on your exchange server? I have Nagios running in our network and I receive emails in my work email account fine. We are running exchange 2010. Also you need to add your Exchange server as a relay in your sendmail config file. I don't quite remember on top of my head what string you need to modify, but ...


0

On Centos/RedHat 7 you are not supposed to write directly to the /var/run directory, but you got a subdirectory /var/run/nagios. Check that the lock_file option points there instead like this: lock_file=/var/run/nagios/nagios.pid


0

As for backups, a good way is to download your last changes' snapshot from WATO, in the backup & restore menu. (Depends on the use case, sometimes I'll also go with omd backup or cmk --backup) If doing it all manually, please also grab var/check_mk/autochecks (inventory state) and local/share/check_mk/checks (custom checks you added).


1

Comparison of monitoring systems: https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems I don't think, that some monitoring system has failure prediction out of the box. Your provided paper is too academic. You can still build it on the top of some monitoring system, which will provide data/events/failures for your failure algorithm ...


1

this is not really something google can't help you with: Search for "nagios gettings startet nrpe" lists this as the second hit - have a shot at that and see how that goes for you.. Hint: What you are looking for is at the end of the article: command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 10% -c 5% -p $ARG1$ but to get there you really ...


1

check_nrpe is for NRPEServer and check_nt is for NSCLientServer So you need to move your configuration over to the NSClientServer module for check_nt to work or better yet stop using check_nt and move over to check_nrpe*. [/settings/default] password = Me0zf92h7f allowed hosts = 10.10.7.101 [/settings/NSClient/server] port = 12489 [/modules] ...


0

Solved! You need to activate telegram code as user nagios. su - nagios /home/nagios/tg/bin/telegram-cli -k /home/nagios/tg/tg-server.pub and enter the code send to you as sms



Top 50 recent answers are included