Page tree

SAYMON документация

Skip to end of metadata
Go to start of metadata

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

Example 1. Extension of the data table by all new metrics, except those indicated.

Purpose: to save network traffic.

How to:

  1. In the Monitoring section, configure the HTTP-request probe.

    For us, it is enough to know Status Code and Response Time. If we neglect to update the bodymetric and the "Send the response body" switcher , we can significantly save network traffic.

  2. In the data forming rules,  specify the table extension with all new metrics except body.

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

Example 2. Combining include and exclude.


Puprose: to display in the data table metrics from which data are missing.


Suppose, in the Monitoring section a probe is configured, for which all metrics could not be collected. This can occur when transmitting data over a protocol that does not imply a guaranteed response from the server — UDP. Metrics for which data is missing are automatically deleted from the data table.

For example, in the "smart home" project the sensors of motion and door openings are monitored. The server received data only from the motion sensor motion and displayed in the Data Table. In order for the door metric not to be deleted, it is necessary to extend the table of actual values with a metric with a pointer to outdated data (last_) last_door and to overwrite 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"
        ]
      }
    ]
  }
]

  • No labels