Hyvor Relay integrates with the Prometheus/Grafana stack for monitoring.
Hyvor Relay exposes metrics in the Prometheus format on port 9667
on each server.
It only serves metrics to connections from private and CGNAT IP addresses, assuming your monitoring system is on a private network.
To get started, you can add the following to your prometheus.yaml
file:
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'hyvor-relay'
static_configs:
- targets:
- 'your-relay-server-1-private-ip:9667'
- 'your-relay-server-2-private-ip:9667'
First, make sure you have added the Prometheus data source in Grafana. Then, copy the dashboard JSON from grafana.json and import it into your Grafana instance.
You can set up Alertmanager to receive alerts when certain conditions are met in your Relay instance. As a starting point, you can use our default alertmanager.yaml file. You can customize it to suit your needs.
Log aggregation is an important part of monitoring. This documentation shows how to set up Loki for log aggregation.
Side note: If you already have a log aggregation system in place, such as ELK stack, feel free
to use that. These are the two log files that you should monitor: : /var/log/relay/api.log
and /var/log/relay/worker.log
. Both files are in JSON format.