Community discussions

  • 1
  • 3
  • 4
  • 5
  • 6
  • 7
 
awarfield
just joined
Posts: 2
Joined: Fri Mar 02, 2012 4:26 am

Re: Probe Thread

Thu Jun 06, 2013 4:59 am

Hi, This is my label for

It just lists the printer count for colour and black

Sharp MFD
[Device.Name]
Black: [oid("1.3.6.1.4.1.2385.1.1.19.2.1.3.5.4.61")]
Colour: [oid("1.3.6.1.4.1.2385.1.1.19.2.1.3.5.4.63")]
[Device.ServicesDown]

Samsung Printers
[Device.Name]
Black: [oid("1.3.6.1.2.1.43.10.2.1.4.1.1 min 1.3.6.1.4.1.236.11.5.11.83.1.1.1.1.20")]
[Device.ServicesDown]

HP 1320 (dont know if it works for other HP printers)
[Device.Name]
Black: [oid("1.3.6.1.2.1.43.10.2.1.4.1.1")]
[Device.ServicesDown]
 
User avatar
dazm
just joined
Posts: 21
Joined: Mon Oct 03, 2011 5:09 am
Location: Russia

Re: Probe Thread

Mon Jun 10, 2013 8:31 am

Unswer for you Sebastian.

I decided to show how it works for me in pictures :)

I reworked some funtions:

search 2nd ip-address in the array of addresses.

The auxiliary function, which determines the availability of ip-addresses.

Listing of that function below:
Name: ping2s
Code: if((array_element(ping(Device2Address()),0)=-1),"false",array_element(ping(Device2Address()),0)+1)

My Probes

Listing of probe config below:
Name of probe: ping2
Type: Function
Error: if (ping2s()<>"false",(if (ping2s()-1 < 500, "", concatenate("RTT_", ping2s(), "_ms"))),"timeout")
Value: array_element(ping(Device2Address()),0)
Unit: ms

And how it works

p.s. I find one mistake, on my sub-funtions, and corrected it. Now all worked fine.
 
CypherBit
just joined
Posts: 18
Joined: Tue Mar 06, 2012 10:06 am

Re: Probe Thread

Thu Jun 13, 2013 11:49 am

We run a couple of SQL Servers, and I found it useful to track the amount of memory that the SQLserver process was consuming - in this case I was looking for sqlsrvr.exe in the list of running processes, so to look for and plot the memory consumption for other processes, simply change "sqlservr.exe" for something else such as "System Idle Process".
Any idea how one would use this if we only have one central SQL server with multiple instances. It appears one is picked by Dude, but I need to follow all four.
 
homerkaro
just joined
Posts: 11
Joined: Mon Jul 16, 2012 4:40 pm

Re: Probe Thread

Fri Jun 21, 2013 3:31 pm

Hi!
I'm trying to create a probe to check if a program runs on my server or not.
First i'd like to test it with the notepad.exe so i created this probe:
Type: function
Available: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"),"NOTEPAD.EXE")>0, 1, -1)
Error: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"),"NOTEPAD.EXE")>0, "", "NOTEPAD.EXE not detected by SNMP probe")
Value: 1 (or anything else, is purely for charting purposes and I return 1 if the service is running)
Unit: running (or whatever you want to call the above values)
Rate: none

But its not working. I'm getting unreachable error message. The snmp is configured well because i can get other properties of my computer (cpu,hdd, memory).
What do i do wrong?
Thanks!
Daniek
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Mon Jun 24, 2013 5:01 pm

Hi Homerkaro, FYI, on the available line the -1 will always return true. Make a function and call it from a probe to make it work better.

