Page 1 of 1 1
Topic Options
#179778 - 2007-08-27 10:40 PM SNMP
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Does anyone know of a scriptable SNMP engine? Prefer one that I could make com calls to from a KiX script.

Thanks all
_________________________
Today is the tomorrow you worried about yesterday.

Top
#179780 - 2007-08-27 10:48 PM Re: SNMP [Re: Gargoyle]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
doesn't wmi work?
_________________________
!

download KiXnet

Top
#179781 - 2007-08-27 10:58 PM Re: SNMP [Re: Lonkero]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Only if you are looking at a Windows device... I am looking at non windows devices.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#179818 - 2007-08-28 08:38 AM Re: SNMP [Re: Gargoyle]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Look at the KixOMatic, it has SNMP, just uncomment the line where it checks for "Win32" only, or change it to SNMP.
Top
#179871 - 2007-08-28 04:59 PM Re: SNMP [Re: Arend_]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Thanks, I will look into it now.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#179882 - 2007-08-28 06:41 PM Re: SNMP [Re: Gargoyle]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Ok call me dense, but I did not find a commented line (I took the code from the first post).
_________________________
Today is the tomorrow you worried about yesterday.

Top
#179886 - 2007-08-28 07:35 PM Re: SNMP [Re: Gargoyle]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Dear Dense (you asked for it!)

I think he was referring to the code that Kix-O-Matic generated - it assumes Win32 - change that to SNMP.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#179887 - 2007-08-28 07:45 PM Re: SNMP [Re: Glenn Barnas]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Ok, I get it. This does not help me any though, as I need to do SNMP GET and SET on non windows (Cisco for example) devices.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#179910 - 2007-08-29 05:08 AM Re: SNMP [Re: Gargoyle]
Howard Bullock Offline
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#179915 - 2007-08-29 09:12 AM Re: SNMP [Re: Howard Bullock]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
I was afraid of that. I know KiX, but looks like it is time to start learning a new one.

Thought about Ruby, but Perl has alot more support out there right now.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#179918 - 2007-08-29 09:45 AM Re: SNMP [Re: Gargoyle]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
I use PHP for all my SNMP monitoring needs.
Top
#179935 - 2007-08-29 03:20 PM Re: SNMP [Re: Richard H.]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Nagios \:\)
Top
#179937 - 2007-08-29 03:41 PM Re: SNMP [Re: Arend_]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Yea we have played with Nagios, but it was great for monitoring, I never found a way to send SET.

Currently I am able to do what I need with KiX using sendkey's but that solution is really to much of a security risk. I have to have the passwords in the file and have to leave a terminal unlocked so that it will work...
_________________________
Today is the tomorrow you worried about yesterday.

Top
#179939 - 2007-08-29 04:36 PM Re: SNMP [Re: Gargoyle]
Richard H. Administrator Offline
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:
 Code:
#! /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_ Moderator Offline
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
#179970 - 2007-08-30 10:47 AM Re: SNMP [Re: Arend_]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
 Originally Posted By: apronk
There are some VBScript examples using snmpget.exe like Richard uses, I however hate using external programs


No external programs used, SNMPGET() is a PHP library function \:\/

PHP SNMP function reference: http://www.php.net/manual/en/ref.snmp.php

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1527 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.08 seconds in which 0.032 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org