From 158c725ab4f5ed38b0669ac48148e5756c70ffd1 Mon Sep 17 00:00:00 2001 From: Kumi Date: Fri, 17 May 2024 15:54:25 +0200 Subject: [PATCH] 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. --- contrib/postgres-connection-exporter.service | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 contrib/postgres-connection-exporter.service diff --git a/contrib/postgres-connection-exporter.service b/contrib/postgres-connection-exporter.service new file mode 100644 index 0000000..733b727 --- /dev/null +++ b/contrib/postgres-connection-exporter.service @@ -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