The function;
Name: find_notepad
Description: find the array index to notepad or return False
Code: if(array_size(oid_column("1.3.6.1.2.1.25.4.2.1.2",10,0)), array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2",10,0),"notepad.exe"),"False")

The Probe;
Name: notepad
Type: Function
Available: find_notepad()<>"False"
Error: if(find_notepad()<>"False",if(find_notepad()<>-1, "", "Warning: notepad not running"), "Failed to read running programs")


Note: Windows 7 returns -1 if the program is not running. The available line works since -1 is "true" and when the SNMP section does not exist the function returns "False" (The probe will not automatically install on devices that do not have the OID for programs)

I suspect some operating systems will give you cpu utilization for a single process, maybe you could graph that.
Lebowski.
Available: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"),"NOTEPAD.EXE")>0, 1, -1)
 
ephillips
just joined
Posts: 3
Joined: Thu Jun 27, 2013 7:45 pm

Re: Probe Thread

Thu Jun 27, 2013 7:49 pm

I am new to The Dude and was trying to get a set up to see if a specific scm product and a sql server is running. Is it at all possible to do either of these tasks?
 
amokkatmt
newbie
Posts: 30
Joined: Mon Oct 24, 2011 3:31 pm

Re: Probe Thread

Thu Oct 31, 2013 11:13 pm

Hello. How can I count active interfaces? Please see screenshots. How can I count those with status "up" ? This is EPON OLT, so interface count is dynamic and their states are dynamic too.
oids1.png
oids2.png
Thank you for any help.
You do not have the required permissions to view the files attached to this post.
 
User avatar
itsupportschulen
just joined
Posts: 21
Joined: Fri May 24, 2013 10:57 am
Location: Germany, Herford
Contact:

Re: Probe Thread

Wed Nov 20, 2013 11:38 pm

Hello together,

here are some probes of mine of the last few days:

temperature of Fujitsu Siemens Server if you have Serverview installed:

Name: temp_FSC_01_AMBIENT
Available: if(string_size(oid("1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.0")), 1, 0)
Error: if(oid("1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.0")<10, concatenate("ACHTUNG Temperatur = ", oid("1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.0"), "° C"), "")
Value: oid("1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.0")
Unit: °C

some oids of other temperatures with which you can create some probes like the shown one:
1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.1 (SYS1)
1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.2 (SYS2)
1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.3 (SYS3)
1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.4 (CPU)
1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.5 (MEM_A)
1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.6 (MEM_B)
1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.7 (MEM_C)
1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.8 (PSU1_Inlet)
1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.9 (PSU2_Inlet)
1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.10 (PSU1)
1.3.6.1.4.1.231.2.10.2.2.5.2.1.1.11.0.11 (PSU2)

Works on a FSC TX150 S8.


Name: HP_DriveArrayState
Available: if(string_size(oid("1.3.6.1.4.1.232.3.1.3.0")), 1, 0)
Error: if(oid("1.3.6.1.4.1.232.3.1.3.0")>2,if(oid("1.3.6.1.4.1.232.3.1.3.0")=3,"degrade",if(oid("1.3.6.1.4.1.232.3.1.3.0")=4,"failure","")),"")
Value:
Unit:

Checks the RAID on HP Servers, (this return a number: 2=ok, 3=degradate, 4=failure)
http://pandorafms.com/index.php?sec=Lib ... id_PUI=261


Name: FSC_GlobalState
Available: if(string_size(oid("1.3.6.1.4.1.231.2.10.2.11.2.1.0")), 1, 0)
Error: if(oid("1.3.6.1.4.1.231.2.10.2.11.2.1.0")>1,if(oid("1.3.6.1.4.1.231.2.10.2.11.2.1.0")=2,"degrade",if(oid("1.3.6.1.4.1.231.2.10.2.11.2.1.0")=3,"error",if(oid("1.3.6.1.4.1.231.2.10.2.11.2.1.0")=4,"fail",if(oid("1.3.6.1.4.1.231.2.10.2.11.2.1.0")=5,"unknown","")))),"")
Value:
Unit:

(This OID indicates the Global state, not only RAID disk failure. 1=OK, 2=Degradate,3=Error, 4= Failure)

HTH
Sebastian
PLEASE open source the code or let us pay for The Dude!
 
kaipr
just joined
Posts: 4
Joined: Wed Oct 12, 2011 8:33 am

Re: Probe Thread

Tue Dec 03, 2013 3:52 pm

Hello there,

since the update for Dude isn't comming for years, and I need to check on IPv6 devices as well as on IPv4, I would like to consult you guys, if you have an idea how to implement IPv6 ping probe. For start, I have put the IPv6 address into the user parameter1 of the device, and have made a tool for hand checking:

ping [Device.CustomField1]

What I would like to achieve, is a service, which has a custom probe, using a function which evaluetes the output of the ping command. Any ideas for a simplistic solution here?

Thank you, i'm sure this would help a lot of people.

Vlasta
 
m2hewitt
just joined
Posts: 1
Joined: Mon Jan 06, 2014 3:16 pm

Re: Probe Thread

Mon Jan 06, 2014 3:27 pm

Hi guys

i have a probes for check the memory usage over application, for example:

Image

Image

And they has working OK, but i need configure alarm if this they exceed a memory consumption. how can i do?

Regrds,
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 2946
Joined: Tue Feb 25, 2014 12:49 pm
Location: Capalbio, Tuscany, Italy

Re: Probe Thread

Fri Mar 28, 2014 2:13 pm

I made one probe for check the status of ethernet or sfp port (connected or not):

http://forum.mikrotik.com/viewtopic.php ... 08#p418008
I'm Italian, not English. Sorry for my imperfect grammar.
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Mon Apr 07, 2014 11:02 pm

If the dude is set to auto discover and you use -1 for false in the available line the probe will install on every device.
AVAILABLE: if((oid("1.3.6.1.2.1.25.2.3.1.6.1")/oid("1.3.6.1.2.1.25.2.3.1.5.1"))*100>0, 1, -1)
The available line is to determine if the OID exists on the device in question but negative one is not false in the available line...

It is way better to create a function that returns a value or False. Then call that function from a probe.
Function
disk03test
if(array_size(oid_column("1.3.6.1.2.1.25.2.3.1.6",10,5)),round((oid("1.3.6.1.2.1.25.2.3.1.6.3",10,5)/oid("1.3.6.1.2.1.25.2.3.1.5.3",10,5))*100),"False")

Another function to grabs the name of the disk then if it is in error the drive letter or unix name can be returned in the error message.
Funciton
disk03name
oid("1.3.6.1.2.1.25.2.3.1.3.3" ,10,5)

So now in the probe the available line is simplified to test for "False".
The error line can also detect if the probe can't read the disk or if the disk is full...
The Probe
Available: disk03test() <> "False"
Error: if(disk03test()<>"False",if(disk03test() < 90, "", concatenate("Warning: ", disk03name(), " is ", disk03test(),"%")), "Failed read 3rd disk")
Value: disk03test()
unit: %

HTH,
Lebowski
 
guisalazar
just joined
Posts: 6
Joined: Wed Nov 30, 2011 5:57 pm

Re: Probe Thread

Tue Jun 03, 2014 3:40 pm

anyone know how to probe the status of an PPTP server?

Thanks
 
nhathaitrieu6
just joined
Posts: 5
Joined: Fri Jun 27, 2014 1:21 pm
Location: Hồ Chí Minh
Contact:

Re: Probe Thread

Fri Jun 27, 2014 1:26 pm

Hello

Someone maybe with an Hp Procurve 5406 switch ?? Im searching for CPU and Memory OID's

Thanks
Patek Philippe Ref. 5271P mua đồng hồ casio chính hãng ở đâu là phiên bản trang sức cao cấp của Ref. 5270 và một số màu đen trổi
 
User avatar
itsupportschulen
just joined
Posts: 21
Joined: Fri May 24, 2013 10:57 am
Location: Germany, Herford
Contact:

Re: Probe Thread

Thu Aug 28, 2014 12:12 am

Hello,

maybe someone :wink: here it comes:

Probe name : cpu_procurve
Type: Function
Available: if(string_size(oid("1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0")), 1, 0)
Error: if(oid("1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0")>80, concatenate("ATTENTION CPU usage =", cpu_procurve(), "%"), "")
Value: oid("1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0")
Unit: %


Probe name : temp_ProCurve_2 > 45 C
Type: Function
Available: if(string_size(oid("1.3.6.1.2.1.99.1.1.1.4.17")), 1, 0)
Error: if(oid("1.3.6.1.2.1.99.1.1.1.4.17")<45, "", concatenate("ATTENTION Temperature = ", oid("1.3.6.1.2.1.99.1.1.1.4.17"), "° C"))
Value: oid("1.3.6.1.2.1.99.1.1.1.4.17
Unit: °C

These probes works on most HP ProCurves Switches with CPU und Temperature sensors/feature.
Zwischenablage-13.jpg
Zwischenablage-2.jpg
Zwischenablage-1.jpg
HTH
Sebastian
You do not have the required permissions to view the files attached to this post.
PLEASE open source the code or let us pay for The Dude!
 
WinWisp
just joined
Posts: 4
Joined: Thu Apr 24, 2014 8:51 pm

Re: Probe Thread

Thu Sep 04, 2014 1:42 am

Here is our ntp probe, tested and working on our ubuntu 12.04 ntpd servers
Capture.PNG
For ease of copy/paste, here is the 'Send' string:
\x1b\00000000000000000000000000000000000000000000000
You do not have the required permissions to view the files attached to this post.
 
Islander
just joined
Posts: 1
Joined: Sat Sep 13, 2014 1:52 pm

Re: Probe Thread

Sat Sep 13, 2014 2:01 pm

This is probably very simple, but I've been struggling for a few days now.

I'm running web-based VLC on a number of Raspberry Pi's (I'm an entertainment technician at a large leisure site, and these Pi's play music in various areas), and am using The Dude to alert me if any of the Pi's go down by way of using the Ping probe - works fine.

The web-based VLC has an XML status page, which has an assortment of information such as the state of the player ('playing', 'stopped'), volume, track being played etc. I'd really like a couple of probes to read/parse this xml, and a) alert me if a player isn't in the state 'playing', and b) display information on my map such as track playing, volume.

I've tried modifying the http probe, but with little luck, and I'm not sure where else to look. Any advice?

Thanks :)
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Mon Sep 15, 2014 7:46 pm

