The basis of each example of using the DROP rule is the mutually exclusive include and exclude fields.
Example 1. Drop the specified metrics.
Purpose: not to display static metrics in the data table until the data on them are changed.
In the monitoring section, configure the program and script execution probe.
In the process of monitoring, 3 metrics are displayed in the data table: , , . Let the metric most of the time is "0" (the script execution completed).Track changes of other metrics will be more convenient if you hide the metric. But as soon as its value becomes different from 0, then the metric should be displayed in the data table with the current value.
- Drop the metric from the data table.
In the data forming rules, configure the condition and the action:
if is not equal to 0, then overwrite the metric with the current value in the table.
Example 2. Drop all metrics except those specified.
Purpose: to rename metric and update its value.
In the Monitoring section, configure the MQTT sensor.
Monitoring of the air temperature in the room is set up using the MQTT-sensor. The data table displays metrics: and . is the temperature value. Suppose that in the data table only this metric is displayed with the current values and the name.
Update all metrics.
Create the metric.
Set into the value from .
Drop all metrics except .
This is especially useful for visualizing values on a widget: