Javascript must be enabled to download our products and perform other essential functions on the website.

ionicons-v5-m
ionicons-v5-j
Buy Now Download Free Trial
ionicons-v5-m
ionicons-v5-f

Calculated Status Monitor

There are sometimes situations where you want a monitor to report on the combined status of a few different monitors. Or perhaps you need the exact opposite of a monitor (for example, to be alerted when a Ping is successful on a back-up line that ought to be down most of the time). The Calculated Status monitor was created for these situations.

The Calculated Status Monitor is a script that uses the statuses of one or more input monitors. Once you have those input statuses, you can combine, compare or do any other operation that you like using either the VBScript or Javascript language. You can select the language to use in the Script Language dropdown box. The final output is the status for the monitor. For example, look at the example script below (a somewhat similar default script is created for you automatically):

Dim statusB
statusB = GetMonitorStatus("DNVISTA", "Ping Backup Link", 7)
Dim statusA
statusA = GetMonitorStatus("DNVISTA", "Backup Failed Event Log Check", 2)

const msOK = 1 'no problems (green - OK, alert suppressed, training, etc)
const msALERT = 2 'error actions will be fired (yellow - alert state)
const msERROR = 3 'monitor can not run for some reason (red - error)
const msDISABLED = 6 'resource state unknown (gray - disabled, maintenance, etc)

'Combined status check example:
'if (statusA = msOK) AND (statusB = msOK) then
' FireActions = false
'else
' FireActions = true
' Details = "Double-monitor check failed"
'end if

'Opposite status example:
'if (statusA = msALERT) then
' FireActions = false
'else
' FireActions = true
' Details = "Put a detailed error message here"
'end if

In the example above, the GetMonitorStatus function gets the current status of the monitor listed in the parameters. The numbers 7 and 2 in the example are monitor types that are used internally. You don't need to guess what those values are -- if you want to operate on the status of a monitor, click the Insert variables for monitors' status... button. That will present a user interface where you can choose the monitor status to insert.

In the example script above, you'll also see definitions for msOK, msALERT, etc. If you accidentally delete those and need to get them back, press Insert status definitions and the code will be added back to your script.

In the example above, the "Ping Backup Link" is checking a backup link that should always be down, except when the primary link is down (in that case the backup should be up). That means we normally want the "Ping Backup Link" to be down (which would make it yellow in the status reports). Since this monitor is really just an input value, and we don't want it's normal yellow state to show yellow on all the status charts, it would make sense to go to that monitor, press Advanced Monitor Options, go to the Status tab, and indicate the monitor should always remain green.

Standard Configuration Options

Like all monitors, this monitor has standard buttons on the right for Adding Actions, setting Advanced Options and setting the Monitor Schedule.

PA Server Monitor

Help Map