The HTTP probe will look for a word on the resulting page but displaying that word is problematic. The right way to do this is to grab the xml with an execute function and return you own result, then use that in a label for the device.

There are quite a few posts around asking how to use the execute function so search for them and read those first but here are the steps...
Install a text browser into your dude server(linx is linux based there has to be a windows one), put it in the root of the C: drive or at least in a folder with out spaces like c:\tools\linx.exe. That will hopefully simplify parameters

Create a batch job that runs linx and then use something like grep to parse the xml... There is a grep for windows as well. (note this is off the cuff so it is not exact)
Then the execute statement will be like;
execute("pstate.bat", "device.Firstaddress"," c:\\tools\")

The lines of the batch job will be something like
linx %1/webpagename.xml > tempxml.txt
if grep playing tempxml.txt echo playing
if grep stopped tempxml.txt echo stopped
if grep track tempxml.txt echo track

(%1 will be seen as device.firstaddress in the batch job)

Grep is probably not a very good thing to parse xml and maybe you will need to create a custom VB script or use Expect to give better results but you should be able to build something.

A good troubleshooting tip is to get the results of each step to display through a device label so you are certain it is working as planned.

You can modify the label refresh interval on the map settings but I am not certain how effective this will be to keep the label accurate.

HTH,
Lebowski
 
altecsole
just joined
Posts: 2
Joined: Thu Sep 25, 2014 10:01 pm

Re: Probe Thread

Thu Sep 25, 2014 10:44 pm

Here is our ntp probe, tested and working on our ubuntu 12.04 ntpd servers
Capture.PNG
For ease of copy/paste, here is the 'Send' string:
\x1b\00000000000000000000000000000000000000000000000
Many thanks, this worked for our Windows NTP servers too.
 
altecsole
just joined
Posts: 2
Joined: Thu Sep 25, 2014 10:01 pm

Re: Probe Thread

Fri Oct 10, 2014 6:27 pm

The function to display on device label UserName of user logged on a Windows Host.

You must know that:
1. There is no SNMP oid to check user logged on Windows host.
2. You can retreive UserName of logged user using WMI.
3. The Dude has not WMI support.
4. The Dude can run any executable file and retreive it's result using build in function execute.
5. It is easy to access any of WMI functions using simple VBScript.

Let put it all together and create sample function to retreive UserName of user logged on a Windows Host using WMI and put it on device label.
Thank you so much for this post. I'd been wrestling with something similar for several hours. Very much appreciated.
 
berny81
just joined
Posts: 3
Joined: Mon Oct 13, 2014 5:38 pm

Re: Probe Thread

Mon Oct 13, 2014 5:53 pm

I would like to start a thread that has custom Probe example on it. My hope is not only to further my Knowledge but hopefully help others with this great software.


Here are a few I have made.

Cisco CPU
Type: Function
Available: if(oid("1.3.6.1.4.1.9.2.1.58.0")>0, 1, -1)
Error: ""
Value: oid("1.3.6.1.4.1.9.2.1.58.0")
Unit: % of cpu load

APC PDU LOAD
Type:Function
Available:if(oid("1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1")>0, 1, -1)
Error: if(oid("1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1")>0, "", "No Load")
Value: oid("1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1")
Unit: Load amps in decimal
Hi All,

I am new to the Dude and i want to create a function then use it in a probe for example if the OID temp of a cisco switch goes above 65 degree to send an email notification indicating the actual temperature with a message "Please check server room temp"
I checked the example above but quite honestly i am not getting the programing language how it works.
per ex: what is >0, 1, -1)
>0, "", "No Load")

