Files
ansible-config/roles/postgres_exporter/templates/postgres_exporter.service.j2

17 lines
404 B
Plaintext
Raw Permalink Normal View History

[Unit]
Description=Postgres Exporter
After=network.target postgresql.service
Wants=postgresql.service
[Service]
Type=simple
User=postgres_exporter
Group=postgres_exporter
Environment=DATA_SOURCE_NAME="{{ postgres_exporter_data_source_name }}"
ExecStart=/usr/local/bin/postgres_exporter --web.listen-address=:{{ postgres_exporter_port }}
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target