-2

I am running /usr/lib64/nagios/plugins/check_nrpe -H 127.0.0.1 -c check_disk as root yet get NRPE: Unable to read output.

Any help?

pcfreak30
  • 9
  • 1
  • 1
    What does `grep check_disk /etc/nagios/nrpe.cfg` return (cut-and-paste into your question, please)? – MadHatter Sep 30 '14 at 20:35
  • 1
    After you try MadHatter's suggestion, you might want to try running the nrpe check *as the nagios user* on the remote host to make sure there are no permissions problems. 80% of the time when I get that error, its a permissions/ownership problem. You can also try the -n flag to check_nrpe to make sure that SSL is working properly. Lastly, if its not a supplied check (I write a lot of my own NRPE checks), you can get that error if the script outputs junk text. Unlikely to be the problem with check_disk, assuming it's defined in the nrpe.cfg and installed correctly. – Some Linux Nerd Sep 30 '14 at 21:26
  • @MadHatter `[root@1 ~]# ls /etc/nagios/nrpe.d/ nrpe-check_cpu.cfg nrpe-check_disk.cfg nrpe-check_load.cfg nrpe-check_ntp_time.cfg nrpe-check_ram.cfg nrpe-check_swap.cfg`. I am using puppet to manage nagios. Contents of `/etc/nagios/nrpe.d/nrpe-check_disk.cfg` are `# Configuration for check_disk (from the generic template) command[check_disk]=/usr/libexec/nagios/plugins/check_disk -l -X binfmt_misc -X rpc_pipefs -w 5% -c 2%` – pcfreak30 Sep 30 '14 at 21:47
  • @SomeLinuxNerd I have ran this remotely and locally as nagios and on the client. Some commands return a value, some return the unable to read output. – pcfreak30 Sep 30 '14 at 21:50

1 Answers1

1

Turns out the puppet module https://github.com/thias/puppet-nagios has a bug causing the commands to be referenced from a non existent folder /usr/libexec/nagios/plugins/ vs /usr/lib64/nagios/plugins/.

sebix
  • 4,175
  • 2
  • 25
  • 45
pcfreak30
  • 9
  • 1
  • If by "bug" you mean "that's the default path if you install Nagios/NRPE from source" – Keith Oct 01 '14 at 15:06
  • I use RPM's, not source on CentOS 6.5, so its stores in lib/lib64, rather than libexec. Puppet module wasn't using correct paths. – pcfreak30 Oct 01 '14 at 16:23