**This is an old revision of the document!**

The Nagios Toaster

a.k.a. Nagios-on-Steroids.

The goal here is to get a Nagios server monitor, with graphing capabilities and integrated configurator. We will use the following tools:

Web Server

Any Webserver will fit there, as long as it supports CGI (for Nagios) and PHP (for Nagios Administrator). http authentification and https, although not mandatory, are strongly recommended.

In this document, we will assume that the webroot directory will be /www/monitor/.

Nagios

  1. Install Nagios
  2. Copy Nagios docroot into /www/monitor/nagios
  3. Download and extract the Nuvola Skin (let's face it, Nagios default interface is ugly as hell)
  4. copy /www/monitor/nagios/index.html to /www/monitor/index.html, and fix the links inside:
<script type="text/javascript" language="JavaScript1.2" src="nagios/config.js"></script>
document.write('<FRAME SCROLLING="no" SRC="/nagios/side.html" NAME="side" TARGET="main">');

Munin

  1. Install Munin
  2. Change in munin.conf:
htmldir /www/monitor/munin

Nagios Administrator

  1. Get it from Nagiosadmin redmine
  2. Extract it at the same level as the others tools (i.e. /www/monitor/nagiosadmin )
  3. Follow /www/monitor/nagiosadmin/doc/install.txt to setup
  4. Some fixes:
  • bug in long commands: apps/backend/modules/command/config/generator.yml:
@@ -19,7 +19,7 @@
       fields:
         created_at:   { type: plain }
         updated_at:   { type: plain }
-        command:      { type: input_tag, params: size=80 }
+        command:      { type: input_tag, params: size=80 maxsize=1024 }
         nagios_help:  { name: Nagios help }
 
       display:
  • shadow are ugly, plus they make tabs difficult to read. change in web/css/styles.css:
@@ -42,7 +42,7 @@
        padding-left: 24px;
        text-align:center;
        text-decoration:none;
-       text-shadow:#2A2A2F 2px 2px 1px;
+       /*text-shadow:#2A2A2F 2px 2px 1px;*/
 }
  • default language is German. if you don't understand this wunderbar language (like I do), change in apps/backend/config/i18n.yml:
@@ -1,5 +1,5 @@
 all:
-  default_culture:     de
+  default_culture:     en
 #  source:              XLIFF
 #  debug:               off
 #  cache:               on

Binding all together

Nagiosadmin integration

  • Change the following line in the main Nagios configuration file:
cfg_dir=/www/monitor/nagiosadmin/data/nagios
  • Add a link in the Nuvola menu. Edit /www/monitor/nagios/side/dtreedata.js, and add the following line at the end, just before the document.write(configuration); statemement: <code js> configuration.add(5,0,'Administration','/nagiosadmin/web/language/en',,,'side/icons/configuration.gif'); </code> ==== Munin integration ==== As Munin already output its graphs in /home/monitor/munin, we just have to display it in the main nagios frame (as we did for Nagios Administrator). Edit /www/monitor/nagios/side/dtreedata.js, and add the following line just before the document.write(reporting); statement:
reporting.add(9,0,'Munin Graphs','/munin/','','','side/icons/reporting.gif');