uptime+topic

Active 10 Replies 157 Views 2023-05-24 20:36:08 TCL Requests
Hi,

As per request from here: https://www.tclscripts.net/product/uptimerobot-tcl/(comment)
Flammen replied
3 Months
Quoting BLaCkShaDoW use .chanset, not .set, .set is a command from BlackTools. The .chanset is in DCC.

DOH! fixed wink
BLaCkShaDoW replied
3 Months
use .chanset, not .set, .set is a command from BlackTools. The .chanset is in DCC.
Flammen replied
3 Months
Quoting BLaCkShaDoW the list contains the monitors saved for automatic show when their state changes. You have to save the one set in tcl too.

How do you mean?

Ahh, you mean
  !ruptime save 7944523xx

But that didn't change this: 
  .set #chan uptime.id 7944523xx

gets me:
  Error: wrong # args: should be "set varName ?newValue?"
BLaCkShaDoW replied
3 Months
the list contains the monitors saved for automatic show when their state changes. You have to save the one set in tcl too.
Flammen replied
3 Months
Thanks almost figured it out grin

Shouldn't
  !ruptime list

give me and ID, when i have filled
  set uptimerobot(idToShowOnTopic)

?

when doing 
  set #chan uptime.id 7944523xx

I get:
  [08:49:59] <xxx> Error: wrong # args: should be "set varName ?newValue?"
BLaCkShaDoW replied
3 Months
To get the informat from the monitors use !ruptime, %status% means that it will have a status (DOWN, UP etc). %status% will be replaced with the one read from the api.
Flammen replied
3 Months
Ahh, so 
  %status%

is on or off?

I also have some issue in locating the ID : 
# Set here the default ID of the monitor that will be shown on TOPIC [if not set on channel]
set uptimerobot(idToShowOnTopic) "PUT ID HERE"
BLaCkShaDoW replied
3 Months
The topic will change every time the monitor will have a change of state 
Flammen replied
3 Months
Hi,
I'll give it a try. Thx wink

Let me get this right:

###
# Set here the default ID of the monitor that will be shown on TOPIC [if not set on channel]
set uptimerobot(idToShowOnTopic) "PUT ID HERE"

###
# If you set the ID for TOPIC show, set here the topic text
set uptimerobot(topicToShow) "\[\002UpTimE\002\] %name% ; \002Status:\002 %status% ; \002Uptime ratio:\002 %uptime% %"


So it change topic if uptime robot notice a change? and does it revert back to original topic is the uptimerobot see the site backonline?
BLaCkShaDoW replied
3 Months
Solved some bugs on the script and added your desired function. Please download the script and try it.
loading...