Hot answers tagged

4

It is complaining that there is only 10% free space left, which is not good. It is saying 99% of the inodes are free.


4

Error: System call sent warnings to stderr: error: unsupported option (BSD syntax) The problem is that there's a mis-match between the check_procs plug-in and your operating system's ps command. Nagios' check_procs plug-in spawns the ps command to check processes, applying a scanf()-style format string to the command's output to find out what it needs to ...


4

Nagios::Plugins was renamed to Monitoring::Plugins due to trademark reason. cpan doesn't index Nagios::Plugins anymore. Now you must install Monitoring::Plugins: perl -MCPAN -e 'install Monitoring::Plugin' Further reading https://rt.cpan.org/Public/Bug/Display.html?id=102080 https://www.monitoring-plugins.org/news/new-project-name.html


3

eth0:1 is a virtual interface off of eth0. The mac address of a virtual IP is always the same as the mac that it is based off of, here eth0. So as suggested in the comments by Mark Plotnick, if you want to have another interface (on a virtual machine) don't put a colon in the name, but use another number, e.g. eth2. Don't get confused: a virtual IP is not ...


3

I actually fixed this by installing RPMforge, which just so happens to aim at DAG repository, and then all yum commands to install nagios worked great. Try yum remove nagios-nrpe (etc), then see this page, install the update, then try the command yum install nagios-nrpe again and see if that works.


3

