feat: Add Postgres Connection Exporter service

Introduced a new systemd service for the Postgres Connection Exporter, enhancing monitoring capabilities by tracking database connections. This service configuration ensures it starts after the network is available, runs under a dedicated user and group for security, and is set to automatically restart upon failure, ensuring high availability. The setup aims to streamline deployment and maintenance processes for systems requiring constant database connection monitoring.

The service is designed to be easily integrated into multi-user environments, adhering to best practices for system services.
This commit is contained in:
Kumi 2024-05-17 15:54:25 +02:00
parent 776c98fb47
commit 158c725ab4
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -0,0 +1,13 @@
[Unit]
Description=Postgres Connection Exporter
After=network.target
[Service]
User=postgres-connection-exporter
Group=postgres-connection-exporter
ExecStart=/srv/postgres-connection-exporter/bin/postgres-connection-exporter
Restart=always
WorkingDirectory=/srv/postgres-connection-exporter
[Install]
WantedBy=multi-user.target