Tag Info

Hot answers tagged

12

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. ...


6

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

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


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 ...


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'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 ...


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

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

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

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

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

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

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 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

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

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

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.


2

You can use option -a as you used in your example, but like this: root@nagios:/etc/nagios3/conf.d# /usr/lib/nagios/plugins/check_procs -C mysqld -a "--basedir=/usr --datadir=/var/lib/mysql" PROCS OK: 1 process with command name 'mysqld', args '--basedir=/usr --datadir=/var/lib/mysql' So in your case it would be: /usr/lib/nagios/plugins/check_procs -C ...


2

An agent is only needed for "internal" checks like disk space, load, etc. It is not needed for ping, http, and other network-accessible services. It's possible that it's using check_by_ssh, or that it's misconfigured and is really just checking disk space on the nagios box itself. Look at the service definition in question, and find the check command. If ...


2

One thing that is worth checking, is if the process is still running: ps aux | grep nrpe Find the PID of nrpe and then kill the PID: nagios 538 0.0 0.1 22712 1048 ? Ss Feb13 13:33 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d root 21910 0.0 0.0 7636 912 pts/0 S+ 06:11 0:00 grep --color=auto nrpe ...


2

It's a permissions issue. Issue this command and you should be fine: chmod +x /usr/lib64/nagios/plugins/check_mem. In the future, ensure that all nagios plugins are executable.


2

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 ...


2

you could try this: aptitude install -vv --show-deps --without-recommends nagios-nrpe-server it will show you the package dependencies but wont install them.


2

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 ...


2

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 ...


2

At least on Debian (may be the same for Ubuntu) you need the nagios-nrpe-plugin package. Install that, too.



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