Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

SNMP

If you have a question or need help, this is the place to be.
Post Reply
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SNMP

Post by krambriw »

Another straight forward way could be that you use an OPC DA server for SNMP monitoring (there are many of those around).

Then you could easily connect to it using the plugin for OPC DA Client I made. You find it here:
viewtopic.php?f=9&t=3433&p=19687&hilit= ... ent#p19687

The advantage would be that the whole SNMP stuff will be provided and maintained by the SNMP OPC server provider...

Most of the SNMP OPC Servers can run in evaluation mode so that you at least can try it out for free. My OPC Client plugin is of course completely free.

BR
Last edited by krambriw on Thu Mar 21, 2013 6:26 pm, edited 1 time in total.
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: SNMP

Post by jinxdone »

Maybe something like this will help? Change the appropriate commands inside so that they work for you.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1610">
    <Macro Name="SNMPGET" Expanded="True">
        <Action>
            System.Execute(u'cmd.exe', u'/c "for /f "usebackq delims=" %s in (`snmpget -v 1 -c public 192.168.0.251 .1.3.6.1.4.1.318.1.1.4.4.2.1.3.5`) do c:\\programs\\eventghost\\eventghost.exe -e SNMPGET %s"', 3, False, 2, u'q:\\', False)
        </Action>
    </Macro>
</EventGhost>
It's using the fact that the cmd.exe has an internal FOR command you can use to route the output from the first command as a parameter to a second one.. the FOR command processes each line of output separately so you will get one event per line of output which might be a problem, or not..

In EG the event's payload data is available in the eg.event.payload variable.


I think it might be worth it to start looking into that pysnmp package you mentioned, there is no reason why we couldn't have an SNMP plugin for EG, if only somebody has the time and inspiration to make one.

-jinxdone
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SNMP

Post by krambriw »

Time is also money and someone has to spend time to make it...I did not expect that you only was looking for free things

BR
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SNMP

Post by krambriw »

if just a couple of devices at home, you could also consider the ping plugin (simple live check)
Post Reply