For a number of Tasks that query objects, it is possible to configure evaluators. Evaluators are very similar to conditions, but where a condition determines what actions should be taken before a Task is executed, an evaluator does this afterwards: An evaluator contains one or more expressions that determine whether the evaluator can be satisfied based on the query results. Upon this, the evaluator takes a certain action, either continue or fail the query. This makes it possible to let the execution of succeeding Tasks depend on the results of a query. You can also use evaluators, for example, to check whether a server meets the compliancy rules of your organization.
Different from conditions, evaluators do not contain a fixed set of available criteria on which you can base expressions. The list of available criteria depends on the nature of the Task in which the evaluator is used.
- Query Active Directory Computer
- Query Active Directory Group
- Query Active Directory Object
- Query Active Directory Organizational Unit (OU)
- Query Active Directory User
- Query Certificate
- Query Computer Inventory
- Query Computer Properties
- Query Disk Space
- Query Environment Variables
- Query Event Logs
- Query Files
- Query Installed Programs
- Query Local Group
- Query Local User
- Query Parameters
- Query Printer (2020.3)
- Query Printer Driver
- Query Registry Settings (2020.3)
- Query Service Properties
- Query TCP/IP Properties
You can also use evaluators to check Agent on compliancy. For example, you can configure an evaluator
- for a Task Query Service Properties to check whether a certain service is running on an Agent.
- for a Task Query Disk Space to check the minimum disk space on an Agent.
- for a Task Query Installed programs to check whether a certain application version has been installed.
- You can use several operators when configuring an evaluator. See Pattern Matching: wildcards and operators for an overview.
- Optionally, you can set a parameter as part of the action of an evaluator. This allows you to use a value that is returned by an evaluator in a succeeding Task, for example as part of a condition on this Task.
To add an evaluator to a Task, select its Evaluator tab when setting up the Task. After this, click Add and select the evaluator type. Because each of the mentioned Tasks queries on different properties, the types of evaluator that you can select depend on the Task in which they are used. After selecting the evaluator type, the Add/Edit Expression window opens. You can add as many expressions as needed.
See Pattern matching, wildcards and operators for an overview of all operators.
After configuring the expressions, you need to define how many expressions in the evaluator need to be satisfied. You also need to define which action should be taken if the evaluator does or does not return data:
- Continue: The next Task in the Job will be executed.
- Fail this query: The Task will show a Failed status at Job History.
- Set Parameter: Optionally, you can set a parameter as part of the action of an evaluator. This allows you to use a value that is returned by an evaluator in a succeeding Task, for example as part of a condition on this Task.
- When viewing the detailed Job history of these Tasks, you can use the option Only show data returned by evaluator to filter the results of the query.
- Because an evaluator can specify that a query should fail, the Tasks that can be configured with an evaluator also contain error control settings. The default value of error control for these Tasks is Continue Job on error, whereas the default value of other Tasks is Stop Job on error.
The use of Global Variables in Run Book parameters, Run Book conditions and Run Book evaluators is supported, but the used value will be the global value, not the value that the Global Variable can have per Agent/Team. This is due to the fact that Run Book jobs need to have the complete definition at schedule time, so the per-Agent/Team value cannot be used since we do not know for sure what are the Agents targeted by the job.