Monitoring and Alert Management
EMQX Neuron provides metric monitoring and alert events, for tracking the state of an instance and being notified when something goes wrong.
TIP
Both are disabled by default and are configured and queried through the HTTP API only; there is no configuration screen in the console. Whether a configuration has taken effect is also checked through the API.
Monitoring metrics
The metrics that can be collected fall into three categories:
| Category | Contents |
|---|---|
| Collection engine | Number of southbound and northbound drivers, driver link states, number of drivers in error |
| Data processing engine | Records in and out per rule, number of stopped rules |
| System resources | CPU, memory, and so on |
The monitoring configuration selects which metrics are wanted. They can be retrieved two ways:
| Method | Description |
|---|---|
| Push to Pushgateway | With a Pushgateway address configured, EMQX Neuron pushes metrics to it for Prometheus to scrape |
| API query | Read the current metrics directly from the API |
For the configuration and query endpoints, see the Monitor API.
Alert events
EMQX Neuron evaluates alert conditions by polling. The alert configuration selects which rules are enabled and how many consecutive polls are required to raise and to clear an alert — N is the number of consecutive abnormal polls before the event is raised, and P the number of consecutive normal polls before it clears.
| Alert type | Subject | Trigger condition | Raised after | Cleared after |
|---|---|---|---|---|
| Driver node abnormal (southbound and northbound) | A single driver | The driver is running but not connected | N consecutive polls | P consecutive normal polls |
| Stream processing rule abnormal | A single rule | The error count of any source, operator, or sink in the rule increases | N consecutive polls | P consecutive normal polls |
| EMQX Neuron restart | The current instance | EMQX Neuron restarts | 1 poll | Not applicable |
Alert events can be retrieved two ways:
| Method | Description |
|---|---|
| Push to a webhook | With a webhook address configured, EMQX Neuron pushes alert events to it |
| API query | Query the most recent alert events |
For the configuration and query endpoints, see the Alert Rule API.