#179910 - 2007-08-29 05:08 AM
Re: SNMP
[Re: Gargoyle]
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
You should look at using Perl for this task. It has a number of packages for SNMP and Cisco interfaces.
|
|
Top
|
|
|
|
#179935 - 2007-08-29 03:20 PM
Re: SNMP
[Re: Richard H.]
|
Arend_
MM club member
   
Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
|
Nagios
|
|
Top
|
|
|
|
#179939 - 2007-08-29 04:36 PM
Re: SNMP
[Re: Gargoyle]
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
To whet your appetite and show how simple it can be, here is a PHP script to get the system name via SNMP:
#! /usr/local/bin/php -q
<?
print "Device name is: " . snmpget("10.0.0.1","public","system.sysName.0") . "\n";
?>
I use PHP to back up my switch / router configs by triggering a TFTP file transfer through SNMP writes, then compare the configuration with a known good state and highlighting any unauthorised changes.
I also use it for monitoring the state of the DLCI (Frame Relay) interfaces on my routers, and mailing me when a circuit changes state.
|
|
Top
|
|
|
|
#179942 - 2007-08-29 05:13 PM
Re: SNMP
[Re: Richard H.]
|
Arend_
MM club member
   
Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
|
I never really found a way to script the things that are in perfmon.msc either. Just know how to get it in Nagios.
There are some VBScript examples using snmpget.exe like Richard uses, I however hate using external programs  Link1 Link2
Edited by apronk (2007-08-29 05:17 PM)
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 1527 anonymous users online.
|
|
|