It had been awhile since I have installed NRPE or Nagios Remote Plugin Executor running through xinetd so once I thought I had everything configured I attempted to restart xinetd but NRPE was not working properly. Below I describe the error in more detail along with how I resolved the issue. In the below example the server was running CentOS Linux.
I recently moved Nagios monitoring from one server to another and ran into a couple minor issues. I wanted to point out some of the errors and the steps I took to resolve those errors on a CentOS Linux server. The biggest pain about moving Nagios for me was the fact that I use Monarch to manage the Nagios configuration files and reconfiguring Monarch was a pain because of some of the Perl modules required and the fact that CentOS still favors Perl 5.8.8 instead of Perl 5.10 which includes some of the necessary Perl modules. Anyway once I got past the Monarch issues I still had some minor problems with Nagios which are pointed out below. The errors are from the Nagios web interface.
We have various scripts on a server that process files that are uploaded to a specific directory so we needed a way to monitor these directories and verify that all files are being processed. Once they are processed on our server they are moved to different directory so the file count should never get over a certain amount of files. The below script assumes that you have NRPE installed on the server so you can reference the bash script locally. Follow the directions below with some monitor modifications and you can monitor directories for the number of files with Nagios very easily.
This error message was received when attempting to run an NRPE command from the shell. The fill error is below followed by how the issue was resolved.
The error has been posted on the next page because of its length.