EXTEND examples

The basis of each example of using the EXTEND rule is the mutually exclusive fields include and exclude.

Example 1: Extension of the data table by all new metrics, except the indicated ones

Purpose: to economize network traffic.

How to:

Step 1: Configure the probe HTTP-request in the section Monitoring

In the example it is enough to know the Status Code and Response Time. If updating the body metric and the switch Send the response body are neglected, network traffic can be significantly economized.

Step 2: Specify the table extension with all new metrics except for the body one in the section Data forming rules

[
 {
  "actions": [
   {
 "type": "extend",
 "exclude": ["body"]
   }
  ]
 }
]

Example 2: Combining include and exclude.

Purpose: to display in the data table metrics from which there are no data.

In the example a probe in the section Monitoring is configured, however, all metrics could not be collected. It may occur with transmitting data over a protocol that does not imply a guaranteed response from the server, such as UDP. Metrics, for which data are missing, are automatically deleted from the data table.

For instance, in the "Smart home" project the motion and door opening sensors are monitored. The server received data only from the motion sensor motion and displayed it in the data table. In order to the metric door will not be deleted, it is essential to extend the table of actual values with a metric with a pointer to outdated data (last_) last_door and to write the last received data into it.

[
  {
    "actions": [
      {
        "type": "extend",
        "include": [
         "last_door"
        ]
      },
      {
        "type": "set",
        "field": "last_door",
        "value": "current.door"
      },
      {
        "type": "extend",
        "exclude": [
          "last_door"
        ]
      }
    ]
  }
]
image