Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configure a Rule Using Server Monitoring Sensor

In the following example, you can use server monitoring sensor to collect disk read data from servers. You can configure fields for total disk read size, time taken to perform the reads, and name of the device that has the disk (key field). You can also calculate rate of disk read and configure a trigger alert when the total disk read exceeds a preset threshold.

  1. Click Configuration > Rules .
  2. On the Rules page, click + Add Rule.
  3. Enter topic name as server.monitoring and set the rule name after the slash ('/'). In this example, rule name can be check-disk-read.

    The rule name in the top row of the rule page follows the topic/rule name format. The default topic name is ‘external’ when you add a new rule.

  4. Add a description and synopsis for your rule.
  5. Click + Add Sensor and enter a name for the sensor. For example, disk.
  6. Select Server Monitoring as sensor type.
  7. Enter sensor path as /node/disk.

    If you add a / at the end of the path, you get sensor paths for disk reads, writes, and written records.

  8. Enter a Frequency (in seconds) for the sensor. For example, 30s.

    The minimum usable sensor frequency is 15 seconds. It takes at least 15 seconds before you see data from the ingest.

  9. Go to Fields tab and click + Add Field and enter the Field Name as device-name.

    This field collects the name of the device containing the disk that generates read data.

  10. Select Field Type as string.
  11. Enable Add to Rule Key.
  12. Select Ingest Type (Field Source) as Sensor.
  13. Select the name of the sensor in the Sensor field. In this example, select disk.
  14. Type Device in the Path field.
  15. Go to Fields tab and click + Add Field and enter the Field Name as disk-read-total.

    This field collects the total size of disk reads in bytes.

  16. Select Field Type as float and Ingest Type (Field Source) as Sensor.
  17. Select the name of the sensor for the Sensor field. In this example, select disk.
  18. Select Path as /node/disk/read/bytes/total
  19. Click + Add Field and enter the Field Name as disk-read-rate.

    This field calculates the rate of change using the field value in disk-read-total.

  20. Select Field Type as float and Ingest Type (Field Source) as Formula.
  21. In Formula, select Rate of Change.
  22. In Field, select the field name disk-read-total.
  23. Click + Add Field and enter the Field Name as read-threshold.

    This field contains a constant value for disk read threshold.

  24. Select Field Type as float and Ingest Type (Field Source) as Constant.
  25. In Constant Value, enter a threshold value for disk reads. For example, 5.
  26. Go to Triggers tab and click +Add Trigger.
  27. Enter a name for the trigger such as read-trigger.
  28. Enter a Frequency value. For example, 2o (2 offset).

    If you set frequency as 2o or 2 offset, it multiplies the static frequency you set for sensor frequency by 2.

  29. Click +Add Term and enter a term name. For example, high-disk-usage.
  30. In the When statement, select left operand as disk-read-total field, right operand as read-threshold field, and the operator as Increase At Least by Value.
  31. In the Then statement, set red as the color and enter Message as high disk read value.
  32. Do one of the following:
    • Click Save to save the rule configuration. Paragon Automation does not deploy the rule configuration.
    • Click Save and Deploy to deploy the configuration in Paragon Automation Platform.

To collect data on metrics, you must add the rule to a Playbook. Then, apply a Playbook instance to the device or the network groups.

When you start collecting server metrics, you can see the logs by providing the pod IDs for the ingest.

  • Log in to the Paragon Automation management CLI.
  • Type the command /var/local/healthbot/healthbot k logs server-monitoring pod id.