SNMP Poller Plugin - v1.3.0

SNMP Poller Plugin - v1.3.0

Postby Kaota » Sat Jan 27, 2007 5:08 pm

Just finished my SNMP Poller plugin, which I've dubbed "PertSNMP". Creative, yes, I know.

Release Notes (IMPORTANT):
--- If you've got bad settings anywhere (even though they validated on the config page), your LCD will display "Error". Just fix the IP, community, OID, or whatever is wrong. If all else fails, try reloading Pertelian (though that probably won't work).
--- Config settings ARE PERSISTENT, but you need to hit the "Save" button ON EACH HOST BEFORE CHANGING TO ANOTHER. If you edit a host's settings and then switch to the next without hitting Save, you're SOL. I know of no way around this, unless there's a method of ListBox that fires before changing elements.
--- On the first load, you'll get all Errors. This is normal. Just go and edit the settings to your liking. Also, give it a few poller refreshes before trusting the information it shows, if using Counter or Net Stats. This is because it needs to gather trends from old polling results before averaging.
--- OID 2 is only used for the Net Stats. I tried to denote that with the (1&2), (1) things next to the type names. Anything put into OID 2 will be ignored otherwise.
--- If-Else only works with Values. Math also will not work with values. To use If-Else, specify the construct using semi-colons. For instance, if you want to say "if the value is 10, display "Yes" otherwise display "No", you'd type "10;Yes;No". (see screenshot below).

Changelog:
v1.3 - replaced the snmp library used. compatible on all systems i've tried (including vista x64). Please delete the old DLLs used by the prior versions before unzipping this one. It is OK to overwrite tools.dll if it asks.
v1.2 - enhanced the value option to allow for If-Else constructs (see above)
v1.1 - fixed some poller items (nothing serious)
v1.0 - initial release

Here's the DLLs (extract all to your plugins dir): http://files.radicand.org/PertSNMP-v1.3.zip

Config Screenshot:
Image
Image

LCD Photo:
Image
Last edited by Kaota on Fri Jun 22, 2007 11:10 pm, edited 10 times in total.
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby Kaota » Sun Jan 28, 2007 7:30 am

I started it tonight and finished up the network stats section. It can poll 4 hosts (with u/d information, so 8 different stats at once). I have to admit it's pretty handy. Given all the config options, I'll plan on releasing a demo version tomorrow (if I can code the config section properly, that is).

If you don't know what SNMP is, you probably don't need it. This plugin would be extremely handy for network or system admins though.
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby Minotaur » Sun Jan 28, 2007 4:14 pm

I cant wait to test. I have a few systems that respond to SNMP so it would be useful for me as well. Good luck finishing the plugin!
Minotaur
 
Posts: 53
Joined: Tue Jan 23, 2007 4:59 am

Postby Broken0007 » Mon Jan 29, 2007 4:19 am

I may be able to help test this one as well...
Chris
Broken0007
 
Posts: 43
Joined: Thu Dec 21, 2006 5:36 am
Location: Corvallis, Oregon

Postby Kaota » Mon Jan 29, 2007 6:21 am

Added Beta Plugin
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby Alex » Fri Feb 02, 2007 4:39 am

On CDC.
ForeSight Systems LLC
ALEXANDER S. JARZEBINSKI
Chief Executive Officer
(714) 657-2522
Email: alex@pertelian.com
Alex
 
Posts: 1016
Joined: Tue Dec 06, 2005 5:36 pm

Postby ABx » Fri Feb 02, 2007 11:30 pm

YES! Thank you!! I just came here to request something like this! I can't wait to give it a go, will let you know if I run into any problems.
ABx
 
Posts: 19
Joined: Fri Oct 27, 2006 5:56 am

Postby ABx » Sat Feb 03, 2007 3:31 am

It seems to be working fairly well, but there's one thing that I would really like. I have a dual-WAN router which utilizes a cable connection and a DSL connection. There is an SNMP function: iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus

This will indicate whether the connection is up or not, but unfortunately it's not a binary 0 or 1, it bounces from very long decimals to 2.xxxxxxxxxxxxxxxxxxxxxxxx - although I believe that 0 means "down". It would be really nice if I could set it to show just "Up" or "Down", or possibly "True" or "False". Even just rounding to the nearest whole number would work, too.

One last thing that would be nice, if possible, is if it could be set to poll at different intervals for different "Hosts".

Overall it's an excellent plugin, however.. thanks for making it :)
ABx
 
Posts: 19
Joined: Fri Oct 27, 2006 5:56 am

Postby Kaota » Sat Feb 03, 2007 5:38 am

Hi ABx,

Thanks for giving me some feedback on the plugin, it's always nice to hear other's thoughts.

Different intervals for the hosts would (unfortunately) require a substantial amount of work due to the way I have the plugin tracking and updating information. The limitation right now is that I'd have to find a way to pass an argument to the callback function of each timer (for the polling). I don't believe that's possible, so I'd have to do some extra work to get around that.

On the value transformation though, that seems feasible. It won't be quite as easy to write a parser, but I agree it's worth having. The functionality I'd be coding for this would let you specify some sort of "if value==X then display Y" thing. Let me know if you thought differently.
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby ABx » Sat Feb 03, 2007 7:01 pm

