Hot answers tagged

25

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


10

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 $ /path/to/my/...


7

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


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

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


5

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


5

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


5

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


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

I wrote a simple check_puppet NRPE script that does most of what you want. It's based on RI Pienaar's original which was more than I needed. In both cases we parse /var/lib/puppet/state/last_run_summary.yaml to see the state of the last agent run. I don't see the advantage of using a third piece of software to compare the catalog versions between the master ...


5

If you are using NSCP-0.4.3.x (rather then NSCP-0.4.2.x) on your Windows Host, then certificate based authentication became the default authentication method. That´s why your check isn´t working. To work around the issue you need to add the following to your config: [/settings/NRPE/server] insecure = true After that you need to restart the NSClient++ ...


4

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


4

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


4

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


4

In my case problem was simply - user nagios was not able to execute the script. After chmod it started to worked. Sudo is not necessary. Its even evil :)


4

I could write Puppet templates for all the variants but I would much prefer to manage this through a native method. $USERn$ is a standard macro for Nagios. They are defined in the resource.cfg file: # Sets $USER1$ to be the path to the plugins $USER1$=/usr/local/nagios/libexec # Sets $USER2$ to be the path to event handlers #$USER2$=/usr/local/nagios/...


4

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


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.


4

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


4

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


4

Try this: setsebool -P nagios_run_sudo 1 On host with NRPE. This option is disabled by default in SELinux policy.


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

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

In my case, only one plugin failed while several others worked okay. It turned out to be a LOCALE problem. The plugin was check_mem.sh and it performed a grep for Mem in the output of free. But system wide LOCALE returned Speicher (German) instead of Mem, so all received values were empty strings.


3

I think it's a bug in check_procs: it seems to pick up itself when running from nrpe, as opposed to the command line. Maybe a race condition of some sort. I see you're running Ubuntu, given your command prompt. With the check_procs available on Lucid, I'm able to do something like: /usr/lib/nagios/plugins/check_procs --ereg-argument-array="[s]tring" -w 1:...


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'" --with-ps-...



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