Can someone please explain to me with a simple example how to read the command line ?

Also what is confusing is that > 65 means lower than !
Thanks in advance
 
berny81
just joined
Posts: 3
Joined: Mon Oct 13, 2014 5:38 pm

Re: Probe Thread

Mon Oct 13, 2014 6:03 pm

I would like to start a thread that has custom Probe example on it. My hope is not only to further my Knowledge but hopefully help others with this great software.


Here are a few I have made.

Cisco CPU
Type: Function
Available: if(oid("1.3.6.1.4.1.9.2.1.58.0")>0, 1, -1)
Error: ""
Value: oid("1.3.6.1.4.1.9.2.1.58.0")
Unit: % of cpu load

APC PDU LOAD
Type:Function
Available:if(oid("1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1")>0, 1, -1)
Error: if(oid("1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1")>0, "", "No Load")
Value: oid("1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1")
Unit: Load amps in decimal
Hi All,

I am new to the Dude and i want to create a function then use it in a probe for example if the OID temp of a cisco switch goes above 65 degree to send an email notification indicating the actual temperature with a message "Please check server room temp"
I checked the example above but quite honestly i am not getting the programing language how it works.
per ex: what is >0, 1, -1)
>0, "", "No Load")

Can someone please explain to me with a simple example how to read the command line ?

Also what is confusing is that > 65 means lower than !
Thanks in advance
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Tue Oct 14, 2014 1:30 am

Make a file "who.vbs"

Set objNetwork = CreateObject("Wscript.Network")
Wscript.Echo objNetwork.UserName

Execute who.vbs in your label... I will finish this tomorrow...

THIS is crap... there are quite a few reasons why getting the username of the logged in machine is a pain. Running an escalated program is not too bad but windows management instrumentation console fails to run when integrated into a batch job called by the dude. Mostly I can't understand why the execute function is saying error when I can run the program on the command line... So I don't have a solution.

Here is an interesting program that works but when I have the dude run it, it fails.

WMIC /NODE: 192.168.1.1 COMPUTERSYSTEM GET USERNAME /format:list - Note you would need to add a user/pass to escalate privileges to read other machines. But executing this in a batch job results in error and I can't figure out what to do to fix that.

If you could get the above command to run from a batch job you could later replace 192.168.1.1 with %1 then

WMIC /NODE: %1 COMPUTERSYSTEM GET USERNAME /format:list /user:priv /pass:priv

You could execute test.bat device.firstaddress but this is CRUD to work on and doesn't work. I will revisit later.

Lebowski
 
jdurrett
just joined
Posts: 2
Joined: Thu Apr 24, 2014 10:39 pm

Re: Probe Thread

Fri Dec 12, 2014 12:23 am

Greetings. I am on day 2 of using "TheDude" and I'm confused on the purpose of Services/Polls/SNMP/MIB's/Functions.

In a nutshell, I have all the MIB's imported, can SNMPWalk the device (Microwave Radio) and now I want to (SolarWinds terminology only perhaps) "Poll" the device for the values returned by the OID's SNMPWalk shows them...but the Polling service does'nt return the value of an OID...its just comparing it to a known value and giving Yes or No. I want VALUES reported not Yes/No. Thats what ping is for.

