Monitor device resources
You can configure resource monitors for device resources and create alerts when the utilization of resources crosses a defined threshold. When the agent alerts the Red Hat Edge Manager service, the service sets the device status to degraded or error, depending on the severity level.
Resource monitors take the following parameters:
| Parameter | Description |
|---|---|
|
|
The resource to monitor. The |
|
|
The interval in which the monitor samples usage, specified as a positive integer followed by a time unit: |
|
|
A list of alert rules. |
|
|
For |
Alert rules take the following parameters:
| Parameter | Description |
|---|---|
|
|
The severity of the alert rule can be |
|
|
The duration that resource usage is measured and averaged over when sampling, specified as a positive integer followed by a time unit: |
|
|
The usage threshold that triggers the alert, as percentage value. The value ranges from 0 to 100 without the % sign. |
|
|
A human-readable description of the alert. Add details about the alert to help with debugging. By default, the alert description is |
Monitoring device resources using the CLI
Monitor the resources of your device through the CLI, providing you with the tools and commands to track performance and troubleshoot issues.
Complete the following steps:
- Add resource monitors in the
spec.resourcessection of the device specification. For example, add the following monitor for your disk:apiVersion: flightctl.io/v1alpha1 kind: Device metadata: name: <device_name> spec: resources: - monitorType: Disk samplingInterval: 5s path: /application_data alertRules: - severity: Warning duration: 30m percentage: 75 description: Disk space for application data is >75% full for over 30m. - severity: Critical duration: 10m percentage: 90 description: Disk space for application data is >90% full over 10m.