You need to relabel the files with the right selinux type: semanage fcontext -a -s system_u -t httpd_sys_script_exec_t /usr/local/nagios/sbin/*


2

Process accounting (package psacct) can also help.


2

Maybe it would be a good idea to replace: # -------- get dataset of filesystem DATASET=`df -h $1 | grep -v Filesystem | awk '{print $1}'` with the following: # -------- get dataset of filesystem DATASET=`df -h $1 | awk '{print $1}' | tail -n 1` Because of localization issues on some installations, some distros think it's a good idea to replace such ...


2

The user that Nagios runs as requires sudo rights just like with your normal account. You can use a command like this to see what sudo right a user has: $ su - nagios -c "sudo -l" Matching Defaults entries for nagios on this host: requiretty, !visiblepw, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS MAIL PS1 PS2 QTDIR ...


2

The problem The error is actually pretty self explanatory. Error: Could not find any hostgroup matching 'allhosts' You have this line in your define host{...} block: hostgroups allhosts ; Host groups this printer is associated with Solution You need to create a hostgroup called allhosts. In the file /etc/nagios/hostgroups.cfg, most ...


2

The problem is likely that Nagios is never killed/restarted so that it starts logging to a new log file. Here are a couple examples that show how you'd go about doing the postrotate action. /var/log/nagios/nagios.log { daily rotate 180 compress dateext missingok notifempty sharedscripts postrotate /sbin/service nagios reload > /dev/null 2>/dev/...


2

If you are using vhost internaly it is always better solution to make vhost configuration with different ports, so in this case you can setup nagios domain on 8083 port: first step: In httpd.conf you need to spicify listening ports: Listen 8080 Listen 80 Listen 8083 In httpd-vhosts.conf add a NameVirtualHost for every virtual host you want to add. ...


2

That you did not receive notifications is because all the reported states are SOFT. Notifications are only sent out for HARD states. You need to look into the service configuration and check the value of max_check_attempts for your service.


2

Reading around it seems that RPM package manager is unable to track dependencies YUM adds automatic updates and dependency management for this I would prefer to use yum whenever is possible. I don't know exactly the problem in your case, but I would try to fix it using one of the following two approaches : Install rpm and resolve dependencies ...


2

We have the plugins directory in the monitored host (CLIENT), because you installed the nagios plugins. Nagios monitoring host executes the check_nrpe plugin specified for example as the following command: $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk $HOSTADDRESS$ is the IP address of your CLIENT machine (monitored host). On the monitored host the ...


2

NRPE hasn't been updated in a few years (September 2013), this is what it does on the server side SSL_library_init(); SSLeay_add_ssl_algorithms(); meth=SSLv23_server_method(); ... SSL_CTX_set_options(ctx,SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3); ... SL_CTX_set_cipher_list(ctx,"ADH"); dh=get_dh512(); and the client (check_nrpe on Nagios server) ...


1

The code in check_smtp_send is buggy. It either directly specifies an invalid string for SSL_version or uses a module which does so (the very old and unmaintained module Net::SMTP::TLS is known for this bug). It might be that it is fixed in newer versions of the code. But given that I have no idea which OS you are running, which package this code belongs ...


1

You need to write script to check those files. In that script you need to output the values you want to be graphed as performance data. I suggest you to read the plugin development guidelines https://nagios-plugins.org/doc/guidelines.html. You can perform the check with NRPE or alternatively via SSH using check_by_ssh plugin or check_by_ssh_master plugin ...


1

The problem was that lsof in that script was being run as the nagios user. Adding the following line to /etc/sudoers (or optionally to a new file in /etc/sudoers.d/ ) was necessary: nagios ALL=(root) NOPASSWD: /usr/bin/lsof Additionally, it was necessary to amend line 15 of the script to contain this: proc1_lsof = "sudo lsof -p " + ','.join(map(str,...


1

k, so in /etc/sysconfig/network, you want to change HOSTNAME=Nagios to be HOSTNAME=Nagios.yr.domain.name (reboot) and then in /etc/hosts, you want to remove the line nagios.localhost.com 172.16.22.249 and change the line 172.16.22.249 nagios.localhost.com to read 172.16.22.249 nagios nagios.ur.domain.name (mind the space ...


1

The plugins within Nagios are really the secret sauce of what makes Nagios so powerful. The check that performs the HTTP check is this one: $ /usr/lib64/nagios/plugins/check_http check_http: Could not parse arguments Usage: check_http -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>] [-w <warn time>] [-c <critical ...


1

With help from another colleague, we worked out why it didn't work. 3 things: First, we have agentaddress tcp:x.x.x.x:161 in snmpd.conf, just deleted the line Second, iptables is blocking udp port 161, added rules to allow udp port 161 Third, something wrong with the script as you can see the error message about line 319, changed < to lt


1

Nagios actually uses external commands to send email—it doesn't send them directly. For example, in our config here, /etc/nagios3/commands.cfg contains (in part): define command{ command_name notify-host-by-email command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\...


1

According to your comment your goal is not to actually increase the load on the server, you only want to test the Nagios alert in the case of high load. For doing this, I wouldn't try to actually increase the load of the server, the server load is hard to artificially control so this isn't a very reliable test scenario. Instead you could store the output ...


1

Check the Apache logs for additional information. There's typically 2 logs, access.log and error.log. Both can be helpful. The access.log will show you the URL that was accessed along with a http status (a number such as 200 which means OK or 404 which means error). The error log can show you output from any CGI scripts that may have failed. Typically the ...


1

bind failed (Address already in use (errno = 98)). service = nsca indicates that the port (5667) is already in use. Check if nsca is already running. Try netstat -tuan to see if anything else has the port in use. Verify that there is no copy of the nsca file in /etc/xinet.d so that xinetd is trying to start it twice.


1

Take a closer look at snmpd (snmpd.conf). If compiled with the right options you can set trigger actions for a number of things - one of these is CPU-load.


1

It was permissions. This process is trying to start under user "nagios" but root:root is the user:group owner of /usr/local/nagios and user nagios isn't a member of the root group: # groups nagios nagios: nagios centreon Anyway, the solution is (I think): # chmod -R 770 /usr/local/nagios # chgrp -R nagios /usr/local/nagios It now starts right up: # /...


1

Finally found the fix for this: [root@localhost]# make [root@localhost]# make cgis [root@localhost]# make install-cgis


1

In my case the problem was: sudo: sorry, you must have a tty to run sudo So you can just disable it in /etc/sudoers by commenting out Defaults requiretty Which does not have any benefit anyway.



Only top voted, non community-wiki answers of a minimum length are eligible