Technology Insights

Possible Errors When Moving Nagios From One Linux Server To Another Linux Server

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.

Technology Insights

NRPE Nagios Plugin To Check The Number Of Files In A Directory

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.