_bug001 >> _bug011 >> TestMacroSiteStatus >> _bug018 >> _bug008 

TB Wiki

Login

SiteStatus Macro Help

The SiteStatus macro is used to show the "UP" or "DOWN" status of machine on the network, or a web site. The first argument to the macro is the network address or domain name for a machine, or a URL. Optional 2nd and 3rd arguments are the return values meaning the machine is up and down respectively.

In the case of a network address or domain name, an ICMP ping is performed and the machine is deemed up if it responds. In the case of a URL, an urlopen is performed on the address, and the machine is deemed up if a 200 HTTP return code is received.

{{SiteStatus(192.168.7.2)}}{{BR}} or
{{SiteStatus(https://google.com/)}}

You can specify alternate return values for "UP" and "DOWN", by specifying them as arguments 2 and 3 to the macro. For example, if you want to return 1 and 0 instead of UP and DOWN, use something like this:

{{SiteStatus(192.168.7.2,1,0)}}{{BR}}

Back to page: SystemInfo

TBWiki engine 1.9.3 by Tim Bird