Page 2 of 2

Re: Probe Thread

Posted: Fri Apr 14, 2017 4:35 pm
by thomsen
Hello 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?
In other words, it is necessary to start the ping from the device to 8.8.8.8

Re: RE: Re: Probe Thread

Posted: Fri May 05, 2017 4:53 pm
by Shadeofspirit
Hello 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?
In other words, it is necessary to start the ping from the device to 8.8.8.8
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.
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

Re: RE: Re: Probe Thread

Posted: Fri May 05, 2017 5:23 pm
by thomsen
Hello 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?
In other words, it is necessary to start the ping from the device to 8.8.8.8
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.
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
Shadeofspirit, can i explain my situation in russian language? How to write private messages here?

Re: RE: Re: Probe Thread

Posted: Fri May 05, 2017 5:34 pm
by Shadeofspirit
Hello 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?
In other words, it is necessary to start the ping from the device to 8.8.8.8
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.
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
Shadeofspirit, can i explain my situation in russian language? How to write private messages here?
there are no private messages on this forum try skype (victorspirit) ot telegram (+375445fourfour340five)

Re: Probe Thread

Posted: Fri Aug 04, 2017 11:23 am
by spasko
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?
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.

Hi
i've a question about function array_find !
i've integrate in the device appareance a count for process running (in my case HTTPD naming httpd.exe
my code
[array_element(oid_column("1.3.6.1.2.1.25.4.2.1.2"), array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"),"httpd.exe"))]
[array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"),"httpd.exe")]

the prolem il : i've 2 httpd.exe running (look with process explorer) and i watch on device 12 process ! !
it's a syntax function problem or bug on Dude program (version 4 running on windows server)

PS : (sorry for my english , i'm French)

Re: Probe Thread

Posted: Sun Aug 20, 2017 4:39 pm
by eriitguy
Hello, everyone!

I'm trying to setup HP Procurve Cpu probe from the following post.

Now I have configured:
Function
Name: Procurve_Cpu
Code: oid("1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0")

Probe
Name: Procurve_Cpu
Type: Function
Available: Procurve_Cpu() <> ""
Error: if(Procurve_Cpu() > 80, "", concatenate("Cpu load is = ", Procurve_Cpu(), "%"))
Value: Procurve_Cpu()
Unit: %

It seems that it working, but I need some advises:
1. I periodically get "Not available" - how this may be fixed?
2. Should I use Procurve_Cpu() > 80 or Procurve_Cpu() < 80 for Error? I need a notification when Cpu load is over 80%.
With current setup I get periodically errors: Cpu load is = 0%, Cpu load is = 4%
3. I also tried to configure something like this but without success - I got the error: parse failed

Function
Name: Procurve_Cpu_Test
Code: if(oid("1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0",10,5), oid("1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0",10,5), "False")

Probe
Name: Procurve_Cpu_Test
Type: Function
Availavble: Procurve_Cpu_Test() <> "False"
Error: if(Procurve_Cpu_Test()<>"False", if(Procurve_Cpu_Test()<80), "", concatenate("Cpu load is = ", Procurve_Cpu_Test(), "%"))
Value: Procurve_Cpu_Test()
Unit: %

Thank you!

Re: Probe Thread

Posted: Sat Aug 26, 2017 4:10 am
by lebowski
Add 1 in the function since the CPU can return 0% utilization. subtract 1 in the value and error lines...

Name: Procurve_Cpu_Test
Code: if(oid("1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0",10,5), oid("1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0",10,5)+1, "False")


in your error line
if(Cisco_CPU_a()<>"False",if(Cisco_CPU_a() -1<80, "", concatenate("Warning: high CPU = ", Cisco_CPU_a(), "%")), "Cisco Device down")

Re: Probe Thread

Posted: Mon Aug 28, 2017 9:00 am
by eriitguy
lebowski,

Thank you for help!
I have configured a function and probe per you recommendation. Now it look like this:
2017-08-28_084819.png
2017-08-28_084903.png
But I see multiple outages:
2017-08-28_084955.png
And my chart look like this:
2017-08-28_085542.png

Re: Probe Thread

Posted: Fri Sep 01, 2017 11:23 pm
by lebowski
eriitguy, the only idea I have is your probe interval is conflicting with the probe. On the appearance of the device place your function for CPU [Procurve_Cpu_Test()] and see what the label does. Check your label refresh interval and modify it to be the same as your probe interval and see if they act the same. I have my probe interval set for 1 minutes and probe timeout to 25 seconds and the down count to 3.

Re: Probe Thread

Posted: Thu Sep 14, 2017 6:45 pm
by jmay
Is it possible to graph all the time and still have a notification on failure if a probe fails? For example, I'm graphing DC voltage from MT's and I want an alert if that Voltage drops down to a certain point. I used to do this with 2 probes, but if would be nice if I could just have one probe. The problem I'm running into is when voltage gets below 24V I get the alert like I should, but I stop graphing.

Here's my current function:

Available: oid("iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrHealth.mtxrHlVoltage.0")

Error: if(oid("iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrHealth.mtxrHlVoltage.0")>24,"","failed")

Value: oid("iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrHealth.mtxrHlVoltage.0")

Re: Probe Thread

Posted: Tue Oct 10, 2017 1:27 pm
by pablolite
Hello,

I got 600 routers in Dude with (10 probes). Now I define email notification and Im wondering how to configure it for all devices?

Ex.
My 600 devices in Services tab got probe "Internet" without notification. I want to change "Internet" probe to notification "email" in my all devices?
There is any way to change that with command line?

Best,
Pawel

sorry for my english :(


EDIT:
I find solution.

In DUDE->Services->select multiple ones->open context menu->Settings

Re: Probe Thread

Posted: Mon Dec 04, 2017 10:53 pm
by LogicalNZ
Hey All,

Just having a bit of a test with creating probes. In particular we have been working with SNMP to see if a windows service is running. It works fine :)

My problem is that when the service fails, the monitor only turns "Orange" rather than RED.

Is there any way to change this?

With thanks

Re: Probe Thread

Posted: Thu Dec 07, 2017 1:10 am
by lebowski
Is it possible to graph all the time and still have a notification on failure if a probe fails?
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....

Re: Probe Thread

Posted: Wed Jan 31, 2018 3:43 pm
by miro
Hi guys.
I monitor with dude WIndows servers. On Icon in Network map I've following info:
CPU: [cpu_usage()]%
RAM: [mem_usage()]%
DiskC Free: [win_diskC_free_MB()] MB
DiskE Free: [win_diskE_free_MB()] MB
[failed_services()]


[services_info()]

I would like to display information from function services_info() in notification email, which is sent, when some probe is down.
Here is my message body tekst... I don't know what is correct sintaks to display value of function in email message.
Service [Probe.Name] on [Device.Name] is now [Service.Status] ([Service.ProblemDescription])

Stanje servisov:
[Device.services_info()]

Re: Probe Thread

Posted: Wed Jan 31, 2018 4:42 pm
by eine
.. I don't know what is correct sintaks to display value of function in email message.
syntax <> sintaks

On what platform is the dude server installed (rb, windows OS, something else)? What version do you have there? What do you receive in the notification? Why there's no description of the obvious? As I can see you're network professional, then pretty please act as one.

Re: Probe Thread

Posted: Thu Feb 01, 2018 10:53 am
by miro
For correct syntaks in notifications imho versions are not important...
But anyway, here they are:
Dude is on CHR ver 6.41 and server is Windows Server 2012...
In notification I receive no output of function services_info(), just plain text [Device.services_info()]

Re: Probe Thread

Posted: Thu Mar 01, 2018 9:31 am
by ryz
Hi that's my problem too. I don't know how to display function/probe values in email/sms body...
Please help.


Regards

Re: Probe Thread

Posted: Tue Mar 13, 2018 9:49 pm
by dmain
Hello, another new to Dude user struggling with alerting on utilization. I found the post below from 2009, is there something more recent?


"Mon Aug 03, 2009 4:02 pm

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.
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.

I looked into data sources but they look like this "serial0/0 (2) @ router1 tx" and I don't know how you would use one in a function or a probe...
Maybe you can figure out how to use a data source in a probe?

All data sources can be seen by selecting chart, make a chart if you don't have one, click on + to add a new chart line then click on the edit all data sources (the "..." button). In there you can see a list of "interface @ devicename tx or rx" which is where I assume that you discovered how exactly the builtin source works."

Re: Probe Thread

Posted: Tue Mar 13, 2018 10:35 pm
by dmain
Hello, another new to Dude users here struggling with utilization notifications. I found the below from long ago. Is there a more recent example?

"Mon Aug 03, 2009 4:02 pm

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.
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.

I looked into data sources but they look like this "serial0/0 (2) @ router1 tx" and I don't know how you would use one in a function or a probe...
Maybe you can figure out how to use a data source in a probe?

All data sources can be seen by selecting chart, make a chart if you don't have one, click on + to add a new chart line then click on the edit all data sources (the "..." button). In there you can see a list of "interface @ devicename tx or rx" which is where I assume that you discovered how exactly the builtin source works."

Re: Probe Thread

Posted: Mon Jun 18, 2018 5:49 pm
by nikc
Another new Dude user ... nice thread this .... worried after reading it that MT arent that interested in Dude though :S

Re: Probe Thread

Posted: Fri Jul 20, 2018 5:21 am
by autostoper76
when will the new versions?
There is no improvement for a long time

6.39 === the latest version
https://wiki.mikrotik.com/wiki/Manual:T ... _changelog

Re: Probe Thread

Posted: Wed Jul 25, 2018 10:06 am
by Noa
Hi guys. I try to make disk usage probe for large disk 9Tb but snmp give negative value of disk size.
Can i do something with this?
Безымянный.png

Re: Probe Thread

Posted: Wed Aug 28, 2019 5:44 pm
by kenjix
Hi, I've been using the dude for a while now and was trying to get the bandwidth probe and alerts to work, but haven't been able to find any documentation as to how to start. Was this project/work ever followed up? All I can find are post from 2010 and back. Any help will be greatly appreciated.
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?

Re: Probe Thread

Posted: Thu Oct 22, 2020 3:16 pm
by tomislav91
ping over200 dude.jpg
I wanted to get an info message when there is a ping more than 250ms on isp to know and change to another ISP mannualy.
Why this dont work? I didnt get any notification....

Re: Probe Thread

Posted: Fri Feb 12, 2021 11:56 pm
by aleab
Hello,
i would monitor client connected to wifi so i setup dude with this rules

dude - functions
new
name: client_wifi_function
code: ros_command("/interface wireless registration-table print count-only")

dude - probes
new

name: client_wifi_probe
type: function
agent: default

available: client_wifi_function()
error: if(client_wifi_function(), "", "down")
value: client_wifi_function()
unit: Client

work correctly, but when mikrotik have nobody connected to wifi (tipically when office is close) probe result down.
can i setup probe without error?
in other words probes never mark as down...

i tried various error ,like
error: if(client_wifi_function(), "", "")
or
error: if(client_wifi_function()>999, "", "down")
but i have always error or probe not work...

thank you in advance...

Re: Probe Thread

Posted: Mon Feb 22, 2021 9:37 am
by aleab
just for info...

simply i edit in this
available: 1=1

error: if (1>0,"","")

so i have never error :)

thank you again

Re: Probe Thread

Posted: Fri Apr 30, 2021 10:21 pm
by aleab
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

Re: Probe Thread

Posted: Fri Apr 30, 2021 10:27 pm
by rextended
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
snmpwalk translate raw value to corresponding string,
but if you call the oid, you just have 0 or not 0 as value...
healty from MIB = 0
non-healty = not 0

Re: Probe Thread

Posted: Sat May 01, 2021 12:46 am
by aleab
thank you for reply.
ok i try as you described...

but if I wanted to value can i use ?
oid_raw("..................")

thank you in advance

Re: Probe Thread

Posted: Sat May 01, 2021 1:01 am
by aleab
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

Re: Probe Thread

Posted: Sat May 01, 2021 1:16 am
by rextended
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
Probably.. yes... but I do not have any device to test directly simulating not-healt status...

The string (non raw) values can be Healthy / Normal / Risky / Dangerous / Bad

ehm.. sorry for my english...

Healty = like new disk
Normal = like used, but with full functionality
Risky = Something on S.M.A.R.T. pre advise problems like end of expected lifetime
Dangerous = near broken disk (from S.M.A.R.T. or too many bad sectors)
Bad = the disk is gone

iso.org.dod.internet.private.enterprises.asustor.asustorDisk.diskTable.diskEntry.diskStatus.1 = disk 1 (1.1.3.6.1.4.1.44738.4.1.1.5.1)
iso.org.dod.internet.private.enterprises.asustor.asustorDisk.diskTable.diskEntry.diskStatus.2 = disk 2 (1.1.3.6.1.4.1.44738.4.1.1.5.2)

some other values can be see for volumes (iso.org.dod.internet.private.enterprises.asustor.asustorVolume.volumeTable.volumeEntry.volumeStatus.x):
Healthy
Clean
Active
Resyncing
Recovering
Reshaping
Appending
Migrating
fsExpanding
fsIniting
Degraded
Failed
Inactive

the respective volume name can be read with iso.org.dod.internet.private.enterprises.asustor.asustorVolume.volumeTable.volumeEntry.volumeName.x

with
iso.org.dod.internet.private.enterprises.asustor.1.sysAsustorID.0
you can check is is available new version of internal ADM
Possible string values: Available / Unavailable

and you can put on device appearance / label the function:
[Device.Name]
[device_performance()][rex_adm_available()]
[Device.ServicesDown]
(your must differ for mine because I replace original)

function name: rex_adm_available()
function:
if ( oid("iso.org.dod.internet.private.enterprises.asustor.1.sysAsustorID.0") = "Available"
, "Aggiornamento ADM disponibile"
, ""
)

Re: Probe Thread

Posted: Sun May 02, 2021 12:16 am
by aleab
thank you!!!!

i try and for now i use this way (monitor volume instead disk)

on VolumeStatus – 4 = Healthy (snmpwalk) right click
create probe
name asustor_volume_status_healthy
type SNMP
agent default
snmp profile v2-public
oid iso.org.dod.internet.private.enterprises.asustor.asustorVolume.volumeTable.volumeEntry.volumeStatus.1
oid type octet string
compare method ==(equal)
string value healthy

now i check also firmware and disk
thank you again

Re: Probe Thread

Posted: Fri May 07, 2021 2:52 pm
by rextended
Don't ask for random things that have nothing to do with it.

Chose another forum.

Re: Probe Thread

Posted: Tue Jun 29, 2021 9:28 pm
by rfwilliams
After a little research, I have found a method for polling the Amazon Alexa (Echo, Echo Dot) devices on a network. There are a few ports open, but the listed ports I could find did little good. The open port I did find, that seems to work, is as follows;

#Amazon Echo Probe
Name = Amazon Echo
Type = TCP
Agent = default
Port = 55442
Send = \n
Receive = ^.

I hope this saves someone a little time.

Re: Probe Thread

Posted: Mon Oct 17, 2022 1:06 pm
by Masyanich
Hello!
I got a value to be like 90BLABLABLA from some oid, how can i use only number (in this example 90)(without BLABLA) in functions?

Re: Probe Thread

Posted: Mon Feb 13, 2023 12:19 pm
by jbfavre
Hello everyone,
I'm trying to monitor my network Connectivity using RouterOS netwatch & Dude.
Here's my routeros setup:
/tool/netwatch/add name="ipv4.google.com" host=8.8.8.8
This properly reflect my IPv4 Connectivity.
On Dude side, I setup a custom function as follow:
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\")")
Expected output is either "up" or "down" depending on /tool/netwatch status.

Then, I set up a probe:
Name: IPv4 Connectivity
Type: Function
Agent: default
Available: netwatch_ipv4() = "up"
Error: if(netwatch_ipv4() = "up", "", "down")
Value: if(netwatch_ipv4() = "up", 1, 0)
Finally, I also used Labels to visually check what's going on:
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")]<-
Actual output is:
function
->up
<-
function + if
->up<-
ros_command
->up
<-
ros_command + if
->up<-
So far, so good. Let's test un unreachable IP address:
/tool/netwatch/set 1 host=172.16.0.100
Expected output
function
->down
<-
function + if
->down<-
ros_command
->down
<-
ros_command + if
->down<-
Actual output:
function
->down
<-
function + if
->up<-
ros_command
->down
<-
ros_command + if
->up<-
And my probe keeps being up.

Apparently, the `if` function doesn't work the way I'm expecting it.
What am I missing ?

Re: Probe Thread

Posted: Fri Feb 24, 2023 6:11 pm
by Atentaduh
Dear The Dude Forum

Is it possible to monitor a https webserver?

this is for the http version
HEAD / HTTP/1.0\r\n\r\n

^HTTP/1\\.

can it be changed to https?

Re: Probe Thread

Posted: Mon May 22, 2023 10:12 pm
by sikkim87
\x1b\00000000000000000000000000000000000000000000000
The probe on UDP port 123 (NTP) above does not seem to work anymore?

I tested on time.cloudflare.com

Re: Probe Thread

Posted: Tue May 23, 2023 10:35 am
by rextended
...

Re: Probe Thread

Posted: Thu Jun 15, 2023 6:13 am
by warfy
I've been attempting to make a function / probe for an APC UPS. Got stuck for a little bit figuring out the syntax. But I think I've got it. Two functions, and a probe listed below.

this is the function:
name: apc_status
if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=1),"Running OK",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=2),"High line voltage",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=3),"Brownout",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=4),"Loss of mains power",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=5),"Small temporary power drop",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=6),"Large temporary power drop",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=7),"Small Spike",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=8),"Large spike",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=9),"UPS self test",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=10),"Excessive input voltage fluctuation","No Data")))))))))))))))))))

This next function returns a 0 for working status and a 1 for a fault status for use in a probe
name: apc_probe
if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=1),"0",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=2),"1",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=3),"1",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=4),"1",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=5),"1",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=6),"1",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=7),"1",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=8),"1",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=9),"0",
(if((oid("1.3.6.1.4.1.318.1.1.1.3.2.5.0")=10),"1","0")))))))))))))))))))

Probe:
type: function
available: if(apc_probe()=0,"True","")
Error: if(apc_probe()=1,apc_status(),"")
Value: apc_status()