By
Tutorial Video
1+1 , if any 1 is down , then Sensor Factory is down.
Manual :
PRTG MANUAL: SENSOR FACTORY SENSOR
DEFINE SENSOR STATUS—STATUS() FUNCTION
The status of a Sensor Factory sensor can be controlled by the
Status Definition text field, if you enable the custom formula option in the
Sensor Settings . Using a special syntax, you can define when the factory sensor changes to a
Down status. In all other cases, the sensor will be in an
Up status. The syntax is:
status(sensorID) <boolean> status(sensorID)
The parameters are:
- <sensorId> is the ID of the sensor you want to check the status of. It is displayed on the sensor details page in the page header bar.
- <boolean> is one of the Boolean operators AND , OR , or NOT . If the resulting expression is true , the factory sensor will change to a Down status.
Examples
status(2031) AND status(2044)
This changes the factory sensor to a Down status if both sensors, with IDs 2031 and 2044 , are Down . Otherwise the factory sensor shows an Up status.
status(2031) OR status(2044)
This changes the factory sensor to a Down status if at least one of the sensors with ID 2031 or ID 2044 is Down . Otherwise the factory sensor shows an Up status.
status(2031) AND NOT status(2044)
This changes the factory sensor to a Down status if the sensor with ID 2031 is Down , but the sensor with ID 2044 is not in a Down status. Otherwise the factory sensor shows an Up status.
- Note: A status() function with NOT has to be connected with AND or OR if it is combined with other status() functions:
status(sensorID) AND NOT status(sensorID)
status(sensorID) OR NOT status(sensorID)
( status(2031) AND status(2044) ) OR status(2051)
This changes the factory sensor to a Down status if both the sensor with ID 2031 and the sensor with ID 2044 is Down , or if the sensor with ID 2051 is Down . Otherwise the factory sensor shows an Up status.
|
Additionally, the following elements are allowed to perform calculations and comparisons with the values that are returned by the status functions:
- Basic operations: + (add), - (substract), * (multiply), / (divide)
Example: 3 + 5 * 2
- Brackets: ( )
Example: 3 * (2 + 6)
- Compare: = (equal), <> (not equal), > (greater), < (less), >= (greater or equal), <= (less or equal)
If the comparison resolves to true, the value is 10,000 ; if false, the value is 0 . For delta sensors the speed is compared.
Internally, the status() function returns the downtime channel of the sensor in hundreds of percent (10,000 = 100%).
- true corresponds to a value of 10,000 which is a Down status.
- false corresponds to a value of 0 which is an Up status.
If you understand this, you are able to use more complex formulas.
Example
( status(1031) + status(1032) + status(1033) + status(1034) ) >= 20000
This changes the factory sensor to a Down status if at least any two of the sensors with IDs 1031 , 1032 , 1033 , or 1034 are Down . Otherwise the factory sensor shows an Up status.
|
Note: You can also use the status() function in
channel definitions. Using this functionality, it is possible, for example, to display the numeric status value of sensors in a factory sensor channel
PRTG HTML Manual
Status Definition
This field is only visible if you enable custom formula above. Define when the sensor will switch to a Down status. You can use the status() function in combination with Boolean operations. For advanced users it is also possible to calculate a status value. Please see section Define Sensor Status below.
If a Sensor Has No Data
Choose how this Sensor Factory sensor reacts if a sensor referred to in the channel definition does not provide any data (for example, because it is paused or does not exist). Choose between:
Do not calculate factory channels that use the sensor: For defined channels that use one or more sensor(s) that deliver no data, no data is shown. Additionally, the factory sensor shows a Warning status.
Calculate the factory channels and use zero as source value: If a sensor that you use in a channel definition does not deliver any data, zero values will be filled in instead. The sensor factory calculates the channel value and shows it using these zero values.