From reading forum posts, it seems the method to the madness is that I have to SNMPwalk to get OID's, then I have to create a Function to be responsible for getting the information, then I have to create a Polling Service - Not Mind you Based on Type SNMP, but Function, and then I must put in code to each section to get the value that SNMPWalk showed me without hesitation.

Oh, and I tried to use an example found and I'm getting parsing errors for reasons unknown.

Can someone please enlighten me On how an OID becomes an actual monitored value for a device?
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Fri Dec 12, 2014 6:49 pm

Greetings. I am on day 2 of using "TheDude" and I'm confused on the purpose of Services/Polls/SNMP/MIB's/Functions.

In a nutshell, I have all the MIB's imported, can SNMPWalk the device (Microwave Radio) and now I want to (SolarWinds terminology only perhaps) "Poll" the device for the values returned by the OID's SNMPWalk shows them...but the Polling service does'nt return the value of an OID...its just comparing it to a known value and giving Yes or No. I want VALUES reported not Yes/No. Thats what ping is for.

From reading forum posts, it seems the method to the madness is that I have to SNMPwalk to get OID's, then I have to create a Function to be responsible for getting the information, then I have to create a Polling Service - Not Mind you Based on Type SNMP, but Function, and then I must put in code to each section to get the value that SNMPWalk showed me without hesitation.

Oh, and I tried to use an example found and I'm getting parsing errors for reasons unknown.

Can someone please enlighten me On how an OID becomes an actual monitored value for a device?
How the dude works is already documented to death. You just need to keep reading till you understand what your doing but I will help by trying to describe some of the details. An OID becomes a graphed value buy using it in a probe and adding a probe to a device as a service. The simplest way to graph a value is by sticking the OID in the Value: of a probe. So click on probes click + to add a new one, put test in the name, switch the type to function which will add some more fields. Note; This is not a function in the functions panel. It means the probe will function like a tool and can call functions or use OIDs directly.
Leave everything else alone but put your OID in the Value, as follows;
Value: oid("1.3.6.1.4.1.318.1.1.1.2.2.2.0", 10 ,5)

Add the test probe to a device by selecting services and clicking + and make sure history is enabled "graph poll times".

When I build a probe I create a function and use it on a label before building a probe. Open the function panel click+ type the name and put some code in the function, place the function in the appearance of a device by right clicking then select appearance in the "label" put your function in brackets and if you get a value you have created your function correctly if you get parse error you have to examine your function. Here is a function that returns the temperature from an APC UPS.

Name: ups_bat_temp
code: oid("1.3.6.1.4.1.318.1.1.1.2.2.2.0", 10 ,5)

So now I can modify the appearance of a UPS and add the function to the label. Note click the down arrow on the right to enable a custom label
Label: [ups_bat_temp()]
This will cause the device to show that oid in the label. Custom labels can be configured on individual devices and map wide but not on device types (bummer).

Now go to your test probe and in the value line replace oid("1.3.6.1.4.1.318.1.1.1.2.2.2.0", 10 ,5) with ups_battery_temp()
The available line is for auto discovery (don't use it till you understand the implications), the error line is for notifications so you can work on those later.

HTH
Lebowski

edit one incorrect statement
 
alekstef
just joined
Posts: 1
Joined: Fri Apr 24, 2015 4:43 pm

Re: Probe Thread

Fri Apr 24, 2015 4:45 pm

Does anybody know if it is possible to query a unit through its XML API using The Dude? I'm not very into all this kind of stuff, and would like to know if it is even possible, before I spend a lot of time trying to make it work :-)
 
User avatar
serhio
just joined
Posts: 3
Joined: Thu May 14, 2015 1:03 pm
Contact:

Re: Probe Thread

Fri May 15, 2015 11:55 am

After few hours of investigating protocol and analyzing WireShark traces, I made my TFTP server probe:
<?xml version="1.0" ?>
<dude version="4.0beta3">
 <Probe>
  <sys-type>13</sys-type>
  <sys-id>2039720</sys-id>
  <sys-name>tftp</sys-name>
  <typeID>6</typeID>
  <defaultPort>69</defaultPort>
  <tcpSend1>\00\01dude.txt\00octet\00</tcpSend1>
  <tcpReceive1>^.*</tcpReceive1>
 </Probe>
Key is in this string \00\01dude.txt\00octet\00. Here is explanation:
1. You need 2 bytes OpCode. 00 01 is read request.
2. We will ask for some file, like dude.txt. This string must be null terminated, so we have \00 after name.
3. We should specify transfer mode. We will use binary mode or octet, ending will binary zero or \00.
4. If anything return (even something like Access denied to dude.txt), TFTP works. There fore, just put ^. as return.

Cheers,
Srdjan
 
User avatar
itsupportschulen
just joined
Posts: 21
Joined: Fri May 24, 2013 10:57 am
Location: Germany, Herford
Contact:

Re: Probe Thread

Wed Sep 09, 2015 12:37 am

Hello together,

I search for a way to compare the DNS-Name, or NETBIOS, or SNMP-Systemname of a device with the [Device.Name] in one probe. If equal, it's ok, otherwise there should be an error. Anyone an idea?

Background:
We have all our Client-Computer with DNS Names in the Dude (with DNS Lookup: name to adress). Sometimes it happens that a client seems to be "up", but if you look carefully, you see that this is not the client which should be "probed" because the DNS Lookup isn't working perfect.

Maybe someone has an idea how to monitor such DNS-Errors ;-)

