Novell Home

Nagios and NetWare: SNMP-based Monitoring

Novell Cool Solutions: AppNote
By Christian Mies

Digg This - Slashdot This

Posted: 6 Jul 2006
 

Table of Contents:

Overview

Many Administrators use Nagios as a monitoring tool — primarily for a non NetWare Server. This AppNote proposes a solution for Novell monitoring with Nagios, based on SNMP Get and SNMP Trap.

After compiling and installing Nagios, you can use MRTGEXT.NLM on the NetWare Servers and check_nwstat in Nagios. The last version of MRTGEXT.NLM you get on http://forge.novell.com is very stable. But, unfortunately, the check_nwstat - provided by the offical Nagios Plugins - does not send performance data to Nagios, so it is difficult to get graphs for some Services. If you do not want to load MRTGEXT.NLM on the Servers, for performance data, you need to use the check_snmp command on Nagios site.

This AppNote shows you how to access NetWare by SNMP and how to virtualize the data.

NetWare SNMP — Get Configuration

Here is the configuration of SNMP on a NetWare box,

1. Load the inetcfg tool.

2. Select Manage Configuration.


Figure 1 - Manage Configuration in inetcfg

3. Select Configure SNMP Parameters.


Figure 2 - Configure SNMP parameters

4. Set the parameter values.


Figure 3 - SNMP parameter values

Here you can set your Community. The default is 'public', but you can change it for security reasons. Primarily, you need only the <Read> Community. It makes also sense to set the Trap Community so that later on Nagios can manage your NetWare Traps.

In the next step you can configure the SNMP System Information, but that is not neccessary.

Note: NetWare supports only SNMP v1, so no SNMP authentication is possible.

Testing SNMP from Linux Server to NetWare

Once you have configured SNMP, do a 'Reinitialize System' so your server can respond to SNMP Get calls. Try this on your Nagios Server by doing this:

snmpwalk -On -v 1 -c <yourcommunity> 

The output will look something like this:


Figure 4 - Output from SNMP Get

If this was successful, you now need to add the OID you want to monitor. A few OIDs are shown below:

OIDDescription
.1.3.6.1.2.1.25.2.3.1.5.1 DOS Memory
.1.3.6.1.2.1.25.2.3.1.5.2 Alloc Memory Pool
.1.3.6.1.2.1.25.2.3.1.5.3Cache Buffers
.1.3.6.1.2.1.25.2.3.1.5.4Cache Movable Memory
.1.3.6.1.2.1.25.2.3.1.5.5Cache Non-Movable Memory
.1.3.6.1.2.1.25.2.3.1.5.6 Code And Data Memory
Note: The Settings above are 4K Blocks 
1.3.6.1.2.1.27.1.1.6.1 = String: 1GW MTA Loaded
1.3.6.1.2.1.27.1.1.6.1 = String: 2GW POA Loaded
'( .1.3.6.1.2.1.25.5.1.1.2.1146460160 = INTEGER: 1935 Kbytes Free ECB Count') 
.1.3.6.1.4.1.23.2.27.3.16.1.7.1 available processor threads
.1.3.6.1.4.1.23.2.70.1.8.0 Incoming Messages GW
.1.3.6.1.4.1.23.2.70.1.7.0Outgoing Messages GW

If you do an 'snmpwalk' you can also see all the loaded modules on a NetWare Server.

Nagios and SNMP — Get

These OIDs now need to be added to a service command.

1. Add check_snmp to the nagios/etc/checkcommands.cfg, as follows:

define  command {
        command_name    check_snmp
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -o $ARG1$ -C  -P $ARG2$ -l $ARG3$ -w $ARG4$ -c $ARG5$
        }

2. Configure the service to check one of the OIDs above. In this example, we add a cachebuffer_service.cfg:

define  service {
        host_name                       <your NetWare Host Names>
        service_description	Cachebuffer
        check_command                   check_snmp!.1.3.6.1.2.1.25.2.3.1.6.2!1!Cachebuffers!50000!20000
        max_check_attempts              3
        normal_check_interval           10
        retry_check_interval            1
        active_checks_enabled           1
        check_period                    24x7
        parallelize_check               1
        check_freshness                 0
        process_perf_data               1
        retain_status_information       1
        contact_groups                  novell-admins
        notification_interval           0
        notification_period             24x7
        notification_options            w,c,r
        notifications_enabled           1
        register                        1
        }

