Technology Insights

Error(s) executing /usr/bin/nagios -v /usr/share/nagios/monarch/workspace/ nagios.cfg Permission Denied

Earlier in the week when moving Nagios from one server to another I ran into a bunch of random issues with Monarch which is the Nagios configuration file manager I use. After I got everything installed and thought that I was past any errors I ran a Pre Flight Test on the Nagios configuration files which returned an error. In the article below I describe in more detail the error that displayed, how I went about troubleshooting the error, and what I finally did to resolve the error.

Technology Errors

Can’t Locate JavaScript/ In @INC

The error detailed below is from the Apache error logs. The error displayed in the Apache error log after the first attempt to visit monarch.cgi for the first time. I had already installed the JavaScript::DataFormValidator Perl module but after initially installing the JavaScript::DataFormValidator Perl module I also installed Perl 5.10 in a different location than the Perl 5.8.8 that was already installed on the CentOS Linux server. Below I describe the error, how to install the JavaScript::DataFormValidator Perl module using the CPAN shell, and some minor modifications I made to the Monarch CGI scripts to use Perl 5.10 instead of Perl 5.8.8.

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 Errors

Perl Module Error: Can’t locate URI/ in @INC

In the process of installing Monarch, which is a Nagios file manager, earlier I ran into a couple errors for modules I thought I had already installed. Then I realized the issue must be because during the process of installing modules Perl wanted to upgrade from 5.8 to 5.10 on CentOS. I went ahead and upgraded Perl however I left 5.8.8 intact since CentOS seems to rely on Perl 5.8.8 in many ways. Anyhow the full error I received is below as noted from the Apache error logs. You can easily resolve the below error by following the directions below.

Technology Insights

Monarch Configuration Tips and Tricks to Manage Nagios Configuration Files

As you add services, contacts, contact groups, commands, and devices to Nagios the bulk editing begins to become very tedious. Monarch is a great tool to manage Nagios configuration(.cfg) files.  To install Monarch follow the instructions provided in the README.txt that comes with the product. Below I provide instructions to assist in that installation along with some tips and tricks that I learned along the way.

**UPDATE** I realized when reading back through this article that I had not included a download link for Monarch so click here to download Monarch to manage your Nagios configuration files.

How to Install Monarch

  1. Install Perl Modules: Install the following perl modules via the CPAN shell: CGI-Session, Class-Accessor, XML-LibXML-Common, XML-NamespaceSupport, XML-SAX, XML-LibXML-1.58, CGI, DBI, DBD-mysql, File::Copy, CGI-Ajax, Data-FormValidator, JavaScript-DataFormValidator, Carp, IO-Socket, Time-Local, and URI-Escape.First start CPAN.