thanks
Sebastian
PLEASE open source the code or let us pay for The Dude!
 
R4id0
just joined
Posts: 1
Joined: Mon Nov 16, 2015 9:35 am

Re:

Mon Nov 16, 2015 9:38 am

Check if a certain program is running on a Windows system ('OUTLOOK.EXE' in this example):

Type: function
Available: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"),"OUTLOOK.EXE")>0, 1, -1)
Error: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"),"OUTLOOK.EXE")>0, "", "OUTLOOK.EXE not detected by SNMP probe")
Value: 1 (or anything else, is purely for charting purposes and I return 1 if the service is running)
Unit: running (or whatever you want to call the above values)
Rate: none

This of course requires the SNMP agent is running and configured properly on the Windows system.
This works great but is it possible to monitor if an application is in "Not responding" state?
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Re:

Tue Nov 17, 2015 11:47 pm

Check if a certain program is running
Applications in the not responding state do not show up in Window 7 SNMP view as not responding... They show as running which sucks. I had a not responding program, found it in the registry then found the run index and checked all entries of the run index so I doubt it is updated in SNMP. Maybe build a tool that checks the program and use execute to handle the query.

Lebowski
 
hanscker
just joined
Posts: 1
Joined: Wed Nov 18, 2015 2:24 pm

Re: Probe Thread

Wed Nov 18, 2015 2:44 pm

Hi,

I'm starting to create some functions and I'm really frustasted with an issue with the device_property and if statement.

The current type of the device is "OPE" and I created the following probe for testing:

if(device_property("Type")="DES",device_property("Type"),"error")

and I got the result "OPE", but i should get "error" as result.

Could you tell me if it is a bug or i'm wrong?

I'm using version 4.0 beta 3
You do not have the required permissions to view the files attached to this post.
 
jbhainsworth
just joined
Posts: 2
Joined: Wed Nov 25, 2015 5:54 pm
Location: USA

Re: Probe Thread

Wed Nov 25, 2015 6:24 pm

New to the forum and not sure if this is the right place to post a question.
I am trying to adjust the probes so that the value is rounded to only 2 decimal places. Mainly to reduce the device image from constantly changing sizes.
jbhainsworth
 
jbhainsworth
just joined
Posts: 2
Joined: Wed Nov 25, 2015 5:54 pm
Location: USA

Re: Probe Thread

Mon Nov 30, 2015 8:30 pm

New to the forum and not sure if this is the right place to post a question.
I am trying to adjust the probes so that the value is rounded to only 2 decimal places. Mainly to reduce the device image from constantly changing sizes.
jbhainsworth
I got this corrected, It took me realizing how the label was created and the sub components that created it.
 
User avatar
HiltonT
Frequent Visitor
Frequent Visitor
Posts: 75
Joined: Mon Feb 07, 2011 4:24 am
Location: 'Srayamate
Contact:

Re: Probe Thread

Sat Jan 30, 2016 2:57 am

I got this corrected, It took me realizing how the label was created and the sub components that created it.
Any more info on what you did here as this has been annoying me for a while, too.
Regards,
Hilton Travis
 
JamesMcCarthy
just joined
Posts: 9
Joined: Wed Feb 17, 2016 5:53 am

Re: Probe Thread

Sun Apr 24, 2016 10:56 pm

Hi I was wondering if anyone could help me. I would like to return the value of the {Device.ServicesDownCount] as a percentage of the overall services down to display in each devices appearance. Is this possible and how would I go about doing this. Would be good to get it to return an error if over a certain percentage
 
navrik
just joined
Posts: 3
Joined: Tue May 24, 2016 8:43 am

Re: Probe Thread

Tue May 24, 2016 11:03 am