3. Once you have configured the service, check the Nagios configuration as a Nagios user.

nagios@monitor:~> /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

4. If the check returned no errors to your Shell, do a "killall nagios" and a "nagios@monitor:"

~> /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

The service is now activated. Browse to your Nagios Page and have a look at your NetWare Host you have configured in the service. You will see a additional Service called 'Cachebuffer' that looks similar to this:


Figure 5 - Configured NetWare Host

The most important cell here is the 'Performance Data' cell.

Virtualize SNMP — Get Data

With these values, you can show your Cachebuffer Utilization in a RRDTool-based application for Nagios, such as PNP (http://ederdrom.de/doku.php/nagios/pnp_en).

This tool has good German and English documentation on the web page.

Note: If you use PNP, you can add your own template to /usr/local/nagios/share/pnp/templates, or just create this symbolic link in /usr/local/nagios/share/pnp/templates.dist:

ln -s response.php check_snmp.php

1. Once you set up your RRD Tool ? perhaps PNP ? you need only to add the following command to serviceextinfo.cfg:

define  serviceextinfo {
        host_name		GNE2
        service_description        Cachebuffer
        notes_url                       /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
        icon_image                      graph.png
        icon_image_alt                 View Graphical Interface
        }

Now the Cachebuffer service appears like this:


Figure 6 - Cachebuffer service

2. Click the Service and you will see a folder symbol on the right.

3. Click the folder symbol to access the PNP graph.


Figure 7 - PNP graph

This enables you to get information from NetWare by SNMP virtualize the data with on-board instruments.

Nagios as SNMP Trap Receiver

Linux Configuration

It is also possible to monitor the NetWare SNMP traps - active or passive - by Nagios. All information from NetWare, eDirectory, or other services can be monitored. For active management of SNMP traps, you can use SNMPTT (http://www.snmptt.org/), a PHP Script and MySQL. This is described here:
http://www.nagios-wiki.de/doku.php/nagios/howtos/snmptt (in German only)

Once you have configured all these components, you can add NetWare MIB Files to SNMPTT.INI. The original MIB Files on the ZENworks 7 Server Management (ZSM) Trial CD can be used with a little script I wrote. You can download the tool here:
http://www.nagiosexchange.org/SNMP.64.0.html?&tx_netnagext_pi1[p_view]=530

I will describe only the configuration of the NetWare Servers for sending SNMP Traps.

NetWare Configuration

If your server is not NetWare 6.5/OES, you need to install the Trap files from the ZSM 7 Trial CD to your NetWare Server.

1. From the Welcome screen, choose Server Management.


Figure 8 - Server Management option

2. Choose Management and Monitoring Service.


Figure 9 - Management and Monitoring Service

3. Choose Site Management Services and Agents.


Figure 10 - Site Management Services and Agents

4. Install only the Server Management Agent - nothing else - and click Next.


Figure 11 - Installing the Server Management Agent

5. Enter the IP address of your Nagios Server in the dialog and click Next.


Figure 12 - IP address of Nagios server

6. Add the Novell servers you need. Leave the Destination Folder default.


Figure 13 - Adding Novell servers

7. Leave the next screens blank. After installation on the NetWare servers all Files required by SNMPTrap are available. A reboot is not required.

8. Configure the Trap Files need to configured manually for the Information that should be send. The configuration files are found on X:\SYSTEM\NMA\ Below is an example for a Trap file Configuration.


Figure 14 - Trap file configuration

Important: You should change the Trap Community for security purposes.

Once all the Trap-Config files are modified, the SYS:/etc/traptarg.cfg also needs to be modified with the IP address of the Nagios server.

9. Enter the IP address below the Protocol UDP Entry, like this:
192.168.1.1


Figure 15 - Nagios server IP address

Example for SNMPTraps in Nagios

When the configuration is finished, start all services on the Linux and Novell Servers (if this hasn't been done yet). To start the Trap service on NetWare, type 'nma5' at the NetWare System Console and add that command to your 'autoexec.ncf' file.

In the Nagios interface you should see information like this on the SNMP Trap service:


Figure 16 - x

Conclusion

Using this AppNote solution, it is possible to manage all traps in NetWare, BorderManager, eDirectory, ZENworks, iChain, Groupwise, Clustering, etc.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell