diff options
Diffstat (limited to 'roles/monitoring/prometheus/exporter/mikrotik/templates')
-rw-r--r-- | roles/monitoring/prometheus/exporter/mikrotik/templates/config.yml.j2 | 7 | ||||
-rw-r--r-- | roles/monitoring/prometheus/exporter/mikrotik/templates/service.j2 | 30 |
2 files changed, 37 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/exporter/mikrotik/templates/config.yml.j2 b/roles/monitoring/prometheus/exporter/mikrotik/templates/config.yml.j2 new file mode 100644 index 00000000..a2dc1c71 --- /dev/null +++ b/roles/monitoring/prometheus/exporter/mikrotik/templates/config.yml.j2 @@ -0,0 +1,7 @@ +# {{ ansible_managed }} + +devices: + {{ prometheus_exporter_mikrotik_devices | to_nice_yaml(indent=2) | indent(2)}} + +features: + {{ prometheus_exporter_mikrotik_features | to_nice_yaml(indent=2) | indent(2)}} diff --git a/roles/monitoring/prometheus/exporter/mikrotik/templates/service.j2 b/roles/monitoring/prometheus/exporter/mikrotik/templates/service.j2 new file mode 100644 index 00000000..a1c90455 --- /dev/null +++ b/roles/monitoring/prometheus/exporter/mikrotik/templates/service.j2 @@ -0,0 +1,30 @@ +[Unit] +Description=Prometheus mikrotik exporter + +[Service] +Restart=always +User=prometheus-exporter +ExecStart=/usr/bin/prometheus-mikrotik-exporter -port "127.0.0.1:9436" -config-file /etc/prometheus/exporter/mikrotik/config.yml + +# systemd hardening-options +AmbientCapabilities= +CapabilityBoundingSet= +DeviceAllow=/dev/null rw +DevicePolicy=strict +LockPersonality=true +MemoryDenyWriteExecute=true +NoNewPrivileges=true +PrivateDevices=true +PrivateTmp=true +ProtectControlGroups=true +ProtectHome=true +ProtectKernelModules=true +ProtectKernelTunables=true +ProtectSystem=strict +RemoveIPC=true +RestrictNamespaces=true +RestrictRealtime=true +SystemCallArchitectures=native + +[Install] +WantedBy=multi-user.target |