Nice to know and I have often wanted to alert on high and or zero utilization but it is not obvious how to do it, like you are finding out.To get the bandwidth displayed in the links between devices the Dude uses the delta of sent/received octets multiplied by 8 averaging over each second of collected data.
network-clock-participate wic 3
network-clock-select 1 T1 0/3/0
!
controller T1 0/3/0
framing esf
linecode b8zs
pri-group timeslots 1-24 service mgcp
!
interface Serial0/3/0:23
no ip address
isdn switch-type primary-ni
isdn incoming-voice voice
isdn map address 011* plan unknown type unknown
isdn bind-l3 ccm-manager
no cdp enable
!
voice-port 0/3/0:23
!
Me too, cool probe by Julian, though I guess you would need to identify the oid for your servers, right?. Since it didn't matter what device used the probe, everything failed when they indeed had 40GB freeHi everyone,
I'm new to the Dude too and I'm trying to set up the win_diskc_free_percent probe as defined by pjulian Feb.10.2009 in this thread. I have the SNMP community defined correctly and I can do an SNMP walk from The Dude to my servers. I created the function exactly as pjulian describes and same for the probes. Doesn't work for the MB or % probe. It applies the probe but always shows as 'down' for all servers meaning the disk space is low even though it is not. I'm using The Dude v3.5 and have all Dell poweredge servers.
Can anyone shed some light on why this isn't working for me? I would be very appreciative.
Thank you!
BTW - very cool tool this Dude, if only I can get this working...
Now make the probes:<?xml version="1.0" ?>
<dude version="3.6">
<Function>
<sys-type>57</sys-type>
<sys-name>toner1</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.11.1.1.9.1.1")/oid("1.3.6.1.2.1.43.11.1.1.8.1.1"),0,4)*100</code>
<descr>the first toner index for HP Laserjet and XEROX Workcentre (usually black)</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>toner2</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.11.1.1.9.1.2")/oid("1.3.6.1.2.1.43.11.1.1.8.1.2"),0,4)*100</code>
<descr>the second toner index for HP Laserjet and XEROX Workcentre (usually yellow, for XEROX Phaser4510 it's the Maintenance Kit status</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>toner3</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.11.1.1.9.1.3")/oid("1.3.6.1.2.1.43.11.1.1.8.1.3"),0,4)*100</code>
<descr>the third toner index for HP Laserjet and XEROX Workcentre (usually magenta)</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>toner4</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.11.1.1.9.1.4")/oid("1.3.6.1.2.1.43.11.1.1.8.1.4"),0,4)*100</code>
<descr>the fourth toner index for HP Laserjet and XEROX Workcentre (usually cyan)</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>xerox_drum</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.11.1.1.9.1.24")/oid("1.3.6.1.2.1.43.11.1.1.8.1.24"),0,4)*100</code>
<descr>calculates the remaining life for the drum cartridge for XEROX Workcentre printers</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>paper1</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.8.2.1.10.1.1")/oid("1.3.6.1.2.1.43.8.2.1.9.1.1"),0,4)*100</code>
<descr>the first paper tray for XEROX workcentre (usually A3)</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>paper2</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.8.2.1.10.1.2")/oid("1.3.6.1.2.1.43.8.2.1.9.1.2"),0,4)*100</code>
<descr>the second paper tray for XEROX workcentre (usually A4)</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>paper3</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.8.2.1.10.1.3")/oid("1.3.6.1.2.1.43.8.2.1.9.1.3"),0,4)*100</code>
<descr>the third paper tray for XEROX workcentre (usually A4)</descr>
</Function>
</dude>
<?xml version="1.0" ?>
<dude version="3.6">
<Probe>
<sys-type>13</sys-type>
<sys-name>paper_1</sys-name>
<typeID>8</typeID>
<functionAvailable>paper1()</functionAvailable>
<functionError>if (paper1() > 0, "" , concatenate("PAPER " ,oid("1.3.6.1.2.1.43.8.2.1.13.1.1") , " (", oid("1.3.6.1.2.1.43.8.2.1.12.1.1") , ") is empty" ))</functionError>
<functionValue>paper1()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>paper_2</sys-name>
<typeID>8</typeID>
<functionAvailable>paper2()</functionAvailable>
<functionError>if (paper2() > 0, "" , concatenate("PAPER " ,oid("1.3.6.1.2.1.43.8.2.1.13.1.2") , " (", oid("1.3.6.1.2.1.43.8.2.1.12.1.2") , ") is empty" ))</functionError>
<functionValue>paper2()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>paper_3</sys-name>
<typeID>8</typeID>
<functionAvailable>paper3()</functionAvailable>
<functionError>if (paper3() > 0, "" , concatenate("PAPER " ,oid("1.3.6.1.2.1.43.8.2.1.13.1.3") , " (", oid("1.3.6.1.2.1.43.8.2.1.12.1.3") , ") is empty" ))</functionError>
<functionValue>paper3()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>Toner_1</sys-name>
<typeID>8</typeID>
<functionAvailable>toner1()</functionAvailable>
<functionError>if (toner1() > 10, "" , concatenate(oid("1.3.6.1.2.1.43.11.1.1.6.1.1") , " has less than 10% remaining" ))</functionError>
<functionValue>toner1()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>Toner_2</sys-name>
<typeID>8</typeID>
<functionAvailable>toner2()</functionAvailable>
<functionError>if (toner2() > 10, "" , concatenate(oid("1.3.6.1.2.1.43.11.1.1.6.1.2") , " has less than 10% remaining" ))</functionError>
<functionValue>toner2()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>Toner_3</sys-name>
<typeID>8</typeID>
<functionAvailable>toner3()</functionAvailable>
<functionError>if (toner3() > 10, "" , concatenate(oid("1.3.6.1.2.1.43.11.1.1.6.1.3") , " has less than 10% remaining" ))</functionError>
<functionValue>toner3()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>Toner_4</sys-name>
<typeID>8</typeID>
<functionAvailable>toner4()</functionAvailable>
<functionError>if (toner4() > 10, "" , concatenate(oid("1.3.6.1.2.1.43.11.1.1.6.1.4") , " has less than 10% remaining" ))</functionError>
<functionValue>toner4()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>Xerox_Drum</sys-name>
<typeID>8</typeID>
<functionAvailable>xerox_drum()</functionAvailable>
<functionError>if (xerox_drum() > 10, "" , concatenate(oid("1.3.6.1.2.1.43.11.1.1.6.1.24") , " has less than 10% remaining" ))</functionError>
<functionValue>xerox_drum()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
</dude>
[Device.Name]
Toner levels:
Black: [toner1()]%
Yellow: [toner2()]%
Magenta: [toner3()]%
Cyan: [toner4()]%
Drum Cartridge
Condition: [xerox_drum()]%
Paper Levels:
A3 white: [paper1()]%
A4 white: [paper3()]%
Corp Paper: [paper2()]%
'loggeduser.vbs
' Sample VBScript to discover which user is logged on
' Author Guy Thomas and John Eck
' Version 2.5 - December 2005
' -------------------------------------------------------'
'Modified by gsandul to logon to remote host using
'username and password specified from command line
'
Set objPassword = CreateObject("ScriptPW.Password")
'strComputer = "192.168.0.60"
'You can uncomment the following 3 lines and
'specify hardcoded domain, username and password
'strDomain = "WORKGROUP"
'strUser = "gsandul"
'strPassword = "SuperPass"
strComputer = wscript.arguments(0)
'If you hardcoded domain, username and password
'comment the following 3 lines
strDomain = wscript.arguments(1)
strUser = wscript.arguments(2)
strPassword = wscript.arguments(3)
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objSWbemLocator.ConnectServer(strComputer, _
"root\CIMV2", _
strUser, _
strPassword, _
"MS_409", _
"NTLMDomain:" + strDomain)
' You suppose to be authentificated
' Now you can write any WMI function
Set colComputer = objWMIService.ExecQuery ("Select * from Win32_ComputerSystem")
For Each objComputer in colComputer
If not objComputer.UserName = "" Then
strLogonUser = Split(objComputer.UserName,"\")
strLogonUser(1) = UCase(Left(strLogonUser(1),1))& Trim(Mid(strLogonUser(1),2,20))
Wscript.Echo strLogonUser(1)
Else
Wscript.Echo "No_one_is_logged"
End If
Next
' End of Sample Logged on VBScript
cscript //NoLogo C:\dudescr\loggeduser.vbs IPAddress DomainName UserName Password
concatenate(device_property("FirstAddress")," ",device_property("CustomField3")," ",device_property("UserName")," ",device_property("Password"))
array_element(execute("cscript.exe",concatenate("//NoLogo C:\dudescr\loggeduser.vbs ",User_Pass()),"C:\WINDOWS\system32\"),1)
CPU Load 5sec /1min/ 5min: [oid("1.3.6.1.4.1.9.9.109.1.1.1.1.3.1")] / [oid("1.3.6.1.4.1.9.9.109.1.1.1.1.4.1")] / [oid("1.3.6.1.4.1.9.9.109.1.1.1.1.5.1")]
Memory Free/Used: [round((oid("1.3.6.1.4.1.9.9.48.1.1.1.6.1")/1024)/1024)]MB / [round((oid("1.3.6.1.4.1.9.9.48.1.1.1.5.1")/1024)/1024)]MB
Total Connections: [oid("1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.40.6")]
[Device.Name] | [device_performance()]Up - [Device.ServicesUp] | Down - [Device.ServicesDown]
Disk Space: C:\=[round(((((oid("1.3.6.1.2.1.25.2.3.1.5.1")-oid("1.3.6.1.2.1.25.2.3.1.6.1"))*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)/1024)]/[round(((oid("1.3.6.1.2.1.25.2.3.1.5.1")*oid("1.3.6.1.2.1.25.2.3.1.4.1")/1024)/1024)/1024)] GB D:\=[round(((((oid("1.3.6.1.2.1.25.2.3.1.5.3")-oid("1.3.6.1.2.1.25.2.3.1.6.3"))*oid("1.3.6.1.2.1.25.2.3.1.4.3"))/1024)/1024)/1024)]/[round(((oid("1.3.6.1.2.1.25.2.3.1.5.3")*oid("1.3.6.1.2.1.25.2.3.1.4.3")/1024)/1024)/1024)] GB
Normis, can u help me? How to make a function that connects via FTP, passing username and password, then copy a file folder location to the destination user (PUT)?
I do not know how to do that, maybe Lebowski or Gsandul can helpNormis, can u help me? How to make a function that connects via FTP, passing username and password, then copy a file folder location to the destination user (PUT)?
For sure, I can help, but I need to know what do you meanI do not know how to do that, maybe Lebowski or Gsandul can help
Just explain how do you plan to use it.function that connects via FTP
You should involve user and password in any case, so I do not see the difference in specifying password in a script and in The Dude. Specifying password in The Dude is not more secure, than specifying password in the script.in this case, involves users and passwords from other agencies and the security policy does not allow to be done this way. The ideal would be a function inside on the dude.
The code for Logged_User in 3.6 was:With Dude 4 beta2 the "Logged User" Script/Function doesn't work anymore. Any ideas ?
array_element(execute("cscript.exe",concatenate("//NoLogo C:\dudescr\loggeduser.vbs ",User_Pass()),"C:\WINDOWS\system32\"),1)
array_element(execute("cscript.exe",concatenate("//NoLogo C:\\dudescr\\loggeduser.vbs ",User_Pass()),"C:\\WINDOWS\\system32\\"),1)
Cisco ASA 5510 - Performance
Code: Select allCPU Load 5sec /1min/ 5min: [oid("1.3.6.1.4.1.9.9.109.1.1.1.1.3.1")] / [oid("1.3.6.1.4.1.9.9.109.1.1.1.1.4.1")] / [oid("1.3.6.1.4.1.9.9.109.1.1.1.1.5.1")] Memory Free/Used: [round((oid("1.3.6.1.4.1.9.9.48.1.1.1.6.1")/1024)/1024)]MB / [round((oid("1.3.6.1.4.1.9.9.48.1.1.1.5.1")/1024)/1024)]MB Total Connections: [oid("1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.40.6")]
Windows Disk Space: Free/Total
Code: Select allDisk Space: C:\=[round(((((oid("1.3.6.1.2.1.25.2.3.1.5.1")-oid("1.3.6.1.2.1.25.2.3.1.6.1"))*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)/1024)]/[round(((oid("1.3.6.1.2.1.25.2.3.1.5.1")*oid("1.3.6.1.2.1.25.2.3.1.4.1")/1024)/1024)/1024)] GB D:\=[round(((((oid("1.3.6.1.2.1.25.2.3.1.5.3")-oid("1.3.6.1.2.1.25.2.3.1.6.3"))*oid("1.3.6.1.2.1.25.2.3.1.4.3"))/1024)/1024)/1024)]/[round(((oid("1.3.6.1.2.1.25.2.3.1.5.3")*oid("1.3.6.1.2.1.25.2.3.1.4.3")/1024)/1024)/1024)] GB
Yes it worked! THANX!See how I changed the last # in each of the OIDs from 1 to 2? That is the next drive in the system... Since this is hard coded the drive it is pointing to is incorrect for your server. The best way to see what OID your drive "C" is on is to start an SNMPwalk using the sub tree of 1.3.6.1.2.1.25.2.3.1.
C:\=[round(((((oid("1.3.6.1.2.1.25.2.3.1.5.2")-oid("1.3.6.1.2.1.25.2.3.1.6.2"))*oid("1.3.6.1.2.1.25.2.3.1.4.2"))/1024)/1024)/1024)]/[round(((oid("1.3.6.1.2.1.25.2.3.1.5.2")*oid("1.3.6.1.2.1.25.2.3.1.4.2")/1024)/1024)/1024)] GB
HTH
Lebowski
Because I was tired of running after printers that run out of toner and/or paper (and people calling me for not fixing this) I created the following probes/functions to help me with that
Monitoring toner and paper levels for me and warning me if one drops below 10% (the paper level has only 5 sensors, it seems, 100,75,50,25 and empty but even that helps (see attachment for appearance)
It even polls the name of the Toner/Paper tray by SNMP and puts it in the Error Description so you can use it in automatic alarms (email, etc...)
first create some functions to poll the toner levels, paper levels and the maintenance kit's (drum) condition:
Now make the probes:<?xml version="1.0" ?>
<dude version="3.6">
<Function>
<sys-type>57</sys-type>
<sys-name>toner1</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.11.1.1.9.1.1")/oid("1.3.6.1.2.1.43.11.1.1.8.1.1"),0,4)*100</code>
<descr>the first toner index for HP Laserjet and XEROX Workcentre (usually black)</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>toner2</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.11.1.1.9.1.2")/oid("1.3.6.1.2.1.43.11.1.1.8.1.2"),0,4)*100</code>
<descr>the second toner index for HP Laserjet and XEROX Workcentre (usually yellow, for XEROX Phaser4510 it's the Maintenance Kit status</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>toner3</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.11.1.1.9.1.3")/oid("1.3.6.1.2.1.43.11.1.1.8.1.3"),0,4)*100</code>
<descr>the third toner index for HP Laserjet and XEROX Workcentre (usually magenta)</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>toner4</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.11.1.1.9.1.4")/oid("1.3.6.1.2.1.43.11.1.1.8.1.4"),0,4)*100</code>
<descr>the fourth toner index for HP Laserjet and XEROX Workcentre (usually cyan)</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>xerox_drum</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.11.1.1.9.1.24")/oid("1.3.6.1.2.1.43.11.1.1.8.1.24"),0,4)*100</code>
<descr>calculates the remaining life for the drum cartridge for XEROX Workcentre printers</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>paper1</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.8.2.1.10.1.1")/oid("1.3.6.1.2.1.43.8.2.1.9.1.1"),0,4)*100</code>
<descr>the first paper tray for XEROX workcentre (usually A3)</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>paper2</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.8.2.1.10.1.2")/oid("1.3.6.1.2.1.43.8.2.1.9.1.2"),0,4)*100</code>
<descr>the second paper tray for XEROX workcentre (usually A4)</descr>
</Function>
<Function>
<sys-type>57</sys-type>
<sys-name>paper3</sys-name>
<code>string_substring(oid("1.3.6.1.2.1.43.8.2.1.10.1.3")/oid("1.3.6.1.2.1.43.8.2.1.9.1.3"),0,4)*100</code>
<descr>the third paper tray for XEROX workcentre (usually A4)</descr>
</Function>
</dude><?xml version="1.0" ?>
<dude version="3.6">
<Probe>
<sys-type>13</sys-type>
<sys-name>paper_1</sys-name>
<typeID>8</typeID>
<functionAvailable>paper1()</functionAvailable>
<functionError>if (paper1() > 0, "" , concatenate("PAPER " ,oid("1.3.6.1.2.1.43.8.2.1.13.1.1") , " (", oid("1.3.6.1.2.1.43.8.2.1.12.1.1") , ") is empty" ))</functionError>
<functionValue>paper1()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>paper_2</sys-name>
<typeID>8</typeID>
<functionAvailable>paper2()</functionAvailable>
<functionError>if (paper2() > 0, "" , concatenate("PAPER " ,oid("1.3.6.1.2.1.43.8.2.1.13.1.2") , " (", oid("1.3.6.1.2.1.43.8.2.1.12.1.2") , ") is empty" ))</functionError>
<functionValue>paper2()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>paper_3</sys-name>
<typeID>8</typeID>
<functionAvailable>paper3()</functionAvailable>
<functionError>if (paper3() > 0, "" , concatenate("PAPER " ,oid("1.3.6.1.2.1.43.8.2.1.13.1.3") , " (", oid("1.3.6.1.2.1.43.8.2.1.12.1.3") , ") is empty" ))</functionError>
<functionValue>paper3()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>Toner_1</sys-name>
<typeID>8</typeID>
<functionAvailable>toner1()</functionAvailable>
<functionError>if (toner1() > 10, "" , concatenate(oid("1.3.6.1.2.1.43.11.1.1.6.1.1") , " has less than 10% remaining" ))</functionError>
<functionValue>toner1()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>Toner_2</sys-name>
<typeID>8</typeID>
<functionAvailable>toner2()</functionAvailable>
<functionError>if (toner2() > 10, "" , concatenate(oid("1.3.6.1.2.1.43.11.1.1.6.1.2") , " has less than 10% remaining" ))</functionError>
<functionValue>toner2()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>Toner_3</sys-name>
<typeID>8</typeID>
<functionAvailable>toner3()</functionAvailable>
<functionError>if (toner3() > 10, "" , concatenate(oid("1.3.6.1.2.1.43.11.1.1.6.1.3") , " has less than 10% remaining" ))</functionError>
<functionValue>toner3()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>Toner_4</sys-name>
<typeID>8</typeID>
<functionAvailable>toner4()</functionAvailable>
<functionError>if (toner4() > 10, "" , concatenate(oid("1.3.6.1.2.1.43.11.1.1.6.1.4") , " has less than 10% remaining" ))</functionError>
<functionValue>toner4()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
<Probe>
<sys-type>13</sys-type>
<sys-name>Xerox_Drum</sys-name>
<typeID>8</typeID>
<functionAvailable>xerox_drum()</functionAvailable>
<functionError>if (xerox_drum() > 10, "" , concatenate(oid("1.3.6.1.2.1.43.11.1.1.6.1.24") , " has less than 10% remaining" ))</functionError>
<functionValue>xerox_drum()</functionValue>
<functionUnit>%</functionUnit>
</Probe>
</dude>
To get it to show nicely on the map I put this into "appearance" instead of link levels:[Device.Name]
Toner levels:
Black: [toner1()]%
Yellow: [toner2()]%
Magenta: [toner3()]%
Cyan: [toner4()]%
Drum Cartridge
Condition: [xerox_drum()]%
Paper Levels:
A3 white: [paper1()]%
A4 white: [paper3()]%
Corp Paper: [paper2()]%
The more I do with the Dude the more I love it!
Thanks to all the contributors!
???When we will see next version of the Dude?
Yes! errpt.cmd delivers only one attribute, a number from 0-65535@steen Do you want the first element?
Code: array_element(execute("C:\errpt.cmd"),0)
Broke, bad. I am using Dude 3.6. How do I workaround it ?I put [execute("c:\test.bat")] on a device label and saw " -1,, " it seems like execute is broke! test.bat contained @echo 3
Thanks, strange things start to happen, I run 3.6, I got the counter value out, but also error message about host does not exist.This worked on a device label!
[execute("test.bat",1,"c:\\")]
You can't put the path in the command and as above you need to escape the backslash for version 4.x I suppose...
I want the 1st result. Also I did try with 0 same result, flag is red.Not sure about the host thing but you did recognize you want the 2nd result? at least in 4.x it is the 2nd result.
array_element(execute("test.bat",1,"c:\\"),1)
strangely enough, since i too still continue cell phone spy software to experience that very problem. i tried to reinstall 3.6. but nothing made any difference..Thanks, strange things start to happen, I run 3.6, I got the counter value out, but also error message about host does not exist.This worked on a device label!
[execute("test.bat",1,"c:\\")]
You can't put the path in the command and as above you need to escape the backslash for version 4.x I suppose...
When the script is executed from command line all works and no output about host does not exist arrives so that must come from dude. Any more suggestions ?
This will return service stateThis works fine with stopped service, but not paused.
if(array_find(oid_column("1.3.6.1.4.1.77.1.2.3.1.1"),"Netlogon")>0, 1, 0)
if(array_find(oid_column("1.3.6.1.4.1.77.1.2.3.1.1"),"Netlogon")>0, "", "Netlogon not detected by SNMP probe")
array_element(oid_column_raw("1.3.6.1.4.1.77.1.2.3.1.3"),array_find(oid_column("1.3.6.1.4.1.77.1.2.3.1.1"),"Netlogon"))
Thanks! It really worked!Could it be that you use the wrong OID. I check Windows services as following:
Available: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "db2sec.exe")>0, 1, -1)
Error: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "db2sec.exe")>0, "", "DB2_db2sec.exe not detected by SNMP probe")
Value: 1
Unit: running
Rate: none
Change "db2sec.exe" with the name of the service you like to monitor. One thing I also noticed is, that the name is case-sensitive! Write the service name the same as you see it in the Windows Task Manager.
Sometimes it also helps to use the if() function for debugging. If you are not shure what you will get with "if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "db2sec.exe")>0" and want to see it, put the same command as "to do". For example:
Error: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "db2sec.exe")>0, array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "db2sec.exe"), array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "db2sec.exe"))
With this error line you will see the output of the command in the "Problem" column of the "Services" table. Sometimes it helps me a lot to find bugs in my commands.
Name: ast_version
Description: Text version string of the version of Asterisk that the SNMP Agent was compiled to run against.
Code: oid("1.3.6.1.4.1.22736.1.1.1.0")
--------------------------------------------------------------------------------
Name: ast_version
Description: Time ticks since Asterisk was started.
Code: oid("1.3.6.1.4.1.22736.1.2.1.0")
--------------------------------------------------------------------------------
Name: ast_reload_time
Description: Time ticks since Asterisk was last reloaded.
Code: oid("1.3.6.1.4.1.22736.1.2.2.0")
--------------------------------------------------------------------------------
Name: ast_active_calls
Description: The number of calls currently active on the Asterisk PBX.
Code: oid("1.3.6.1.4.1.22736.1.2.5.0")
--------------------------------------------------------------------------------
Name: ast_info
Description: Asterisk ToolTip Information (version, uptime, reload time, active calls, etc.). NOTE: Monitored device must be assigned the device type"Asterisk PBX" in order to show this info in the tooltip.
Code: if(not(string_find(device_property("Type"), "Asterisk PBX")),
concatenate(
concatenate(
"Asterisk v", ast_version(), "
", " Uptime: ", ast_uptime(), "
", " ReloadTime: ", ast_reload_time(), "
"),
" Active Calls: ", ast_active_calls(), "
"),
"")
NOTE: Multiple concatenations were needed because there is a limit on how many elements you can concatenate.
NOTE: To use the ast_info as ToolTip, add it to: Global Settings -> Map -> Device Appearance -> Tooltip, just after ros_info() and before the notes. Also note that you need to add a device type named "Asterisk PBX" and assigned to any asterisk device you wish to show the ast_info() for!
Name: astActiveCalls
Type: Function
Available: string_size(ast_active_calls())
Error: if(string_size(ast_active_calls()), "", "down")
Value: ast_active_calls()
Unit: calls
Yes I know its possible on windows installation but my is on RouterOS.If your dude is installed on a windows box, the you could configure a 'execute on server' type of notification which can call a windows tool that does the job. You can pass a bunch of variables to that tool/program.
Also, please post such questions in a different topic. The probe tread is meant for sharing ready to use probes. I think
Thank you.check the fetch tool, i think it can be used to upload a file to a webpage:
/tool fetch user=<> password=<> upload=yes mode=http address=<> src-path="/something/something/page.php"
Hi An Probe picture is attached, hopefullyIs there any way to make HTTP GET request from Dude?
I mean that when device goes down instead of sending mail or other notification, Dude must make Get request.
The Dude installed on routeros
Disk Space: C:\=[round(((((oid("1.3.6.1.2.1.25.2.3.1.5.1")-oid("1.3.6.1.2.1.25.2.3.1.6.1"))*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)/1024)]/[round(((oid("1.3.6.1.2.1.25.2.3.1.5.1")*oid("1.3.6.1.2.1.25.2.3.1.4.1")/1024)/1024)/1024)] GB D:\=[round(((((oid("1.3.6.1.2.1.25.2.3.1.5.3")-oid("1.3.6.1.2.1.25.2.3.1.6.3"))*oid("1.3.6.1.2.1.25.2.3.1.4.3"))/1024)/1024)/1024)]/[round(((oid("1.3.6.1.2.1.25.2.3.1.5.3")*oid("1.3.6.1.2.1.25.2.3.1.4.3")/1024)/1024)/1024)] GB
I know you would love to just click a couple places and be done well that is not how this is going to go. Typically when you want to monitor a computers hardware SNMP stuff that is not included in the default view you need to add a program that will populate the fields with the data from the hardware you are interested in. With that said double check to see if there is something povided by your hardware vendor.Hello! Can anyone help me with a probe for monitoring S.M.A.R.T. status of HDD? I need this for Windows Server 2008 R2.
SharadeMaybe it's a stupid question, but i'm totally new with the dude So how i can display cpu / memory like in the picture of slech? Disk Space worked fine for me.
'Link-Test.vbs
'This script checks the link status of critical switchports. If no port is down it returns a null. If a switchport is down it returns the interface number.
'
'Usage: cscript link-test.vbs //NoLogo [/d] /i=<x.x.x.x> /p=<a:b:c:d:n>
' //NoLogo specifies the script engine not to output the banner
' /d switches on debug mode
' /i is the IP address of the switch
' /p is a colon delimited list of critical switchport interface numbers
'Set the defaults
Set WshShell = WScript.CreateObject("WScript.Shell")
Dbg=vbFalse
DownPorts=""
SnmpGet="C:\snmpget\snmpget.exe"
'Get the input parameters
ParCount=wscript.arguments.count
For ParNo=0 to (ParCount-1)
ParSwitch=LCase(left(wscript.arguments.item(ParNo),2))
Select Case ParSwitch
Case "/i"
if Dbg Then WScript.Echo ("Processing IP Address :" & wscript.arguments.item(ParNo))
IPAddr=Right(wscript.arguments.item(ParNo),(len(wscript.arguments.item(ParNo))-3))
Case "/p"
if Dbg Then WScript.Echo ("Processing Port Numbers :" & wscript.arguments.item(ParNo))
PortArray=Split(Right(wscript.arguments.item(ParNo),(len(wscript.arguments.item(ParNo))-3)),":")
if Dbg Then WScript.Echo ("Second Port Number:" & PortArray(1))
Case "/d"
Dbg=vbTrue
WScript.Echo ("Debugging output is enabled")
End Select
Next
For Each PortNo in PortArray
if Dbg Then wscript.echo("Port Number = " & PortNo)
PortCommand = chr(34) & SnmpGet & chr(34) & " -q -r:" & IPAddr & " -o:1.3.6.1.2.1.2.2.1.8." & PortNo
if Dbg Then wscript.echo("Command = " & PortCommand)
Set oExec = WshShell.Exec(PortCommand)
PortState = oExec.StdOut.ReadLine
if Dbg Then wscript.echo("Port state = " & PortState)
if not(PortState="1" or PortState="5") then DownPorts = DownPorts & PortNo & ","
Next
wscript.echo(DownPorts)
@echo off
cscript link-test.vbs //NoLogo /i=%1 /p=%2
Hmmm, unfortunately I don't think I am going to be able to help much more.I think this is about dude comparing values; I guess that in the "receive" textbox I should write an regex expression instead of just a simple value...
This didn't work for me when trying to probe a linux-hosted NTP server. Maybe need to send a complete query packet so the server timestamps and returns it?Here try this... [edit] This worked on a Cisco 2800 router and not a 6509. it doesn't seem to work on a windows server. Probably need more of the actual protocol in the send message to get it to work with other devices. I'll work on it some more later.
HTH,
SD
Thank you very much, but this is just an example. (I mean about 10 devices.)Let us know how it goes!
Lebowski
device_property("FirstAddress") <> ""
if(array_element(ping("192.168.1.1"), 0) < 200, "", "RTT > 200ms")
array_element(ping("192.168.1.1"),0)
device_property("FirstAddress") <> ""
if(array_element(ping(device_property("FirstAddress")), 0) < 200, "", "RTT > 200ms")
array_element(ping(device_property("FirstAddress")),0)
So .... I'm not sure that this can be done. I figured out how to create a Probe that returns "up" if a device responds to a ping as follows:In using the Dude, I see that most notifications respond if a state changes from x to y (e.g. up to down or unstable to down).
I want to be notified of success (via email) if a system outside of our network responds to a Ping. We would run this Ping every morning at 6:00am on a set of systems and expect to receive an email that says "everything is OK". If I don't get this email at 6:00am, then I can assume that something is wrong.
The reason we are doing this is because our Dude server and the email server we use to send alerts will not be able to send a text notification if our network is not available. (Or to put it another way, I won't receive a message if our email server can't get to the network to send an email).
I was thinking of a probe that says "if the last time you tried, the system was up and this time the system was up then I will send an email" but have no idea where to start.
Any help or suggestions about where to start would be greatly appreciated.
Create a scheduled task that adds a broken route to the routing table at 5:50am and then another scheduled task that fixes the routing table at 6am. You can run the ping test as a normal probe and it will break and fix every day because the routing table changed and you will get an email when it transitions from down to up (if you configure it that way).I want to be notified of success (via email)
string_substring(
string_substring(
device_property("AddressesCommaList"),
string_find(
device_property("AddressesCommaList"),
","
)+2
),
0,
string_find(
string_substring(
device_property("AddressesCommaList"),
string_find(
device_property("AddressesCommaList"),
","
)+2
),
","
)
)
Sebastian...
And now i modify my probe ping2:
Name: Ping2
Available: if Ping2s <> "False"
Error: if(Ping2s()<>"False",if(Ping2s()<500, "", concatenate("RTT > 500ms", Ping2s(), "ms")), "ping timeout")
Value: array_element(ping(Device2Address()),0)
Unit: ms
...
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.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".
Available: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"),"NOTEPAD.EXE")>0, 1, -1)
Many thanks, this worked for our Windows NTP servers too.Here is our ntp probe, tested and working on our ubuntu 12.04 ntpd servers
For ease of copy/paste, here is the 'Send' string:
\x1b\00000000000000000000000000000000000000000000000
Thank you so much for this post. I'd been wrestling with something similar for several hours. Very much appreciated.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.
Hi All,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 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
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.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?
<?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>
This works great but is it possible to monitor if an application is in "Not responding" state?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.
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.Check if a certain program is running
I got this corrected, It took me realizing how the label was created and the sub components that created it.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
Any more info on what you did here as this has been annoying me for a while, too.I got this corrected, It took me realizing how the label was created and the sub components that created it.
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"))
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"
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
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",device_property("Type"),"error")
place this on the device label [oid("1.3.6.1.2.1.2.2.1.8.1")]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"))
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:place this on the device label [oid("1.3.6.1.2.1.2.2.1.8.1")]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"))
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"))
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
Does this work?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:place this on the device label [oid("1.3.6.1.2.1.2.2.1.8.1")]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"))
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"))Accordingly, their writing and in function without "up/down". So this function get correct description by oid port, the state - no.Code: Select alllink 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
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.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"))
Look at execute, you can call other programs/scripts and batch jobs.(Future) request :
How to write a probe / function for a NON SNMP device in Dude,
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 ?Look at execute, you can call other programs/scripts and batch jobs.(Future) request :
How to write a probe / function for a NON SNMP device in Dude,
Can you put a regex that matches door closed in the receive? ~[0-9A-Fa-f]+0F2$ or ~[0-9A-Fa-f]+1F2$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 ?
the Probe is already working for the door sensor.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.
Seriously nice work figuring that all out.~[0-9A-Fa-f]{91}0.*
in the "receive" window of the probe. this works very well and simple.
Call any type of probe from a function would be a great addition.so the Big question would be ;
can you put a TCP probe in a "Function"
I figured out with bits and bytes gathered from others. its more of an endless trial and error which leads me often to the right results.Seriously nice work figuring that all out.
In other words, it is necessary to start the ping from the device to 8.8.8.8Hello all!
I'have a lot of point of sale where we use the mikrotik routers. Some shops have dual WAN interfaces for failover by recursive routing. I want to monitor each of WAN interface thru ping to google DNS. How can i do that by dude?
Why ping? What kind of wan connection do you have? In some cases you can monitor state (running or not) or count tx/rx packets in particular period of time.In other words, it is necessary to start the ping from the device to 8.8.8.8Hello all!
I'have a lot of point of sale where we use the mikrotik routers. Some shops have dual WAN interfaces for failover by recursive routing. I want to monitor each of WAN interface thru ping to google DNS. How can i do that by dude?
Shadeofspirit, can i explain my situation in russian language? How to write private messages here?Why ping? What kind of wan connection do you have? In some cases you can monitor state (running or not) or count tx/rx packets in particular period of time.In other words, it is necessary to start the ping from the device to 8.8.8.8Hello all!
I'have a lot of point of sale where we use the mikrotik routers. Some shops have dual WAN interfaces for failover by recursive routing. I want to monitor each of WAN interface thru ping to google DNS. How can i do that by dude?
When i was looking for the same probe (ping from different wans in device from dude) i didn't find. But if you want to ping, you can use not dude, but netwatch on device (add route to google DNS from particular wan and write script on down event)
Отправлено с моего Redmi 3S через Tapatalk
there are no private messages on this forum try skype (victorspirit) ot telegram (+375445fourfour340five)Shadeofspirit, can i explain my situation in russian language? How to write private messages here?Why ping? What kind of wan connection do you have? In some cases you can monitor state (running or not) or count tx/rx packets in particular period of time.In other words, it is necessary to start the ping from the device to 8.8.8.8Hello all!
I'have a lot of point of sale where we use the mikrotik routers. Some shops have dual WAN interfaces for failover by recursive routing. I want to monitor each of WAN interface thru ping to google DNS. How can i do that by dude?
When i was looking for the same probe (ping from different wans in device from dude) i didn't find. But if you want to ping, you can use not dude, but netwatch on device (add route to google DNS from particular wan and write script on down event)
Отправлено с моего Redmi 3S через Tapatalk
This works great but is it possible to monitor if an application is in "Not responding" state?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.
Could it be that you use the wrong OID. I check Windows services as following:
Available: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "db2sec.exe")>0, 1, -1)
Error: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "db2sec.exe")>0, "", "DB2_db2sec.exe not detected by SNMP probe")
Value: 1
Unit: running
Rate: none
Change "db2sec.exe" with the name of the service you like to monitor. One thing I also noticed is, that the name is case-sensitive! Write the service name the same as you see it in the Windows Task Manager.
Sometimes it also helps to use the if() function for debugging. If you are not shure what you will get with "if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "db2sec.exe")>0" and want to see it, put the same command as "to do". For example:
Error: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "db2sec.exe")>0, array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "db2sec.exe"), array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "db2sec.exe"))
With this error line you will see the output of the command in the "Problem" column of the "Services" table. Sometimes it helps me a lot to find bugs in my commands.
Only if you make 2 probes, one to graph and one to notify, on the one to graph just put "" in the error line and don't put anything in the graph on the 2nd probe....Is it possible to graph all the time and still have a notification on failure if a probe fails?
CPU: [cpu_usage()]%
RAM: [mem_usage()]%
DiskC Free: [win_diskC_free_MB()] MB
DiskE Free: [win_diskE_free_MB()] MB
[failed_services()]
[services_info()]
Service [Probe.Name] on [Device.Name] is now [Service.Status] ([Service.ProblemDescription])
Stanje servisov:
[Device.services_info()]
syntax <> sintaks.. I don't know what is correct sintaks to display value of function in email message.
I've been using the Dude for about a month now and am very impressed, the Probe Thread has been very useful. One probe I am having trouble creating is for current bandwidth utilization, giving a notification at a ceratin percentage. Here's what I've done so far:
Using the idea that (InOctets + OutOctets)*8*100/ifSpeed gives the percentage of utilization I created the function:
Function
Name: Bandwidth
Code: (oid("1.3.6.1.2.1.2.2.1.16.21")+oid("1.3.6.1.2.1.2.2.1.10.21")*8*100/oid("1.3.6.1.2.1.2.2.1.5.21")
From there I applied this function to a probe
Probe
Available: Bandwidth()
Error: if(Bandwidth()<50, "", concatenate("Bandwidth Utilization is at ", array(Bandwidth()),"%")
Value: Bandwidth()
Unit:
Rate: none
The does work in the fact that it does return a percentage, and when that percentage is passed I receive an email stating that percentage has passed and it gives me what the current percentage is.
The two problems are that this percentage does not match up with the link status given by The Dude in the network map, nor does it line up with the percentage shown on the port in the switch's web based console. Second, because these OIDs are counters if I watch this in real time in The Dude, I can see the percentage start low and then get higher and higher for 90 seconds until the next poll interval when it drops and starts again. Is there a way for it to give an average of the poll interval to show more accurate data?
snmpwalk translate raw value to corresponding string,sorry, i'm here again to ask help....
i try to monitor an asustor NAS with the dude.
i can upload mib on the dude correctly and now get value with snmpwalk .
my goal is monitor CPU and disk status (health)
i create a function with code
oid("iso.org.dod.internet.private.enterprises.asustor.asustorDisk.diskTable.diskEntry.diskTemperature.1")
then i probe this temp and alert me if is too hot.
now i try to do same thing with health
on snmpwalk i find oid and see value as Healthy
create function with code
oid("iso.org.dod.internet.private.enterprises.asustor.asustorDisk.diskTable.diskEntry.diskStatus.1")
but return 0 on data chart
i want as last value Healthy and compare it with a probe.
Thank you in advance
Probably.. yes... but I do not have any device to test directly simulating not-healt status...ok, i understand
if i create a probe as in the attachement.
probe is ok when is Healthy, but return error when is "not equal" Healthy.
correct?
thank you
/tool/netwatch/add name="ipv4.google.com" host=8.8.8.8
Name: netwatch_ipv4
Description: Netwatch to check IPv4 Connectivity
Code: ros_command(":put ([/tool netwatch print as-value where name=\"ipv4.google.com\"]->0->\"status\")")
Name: IPv4 Connectivity
Type: Function
Agent: default
Available: netwatch_ipv4() = "up"
Error: if(netwatch_ipv4() = "up", "", "down")
Value: if(netwatch_ipv4() = "up", 1, 0)
function
->[netwatch_ipv4()]<-
function + if
->[if(netwatch_ipv4()="up","up","down")]<-
ros_command
->[ros_command(":put ([/tool netwatch print as-value where name=\"ipv4.google.com\"]->0->\"status\")")]<-
ros_command + if
->[if(ros_command(":put ([/tool netwatch print as-value where name=\"ipv4.google.com\"]->0->\"status\")")="up", "up", "down")]<-
function
->up
<-
function + if
->up<-
ros_command
->up
<-
ros_command + if
->up<-
/tool/netwatch/set 1 host=172.16.0.100
function
->down
<-
function + if
->down<-
ros_command
->down
<-
ros_command + if
->down<-
function
->down
<-
function + if
->up<-
ros_command
->down
<-
ros_command + if
->up<-
The probe on UDP port 123 (NTP) above does not seem to work anymore?\x1b\00000000000000000000000000000000000000000000000