The Halon MTA can be easily monitored using Prometheus with the help of their Node Exporter.
Below is an example on how you can use the halonctl process-stats
command to export the values in their text-based format.
halonctl process-stats --openmetrics > /halon-stats/process-stats.prom.$$ mv /halon-stats/process-stats.prom.$$ /halon-stats/process-stats.prom
This command can then easily be ran in a cronjob and then you can have the output be parsed by Node Exporter like this:
node_exporter --collector.disable-defaults \ --collector.textfile \ --collector.textfile.directory=/halon-stats
You can use http://localhost:9100/metrics to verify that the metrics are populated correctly.
Finally you can configure Prometheus to fetch the data from Node Exporter like this:
global: scrape_interval: 1m scrape_configs: - job_name: halon static_configs: - targets: ['localhost:9100']
You can use http://localhost:9090/graph to verify that the metrics are populated correctly.
Comments
0 comments
Article is closed for comments.