State change conditions
State change conditions (or State conditions) – a set of user-defined conditions that specify when an entity changes its state.
You can define state change conditions in the State change conditions section of entities. You can define default state conditions in object classes.
Data selection algorithm for multiple conditions
If an entity has multiple state conditions, the system applies the following algorithm:
-
for the first condition, the system selects from all data available to the entity;
-
for the subsequent conditions, the system selects only from the data, that remained after filtering in the preceding condition.
This way, the data set is "narrowed" after processing each condition.
Conditions priority
The system checks condition from top down until a condition is met. Higher the condition is in the list, the higher priority it has.
You can change the order of conditions can be changed with drag&drop by the icon.
If no conditions are met, by default object changes its state to the NO DATA state with the reason No suitable condition
.
The default state can be set in the default_state_id parameter of the Server section of the server configuration file.
|
If you need to prevent an entity from going into the default state due to the lack of the suitable condition, you can configure an empty condition with the Don’t change state
action as the last condition:


The method above only works for a completed check that returns a result to the server. If a check cannot be completed, object will be forced to a default state. |
This option might also be useful if some value or a range of values must be ignored. For instance, if you need to check whether a resource is accessible via HTTP-GET request, state conditions can be configured that way:
-
if the response code is equal to 200, the current state changes to the WORKING state;
-
if the code is not equal to 200 for more than a minute, the current state changes to the ALARM state;
-
otherwise, don’t change the current state.
Example of such configuration:

