Extension:SNMPquery

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
SNMPquery
Release status: beta
Implementation Tag , Parser function
Description Do SNMP queries to your boxes!
Author(s) (rururudytalk)
License Beerware (You owe me a beer/coffee if you use this software)
Download Template:WikimediaDownload/svn
Example <snmp mode=get host=4.2.2.1 community=public oid=.1.3.6.1.2.1.1.3.0>Uptime: </snmp>
none
SNMP
Translate the SNMPquery extension if it is available at translatewiki.net
Check usage and version matrix.

What can this extension do?[edit]

You can use the extension to do SNMPget and SNMPwalk functions and return the data into your wiki! How is your wifi connection??? Query your router with SNMP and add the info to your wiki!

Usage[edit]

Example inline:

<snmp mode=get host=4.2.2.1 community=public oid=.1.3.6.1.2.1.1.3.0>Uptime: </snmp>

Example in a template where the IP is a variable:

     {{ #snmpget:  {{{ip}}}|public|.1.3.6.1.2.1.1.3.0| '''Uptime:''' }}
     {{ #snmpwalk: {{{ip}}}|public|.1.3.6.1.4.1.14988.1.1.1.1.1.4|<br>'''Signal Strength:'''|dBm}}

Download instructions[edit]

Please cut and paste the code found below and place it in $IP/extensions/SNMPquery.php. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation[edit]

To install this extension, add the following to LocalSettings.php:

require_once("$IP/extensions/SNMPquery/SNMPquery.php");