Tag Info

Hot answers tagged

13

You have a rights problem. Change the command to: command[check_openmanage]=sudo /usr/lib/nagios/plugins/additional/check_openmanage -s -e -b ctrl_driver=0 bat_charge (add sudo) Then, add the nagios-user to the sudoers: nagios ALL=(ALL) NOPASSWD:/usr/lib/nagios/plugins/additional/check_openmanage Or you could just chmod the file... That also works. ...


8

Short answer : if you're using a Bash plugin, make sure you have a shebang stating which interpreter should be used : #!/bin/bash I was facing the same issue with a Nagios plugin I wrote myself. The script was running as expected when launched locally, even when running as user nagios using following statement : $ sudo sudo -s -u nagios $ ...


5

Just in case someone else is having issues with this: check your yum exclude list here: /etc/yum.conf with Cpanel installed lots of packages are getting excluded. So for the one-off install of nagios-nrpe remove perl* from the list of excluded packages, run 'yum install nagios-nrpe.x86_64' and add it back after installation.


5

Try installing nagios-plugins-basic and nagios-nrpe-server. Make sure apt is configured to install only dependencies and not recommended or suggested packages.


5

It's likely that the process name is not what you think it is. To find out how check_process is looking for your job try this: check_procs -vv -C Passenger. You'll see something like this: /usr/lib64/nagios/plugins/check_procs -vv -C Passenger CMD: /bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args' PROCS OK: 0 processes with command name ...


4

