New MQTT adaption

This commit is contained in:
2026-01-04 11:07:38 +01:00
parent b28da4739f
commit 16cc9c1cb4
9 changed files with 1135 additions and 243 deletions

View File

@ -1,16 +1,45 @@
[Unit]
Description=TTN Exporter for VEGAPULS Air
After=syslog.target
After=network.target
Description=TTN VEGAPULS Air Prometheus Exporter
Documentation=https://git.mosad.xyz/localhorst/TTN-VEGAPULS-Air-exporter
After=network-online.target
Wants=network-online.target
[Service]
Restart=on-failure
RestartSec=2s
Type=simple
User=prometheus
Group=prometheus
# Working directory
WorkingDirectory=/opt/ttn-vegapulsair-exporter/
# Execution
ExecStart=/usr/bin/python3 /opt/ttn-vegapulsair-exporter/ttn-vegapulsair-exporter.py
# Restart configuration
Restart=always
RestartSec=10
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=ttn-vegapuls-exporter
# Security settings
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/ttn-vegapulsair-exporter/
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
# Resource limits
MemoryLimit=256M
CPUQuota=5%
# Environment
Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target