Hi!
I'm trying to start monitor port states on our switches in Dude. So, using some guides from this topic i created Function like this:
Name: D-Link_port_1_state
Type: Function
Agent: Default
Available: if(oid("1.3.6.1.2.1.2.2.1.8.1")=1)
Error: if(oid("1.3.6.1.2.1.2.2.1.8.1")=2, "", concatenate("Link to ",  oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
So this function doesn't work properly - always stay in down position, seems like port state is down. However, the port description is taken from the switch correctly by oid("1.3.6.1.2.1.31.1.1.1.18.1"):
snmpwalk 172.31.100.1 1.3.6.1.2.1.31.1.1.1.18.1
iso.3.6.1.2.1.31.1.1.1.18.1 = STRING: "some hardware"
But if i try to use snmpwalk, i see correct state (1 - UP, 2 - Down):
snmpwalk 172.31.100.1 1.3.6.1.2.1.2.2.1.8.1
iso.3.6.1.2.1.2.2.1.8.1 = INTEGER: 1
Maybe somebody can help me - where i can start looking for the problem, or there is an error?
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Wed Jun 01, 2016 7:55 pm


if(device_property("Type")="DES",device_property("Type"),"error")
In the error line any value returned is considered an error. You must return "" if you are not in an error state. In your case you are returning a value so it is in an error state.

if(device_property("Type")="DES","","error")
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Wed Jun 01, 2016 8:05 pm

Hi!
Error: if(oid("1.3.6.1.2.1.2.2.1.8.1")=2, "", concatenate("Link to ", oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
place this on the device label [oid("1.3.6.1.2.1.2.2.1.8.1")]

Use the exact match that is displayed in your device label to check the error...
Error: if(oid("1.3.6.1.2.1.2.2.1.8.1")="down (2)", "", concatenate("Link to ", oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
 
navrik
just joined
Posts: 3
Joined: Tue May 24, 2016 8:43 am

Re: Probe Thread

Thu Jun 02, 2016 9:50 am

Hi!
Error: if(oid("1.3.6.1.2.1.2.2.1.8.1")=2, "", concatenate("Link to ", oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
place this on the device label [oid("1.3.6.1.2.1.2.2.1.8.1")]

Use the exact match that is displayed in your device label to check the error...
Error: if(oid("1.3.6.1.2.1.2.2.1.8.1")="down (2)", "", concatenate("Link to ", oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
Perhaps I have misunderstood something. However, a survey on the state of oid I see only numbers (1 or 2) without the words up/down:
link on 1st port is up
snmpwalk 172.31.100.1 1.3.6.1.2.1.2.2.1.8.1
iso.3.6.1.2.1.2.2.1.8.1 = INTEGER: 1
link on 15th port is down
snmpwalk 172.31.100.1 1.3.6.1.2.1.2.2.1.8.15
iso.3.6.1.2.1.2.2.1.8.15 = INTEGER: 2
Accordingly, their writing and in function without "up/down". So this function get correct description by oid port, the state - no.
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Mon Jun 13, 2016 4:40 pm

Hi!
Error: if(oid("1.3.6.1.2.1.2.2.1.8.1")=2, "", concatenate("Link to ",  oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
place this on the device label [oid("1.3.6.1.2.1.2.2.1.8.1")]

Use the exact match that is displayed in your device label to check the error...
Error: if(oid("1.3.6.1.2.1.2.2.1.8.1")="down (2)", "", concatenate("Link to ",  oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
Perhaps I have misunderstood something. However, a survey on the state of oid I see only numbers (1 or 2) without the words up/down:
link on 1st port is up
snmpwalk 172.31.100.1 1.3.6.1.2.1.2.2.1.8.1
iso.3.6.1.2.1.2.2.1.8.1 = INTEGER: 1
link on 15th port is down
snmpwalk 172.31.100.1 1.3.6.1.2.1.2.2.1.8.15
iso.3.6.1.2.1.2.2.1.8.15 = INTEGER: 2
Accordingly, their writing and in function without "up/down". So this function get correct description by oid port, the state - no.
Does this work?
Error: if(oid("1.3.6.1.2.1.2.2.1.8.1")="INTEGER: 2", "", concatenate("Link to ",  oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
Or does this work? with 2 in quotes...
Error: if(oid("1.3.6.1.2.1.2.2.1.8.1")="2", "", concatenate("Link to ",  oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
You could also try oid_raw to grab values.
Error: if(oid_raw("1.3.6.1.2.1.2.2.1.8.1")="2", "", concatenate("Link to ",  oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
I don't know exactly how links are handled inside the program
#
 
navrik
just joined
Posts: 3
Joined: Tue May 24, 2016 8:43 am

Re: Probe Thread

Fri Jul 22, 2016 1:58 pm

Does this work? 
Error: if(oid("1.3.6.1.2.1.2.2.1.8.1")="INTEGER: 2", "", concatenate("Link to ",  oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
Or does this work? with 2 in quotes...
Error: if(oid("1.3.6.1.2.1.2.2.1.8.1")="2", "", concatenate("Link to ",  oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
You could also try oid_raw to grab values. 
Error: if(oid_raw("1.3.6.1.2.1.2.2.1.8.1")="2", "", concatenate("Link to ",  oid("1.3.6.1.2.1.31.1.1.1.18.1"), " is down"))
All this 3 variants doesn't work. Tried last builds include 6.36. Already end versions of why it has worked for 45 minutes and broke without the possibility of recover.
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Fri Jul 22, 2016 7:06 pm

navrik; Place the following on the device label;
[oid("1.3.6.1.2.1.2.2.1.8.1")]
What exactly is displayed on the device? use that in your comparison.
#
 
hengst
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Sun Jan 03, 2010 3:04 pm

Re: Probe Thread

Sat Dec 10, 2016 4:39 pm

How to write a probe / function for a NON SNMP device in Dude,



The plan :



I have a telecom cabinet for example with a "door sensor"


i would like to send (Hex?) code to an IP:port ( TCP )
to a dumb sensor/device that gives back an Hex with 1 bit changed when a door/sensor is open/closed.

code i would like to send : 7e303230303031343230313030303041410d


i need (to convert) the received (Hex?) code.
as i need bit number XX to be 0 or 1 ( door open or door closed )



Found the way to send correct command from the Dude TCP probe. "send" field.

i came to this when i made from the original hex

7e303230303031343230313030303041410d

this in the dude tcp probe "Send" field.

\x7e\x30\x32\x30\x30\x30\x31\x34\x32\x30\x31\x30\x30\x30\x30\x41\x41\x0d

after clicking "apply"

the dude converted to

~02000142010000AA\r

now when entering " ^. " in the receive field.

and do a packet scan. i see the command send, and i get the correct answer back .

meaning :

~020001420000274257AE140000000000000000000000000000000041C8000041C800000141C80000000000010001F2 ( door open )
~020001420000274257AE140000000000000000000000000000000041C8000041C800000141C80000000000010000F2 ( door closed , looks like last bit changed from 1 to 0 )

now , how do i get my right bit ( door open/closed ) from that ?
.

Update ! , found the ( simple ) way to extract the right bit. direct from "receive" section.

~[0-9A-Fa-f]{91}0.* seems to work for me, if i enter that in the "receive" window of the tcp probe. and it works.

( read and learn about wildcards : http://wordmvp.com/FAQs/General/UsingWildcards.htm )

( to test your "RegEx" code you can use http://www.regexr.com/ )

Now i would like to create a function to do this , and be able to generate different errors parsed from the received data string.

1 bit is for "door" sensor
1 bit is for "water" sensor
1 bit is for "power" sensor

how can help with that ?
Last edited by hengst on Fri Feb 03, 2017 5:53 pm, edited 7 times in total.
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Fri Jan 06, 2017 5:00 pm

(Future) request :
How to write a probe / function for a NON SNMP device in Dude,
Look at execute, you can call other programs/scripts and batch jobs.
 
hengst
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Sun Jan 03, 2010 3:04 pm

Re: Probe Thread

Fri Jan 27, 2017 10:26 am

(Future) request :
How to write a probe / function for a NON SNMP device in Dude,
Look at execute, you can call other programs/scripts and batch jobs.
Lebowski , i found direct way to send the right command from default tcp probe. ( see my edited post ) . can you / or someone give some light on how to write the function to parse the data that comes back ?
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Fri Feb 03, 2017 4:40 pm

Lebowski , i found direct way to send the right command from default tcp probe. ( see my edited post ) . can you / or someone give some light on how to write the function to parse the data that comes back ?
Can you put a regex that matches door closed in the receive? ~[0-9A-Fa-f]+0F2$ or ~[0-9A-Fa-f]+1F2$
Then you could at least make multiple probes with different "returns" so if the door is closed the tcp probe is true and then when ever the door is open, false.

Get the program regex designer from rad software and you can test your expressions much faster.

If you can put a TCP probe in a "Function" then you can use IF and make a much better probe but I can't figure out the syntax. Functions were meant to be called from a probe.

Lebowski
 
hengst
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Sun Jan 03, 2010 3:04 pm

Re: Probe Thread

Fri Feb 03, 2017 4:54 pm

Can you put a regex that matches door closed in the receive?
Then you could at least make multiple probes with different "returns" so if the door is closed the tcp probe is true and then when ever the door is open, false.
the Probe is already working for the door sensor.

the received regex =
~020001420000274257AE140000000000000000000000000000000041C8000041C800000141C80000000000010001F2 ( door open )
~020001420000274257AE140000000000000000000000000000000041C8000041C800000141C80000000000010000F2 ( door closed , looks like last bit changed from 1 to 0 )

i retrieve that last bit from this regex by entering
~[0-9A-Fa-f]{91}0.*
in the "receive" window of the probe. this works very well and simple.

i can do that for different "bit" alarms with several probes, but i think this may come as a DoS attack on the dump device/
ideal would be to send 1 request. and parse several "bit" alarms from 1 received regex.

for this i think it needs some little script/function. but that is little to difficult for me at the moment.
 
hengst
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Sun Jan 03, 2010 3:04 pm

Re: Probe Thread

Fri Feb 03, 2017 5:07 pm

so the Big question would be ;

can you put a TCP probe in a "Function"

or

can you use a "Function" in or with a TCP probe

right ?

i think if plausible it would make the Dude VERY useful out of the box.
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Fri Feb 03, 2017 5:13 pm

~[0-9A-Fa-f]{91}0.*
in the "receive" window of the probe. this works very well and simple.
Seriously nice work figuring that all out.

If your TCP Probe has ~[0-9A-Fa-f]+0F2$ of course it should show "up" when the door is shut.
The regex ~[0-9A-Fa-f]{91}0.* doesn't work in regex designer but... If that was an OID it would be trivial, it looks like creating it as an execute is going to be way better in the long run.
=http://stackoverflow.com/questions/244 ... Python TCP

Lebowski
 
lebowski
Forum Guru
Forum Guru
Posts: 1616
Joined: Wed Aug 27, 2008 5:17 pm

Re: Probe Thread

Fri Feb 03, 2017 5:16 pm

so the Big question would be ;
can you put a TCP probe in a "Function"
Call any type of probe from a function would be a great addition.

L
  • 1
  • 3
  • 4
  • 5
  • 6
  • 7

Who is online

Users browsing this forum: No registered users and 15 guests