Snmp2wiki
From M@Wiki

Main Page | About | Help | FAQ | Special pages | Log in

Categories: Perl | Nagios
Printable version | Disclaimers | Privacy policy

Contents

Overview

snmp2wiki is a framework to build and update MediaWiki wikis with information gathered from SNMP.

-H|--HOST= <host> -C|--community=<snmp community> [-t <timeout>] 
-m|--mode=<PORTS|SW>
[-w|--wikipage=<wikiPageName>] [-s|--section=<Section_Name>] [-l|--level=<heading level> 

Wiki Options

Specifying a wikipage chooses the destination for the data, and when combined with a section will allow for a consistent location, look and feel. The level option in combination with a section, allows for customization of the heading type. A level of 1 is equivalent to a first-level section, 2 is a second-level, etc.

While not (yet) exposed through the command-line, the ability to do wiki-authentication is simple to customize in the code.

Fetch and Build

Regardless of the mode selected, snmp2wiki will fetch relevant data, parse and format it, and in conjunction with the Wiki Options will:

  1. Fetch the current Page/Section
  2. Compare the fetched version with the just-built version
  3. Update the Page/Section if the versions differ

PORTS

PORTS mode will fetch a list of listening TCP ports and open UDP ports, cross-reference the port number with the 'services' database, and provide a 'netstat-esque' view of listeners. The list is sorted in descending order by port number.

udp  137.143.110.11:123 (ntp)
tcp  0.0.0.0:135 (epmap)


SW

SW mode will fetch a list of installed software. This list is slightly different depending on OS. The list is sorted in descending order by install date.

Windows:

2009-1-5,9:13:12 - Security Update for Windows Server 2003 (KB954600)
2008-11-15,17:35:44 - Adobe Flash Player 10 Plugin
2008-11-11,8:53:10 - Mozilla Firefox (3.0.3)

Linux:

2008-12-10,13:46:33 - perl-GSSAPI-0.24-6.fc9
2008-12-9,9:18:17 - gqview-2.0.4-6
2008-11-17,13:23:15 - kernel-2.6.27.5-37.fc9

Nagios AutoBuilder

When used in conjunction with Nagios, snmp2wiki can poll all of your Nagios-defined systems and update their wikipages. The autobuilder assumes:

  • Both modes are desired
  • One wikipage per system, with the name of the system
  • section will be Port Usage or Installed Software (respective of mode)
  • All members of the defined hostgroups will be polled

Retrieved from "http://mattwork.potsdam.edu/projects/wiki/index.php/Snmp2wiki"

This page has been accessed 496 times. This page was last modified 16:22, 3 February 2009.