The functionality I'd be coding for this would let you specify some sort of "if value==X then display Y" thing. Let me know if you thought differently.
That was indeed one of the things I was thinking, and would be perfect. The freeware network monitoring application "The Dude" does pretty much that, if it helps to have an example. In that application's case it actually translates it to "Up" or "Down" for those specific values, but that application is definitely more complex than a plugin.
ABx
 
Posts: 19
Joined: Fri Oct 27, 2006 5:56 am

Postby Kaota » Sun Feb 04, 2007 7:32 pm

Added the if-else construct. In your instance, using "0;Down;Up" might work best.
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby ABx » Sun Feb 04, 2007 10:14 pm

Excellent. It seems to be working well, thanks for getting that in so fast!
ABx
 
Posts: 19
Joined: Fri Oct 27, 2006 5:56 am

Postby Kaota » Mon Feb 05, 2007 5:20 am

Just a heads up, I was flipping through some OIDs earlier today and noticed I was getting 1 for Up and 2 for Down (regarding interface statuses). May want to verify that 0 is Down for your device.
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby rck » Fri Feb 09, 2007 3:03 pm

Maybe a stupid question, but I have a lot of devices in my network. Is there any kind of "SNMP detector" available, maybe similar to nmap? I'd love to be able to scan my LAN for SMTP devices...
rck
 
Posts: 56
Joined: Fri Jan 12, 2007 11:18 pm

Postby Kaota » Sat Feb 10, 2007 4:37 pm

ABx posted one a few replies up, called The Dude.
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby rck » Sat Feb 10, 2007 4:58 pm

Thanks, cool tool! Now I only have to figure out how it works :-)
rck
 
Posts: 56
Joined: Fri Jan 12, 2007 11:18 pm

Postby Kaota » Tue May 15, 2007 2:57 am

Now that I've upgraded to Vista x64, I've noticed that my plugin does not appear to work. I'll be investigating this (and releasing an update once identified), but if someone else could let me know if it fails for them as well, that would help.

By failing, I mean that the display shows "Error" even though you've put in valid SNMP information.

Thx
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby Kaota » Thu May 17, 2007 8:54 pm

Well bad news; I don't know if it's Vista or x64, but the SNMP utility DLL that my project uses refuses to work in the environment. I'll need to find a new snmp dll probably, which may take some time. In the meantime, please let me know your experiences on Vista or x64, it may help me narrow some stuff down more.
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby Jabroni » Wed Jun 06, 2007 1:35 am

I just tried your plugin but I cant seem to get it working :( I got XP SP2, I copied the dlls to the plugins directory of the pertelian dir, configured the OID (for my dd-wrt flashed router) configured the OID values, and no go, I just get Error on screen. I tried with another SNMP program to get the OID im looking and the values are Ok. Now I ran a sniffer to see if it was actually quering tne snmp daemon on my router, and seems like its not even trying to connect to the router (ip on the config window is written ok)

Any idea what else could it be? Im running the latest pertelian software (SetupPertelian4.2007.04.24.exe)

Thanks,
Jabroni
Jabroni
 
Posts: 2
Joined: Wed Jun 06, 2007 1:27 am

Postby Kaota » Fri Jun 22, 2007 1:16 am

Hi Jabroni, thanks for the followup. I never did figure out what happened with the old library, but please try the just posted v1.3. It should fix your issues, as it certainly fixed mine. Let me know!
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby Alex » Fri Jun 22, 2007 7:28 pm

Kaota,
Is the version that you have available here one that I can use to update the one on the CDC?
ForeSight Systems LLC
ALEXANDER S. JARZEBINSKI
Chief Executive Officer
(714) 657-2522
Email: alex@pertelian.com
Alex
 
Posts: 1016
Joined: Tue Dec 06, 2005 5:36 pm

Postby Kaota » Fri Jun 22, 2007 11:11 pm

Hi Alex,

Yes, please use the file linked above. I just committed a small change now, so if you downloaded it earlier today, please grab it again.

Thanks!
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby Alex » Sat Jun 30, 2007 9:05 pm

Sorry it took me so long to update. It's in there now.
ForeSight Systems LLC
ALEXANDER S. JARZEBINSKI
Chief Executive Officer
(714) 657-2522
Email: alex@pertelian.com
Alex
 
Posts: 1016
Joined: Tue Dec 06, 2005 5:36 pm

Re: SNMP Poller Plugin - v1.3.0

Postby [bubbles] » Tue Jul 03, 2007 1:04 pm

Kaota wrote: --- Config settings ARE PERSISTENT, but you need to hit the "Save" button ON EACH HOST BEFORE CHANGING TO ANOTHER. If you edit a host's settings and then switch to the next without hitting Save, you're SOL. I know of no way around this, unless there's a method of ListBox that fires before changing elements.


What did you write this in? Going from my RealBasic experience, there is an event that fires when you change items in a listbox. (forget what it's called, but i could look it up)
[bubbles]
 
Posts: 7
Joined: Tue Oct 17, 2006 4:16 pm

Postby Kaota » Tue Jul 03, 2007 5:15 pm

It's in C#.NET. I'll eventually post up an SVN repos for those who are interested; just need to iron out some ACLs.
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 0 guests

cron