Community discussions

MikroTik App
 
andrewgroup
just joined
Topic Author
Posts: 3
Joined: Thu Jan 15, 2009 6:16 am
Location: Indiana
Contact:

Are raw SNMP GET's supported

Sat Jan 17, 2009 5:51 pm

New to MikroTik and Dude, and all is good but can't get over my last hurdle. Can Dude support a direct SNMP Get Command?

If, not and this requires a compiled MIB imported into Dude, what tool(s) would you recommend that can create a MIB so that we can pull this data from our PBX snmp interface?

Here is a working batch file and the results it gets from the VoIP PBX software we support.

;sample batch file to get all WIKI variables
;Call Objects Yes Calls
;Registrations Yes Registrations
;Messages Yes Minutes
;Call Attempts No Calls
;Successful Calls No Calls
;Media CPU load Yes Value 0..100
;Successful Emails No Emails
;Unsuccessful Emails No Emails
;Email Alert Flag Yes Value 0..1
;SIP Received Packets No Packets
;SIP Sent Packets No Packets
;
;
SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.1
SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.2
SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.3
SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.4
SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.5
SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.6
SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.7
SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.8
SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.9
SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.10
SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.11

The above batch file results in the following outputs

C:\SNMP>SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.1
Variable = .iso.org.dod.internet.private.enterprises.25060.1.1
Value = Integer32 0

C:\SNMP>SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.2
Variable = .iso.org.dod.internet.private.enterprises.25060.1.2
Value = Integer32 14

C:\SNMP>SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.3
Variable = .iso.org.dod.internet.private.enterprises.25060.1.3
Value = Integer32 41

C:\SNMP>SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.4
Variable = .iso.org.dod.internet.private.enterprises.25060.1.4
Value = Integer32 28

C:\SNMP>SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.5
Variable = .iso.org.dod.internet.private.enterprises.25060.1.5
Value = Integer32 224

C:\SNMP>SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.6
Variable = .iso.org.dod.internet.private.enterprises.25060.1.6
Value = Integer32 0

C:\SNMP>SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.7
Variable = .iso.org.dod.internet.private.enterprises.25060.1.7
Value = Integer32 99

C:\SNMP>SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.8
Variable = .iso.org.dod.internet.private.enterprises.25060.1.8
Value = Integer32 0

C:\SNMP>SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.9
Variable = .iso.org.dod.internet.private.enterprises.25060.1.9
Value = Integer32 0

C:\SNMP>SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.10
Variable = .iso.org.dod.internet.private.enterprises.25060.1.10
Value = Integer32 349306

C:\SNMP>SNMPUTIL.EXE get pbx.yourdomain.com public .1.3.6.1.4.1.25060.1.11
Variable = .iso.org.dod.internet.private.enterprises.25060.1.11
Value = Integer32 349387
 
pjulian
Member Candidate
Member Candidate
Posts: 267
Joined: Mon May 31, 2004 12:16 pm
Location: Sydney, Australia

Re: Are raw SNMP GET's supported

Sat Jan 17, 2009 6:48 pm

Yes, just setup the device in The Dude, then setup SNMP parameters for it, then use tools/SNMPWalk and locate the OID for the item you want to monitor, then right click on it and select Create Probe.

Once you have created the probe, add it in the services tab of the device, then you can monitor it and graph the results if you like.

Regards
Paul
 
andrewgroup
just joined
Topic Author
Posts: 3
Joined: Thu Jan 15, 2009 6:16 am
Location: Indiana
Contact:

Re: Are raw SNMP GET's supported

Sat Jan 17, 2009 8:50 pm

The PBX does not support SNMPWALK - All queries must be GETS - Does this change the process?
 
pjulian
Member Candidate
Member Candidate
Posts: 267
Joined: Mon May 31, 2004 12:16 pm
Location: Sydney, Australia

Re: Are raw SNMP GET's supported

Sun Jan 18, 2009 12:39 am

Not if you already know the OID, just create an SNMP probe and put the OID in there
SNMPWalk just makes the process of creating a SNMP probe easier.

Regards
Paul
 
JayC
just joined
Posts: 6
Joined: Sat Jun 21, 2008 5:36 pm

Re: Are raw SNMP GET's supported

Fri Feb 13, 2009 1:02 am

Not if you already know the OID, just create an SNMP probe and put the OID in there
SNMPWalk just makes the process of creating a SNMP probe easier.
Regards Paul
Thanks very much, I have been puzzling how to add SNMP polls to The Dude for a lon time now, and your hints got me over the top.

Now I am faced with a new problem, and perhaps it is my expectations of what The Dude does that is at fault.

The particular problem that I have is monitoring the power subsystems at a remote site, I have an SNMP enabled device (SiteRat) that allows me to monitor Solar Power, Wind Power, Load Power (all are current measurements taken from a shunt) and Battery voltage.

What I want to do is collect and graph the values with SNMP, and stuff the polled values into a MySQL database. I had thought that with the dude I would be alble to poll the values out by OID, and that The Dude would graph the retrieved value for me.

However now that I have it working it appears that what The Dude plots on the graph is not the value of the OID, but the time it took to service the request.

I guess my question is if it is possible to retrieve and plot OID values with The Dude, I have another package that does this for me, but I had hoped to do it with the Dude so I would not have to run two pacakges (I use the dude for other monitoring purposes on this application as well as SNMP)

Thanks in advance for any hints, pointers, or Ideas

jayr

jayc@vegas-wireless.com
 
adamd292
newbie
Posts: 48
Joined: Tue Oct 07, 2008 8:56 am

Re: Are raw SNMP GET's supported

Fri Feb 13, 2009 1:46 am

As you've found SNMP probes can only be graphed as the time taken to retrieve their value.
I've found they're useful for:
* automatic identification of devices; and
* checking whether the SNMP daemon is running; and
* checking whether a status is ok.

If you want to collect data and graph it, you probably need a Function probe:
function_probe.PNG
There is a large number of these posted to the Probe Thread
http://forum.mikrotik.com/viewtopic.php?f=8&t=12402
You do not have the required permissions to view the files attached to this post.
 
Razor73
just joined
Posts: 1
Joined: Thu Apr 02, 2009 7:08 am

Re: Are raw SNMP GET's supported

Thu Apr 02, 2009 7:50 am

As you've found SNMP probes can only be graphed as the time taken to retrieve their value.
I've found they're useful for:
* automatic identification of devices; and
* checking whether the SNMP daemon is running; and
* checking whether a status is ok.

If you want to collect data and graph it, you probably need a Function probe:
function_probe.PNG
There is a large number of these posted to the Probe Thread
http://forum.mikrotik.com/viewtopic.php?f=8&t=12402
thanks for this i try it and it works thanks for this and more power.`
_________________
IP PBX