One good way to debug why the command being executed is not returning any valid output is to use strace. For example, I just had a problem running the check_linux_raid command via NRPE. Run strace -f -p <nrpe pid>, and then execute the command manually from the system running nagios (e.g. /usr/lib64/nagios/plugins/check_nrpe -H remotename -c ...


4

I believe you cant set it globally but if you use templates you only have to change at the template.


4

I've always believed the administration advantage of SSH (I use push_check) outweighs any additional load. Modern CPUs are so fast that the cost of encrypting a handful of bytes is pretty minimal, so it comes down to running two processes (SSH and the check script) vs one (check script fired off by NRPE). For check scripts written in an interpreted ...


4

Edit the function verify_dep() so that the line type $i > /dev/null 2>&1 /dev/null is changed to type $i > /dev/null 2>&1 Afterwards, it should work. The original line was wrong and always resulted in an error.


3

check_nrpe was getting 'NRPE: Unable to read output' despite the check working locally because the plugin I was using did not work well with SELinux. Disable it and make sure to remove the file's contexts: $ ls -l check_om_storage -r-xr-xr--. 1 root nrpe 3808 Feb 27 17:54 check_om_chassis $ setfattr -x security.selinux check_om_storage $ ls -l ...


3

NRPE is a nagios plugins, it's easy to install and it'll manage the check ask in the probe configuration file. There is only one bad thing about nrpe, you need to install it on every server you want to monitor, on linux os it's really simple, just yum/apt-get install nrpe, but on windows server you need to install it via .exe, and sometime you'll need to ...


3

I had a similar problem. check_procs is internally calling /bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args', it's listing the processes and then counting them. If you have configured nagios to run with a different user, it's using sudo to execute the command. And here is the problem. If you type sudo ps -AF | grep sudo, some distribution return "grep ...


3

Which Nagios packages do you have installed? On my CentOS 5.4 boxes, the Nagios config is in /etc/nagios. Take a look there. The filename is /etc/nagios/nagios.cfg Edit On the remote side, you need an entry in the nrpe.cfg that looks like command[something]=/some/path/to/command/binary. Then, on the Nagios host, you do your define service { }. The ...


3

SNMP is available for everything, Linux, Unix, Windows, Cisco.. and many more. Certain information will be available on NRPE that isn't on SNMP. Your setup time with snmpd will be allot quicker, once you get your head around how SNMP works. You can provide a snmpd.conf config to your clients and they can setup their own snmp daemon quickly and without too ...


3

this should be, what you are looking for: http://www.nagioswiki.com/wiki/index.php/Using_NSclient_and_NagiosPluginsNT_for_Service_Delivery It is a combination of nagios plugins for windows and nsclient++.


3

You can use snmp with jboss (of course you need to have jira on jboss). You can then access to a lot of data like thread pools, datasources ... See JBossSNMPAdapter and JBossSNMPAdapterGetValues You can use cacti to graph the data, this can be very useful to handle problems: cacti forum.


3

I use Nagios / NRPE for our JIRA server (which also runs Confluence), together with Munin for tracking resources over time (handy for looking for memory / CPU spikes, excessive DB accesses, etc.) Apart from the standard checks that come with NRPE, I added the following for JIRA: A check_http check that makes sure the application is up A check_file_age ...


3

This guy has developed a nagios script for linux that does exactly what you are asking: http://www.altsec.info/check_scan.html I'm trying now to find a Windows equivalent Miguel


3

Check pathing, permissions, selinux, iptables. Mine was a pathing issue in client:nrpe.cfg, double check the command path to the check_* plugin name. These can be confusing, (lib/local) (libexec/plugins) as a pathname. I mistakenly yanked and put the paths from the commented prepackaged nrpe cfg file to make commands. The make install or yum plugin ...


3

There is problem with a /bin/ps output on host. By default, "check_procs" binary do a "/bin/ps -axwo" on checked system, which cut arg string. Just recompile nagios-plugins from source. On version 1.4.15 must set configure options: ./configure --enable-extra-opts=yes --with-ps-command="/bin/ps -axwwo 'stat uid pid ppid vsz rss pcpu ucomm command'" ...


3

Since I see there is no problem with the line you added to /etc/sudoers file: nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/ I suspect that there is a later entry in /etc/sudoers that override NOPASSWD option and that is reason for http-restart still asking for a password. With your above config, is nagios user a member of sudo group? Just try to ...


3

You can find NRPE and many other Nagios-related packages in the EPEL repository, which is practically a must-have for most RHEL/CentOS systems. If you can't install standard software on the system, you need to have a long chat with whoever is running the network/firewall about why not.


3

Nice detailed write-up Itai! Have you tried reducing the complexity of the config to see if it works? For starters, I would start by changing the line in nrpe.cfg to command[check_kvm]=/usr/lib64/nagios/plugins/check_kvm and temporarily change the /usr/lib64/nagios/plugins/check_kvm script to be something really simple like: #!/bin/sh echo Hi exit 0 ...


3

First off the %ARGS% tingy is for a wrappers (which is something else), perhaps I should rename that $ARGS$ to make it less confusing? Anyways NSClient++ as of before 0.4.2.61 does not support variable arguments. This was added in 0.4.2.61 however as per request in this ticket. As of NSClient++ 0.4.2.61 there are two new options $ARGS$ and $ARGS"$ the ...


3

Since you decided to change the port that NRPE uses for some reason (the default is 5666), you have to change the command definition for check_nrpe to match. So you'll need to add -p 15666 to the command_line, at the very least. (If you plan to run NRPE on this alternate port on every host, you can safely add the hard-coded port to the command def. But if ...


3

You have misled yourself by not comparing apples with apples. The command you are running manually is not the command that you're asking NAGIOS to run automatically. When you run the actual command manually check_nrpe_hwinfo.sh $HOSTNAME$ $HOSTADDRESS$ with appropriate substitutions, the problem comes to light. It appears to be that the file was ...


3

The command you're running through nrpe is /usr/lib64/nagios/plugins/check_nfsmounts.sh, but the one you're testing from the command line is /usr/lib64/nagios/plugins/check_nfsmount.sh. You've confirmed that this discrepancy is the source of the problem - and don't sweat it, this could happen to any of us. A second pair of eyes is always useful in catching ...


3

The issue has been discussed in http://sourceforge.net/p/nagios/mailman/message/27333277/ . Looks like version 2.12 exhibits the problem.


3

Not so long ago I wrote a really nice NRPE auto installer script which I believe can assist you if you edit it to suit your needs. The script includes many built-in checks which are being added to each host's nrpe.cfg file. Meaning, that you can configure the checks that are relevant to you and make sure that each host which is running the script will have ...


2

What do you mean to check ports on hosts remotely? Do you just want to connect to the port to see if it is open? The check_tcp plugin will do that, if, that's what you want to do. Not quite sure what you mean.



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