This Prometheus exporter makes it possible to monitor systemd unit (e.g. nginx.service) status: only running or not. Without unnecessary details, such as memory consumption, processor time, etc.
If you want some more metrics, you should use the node_exporter with systemd collector
enabled.
-h, --help Show context-sensitive help (also try --help-long and --help-man). --telemetry.address=":9120" Address on which to expose metrics. --telemetry.endpoint="/metrics" Path under which to expose metrics. --host_override="" Override for HTTP Host header; empty string for no override. --web.config="" Path to config yaml file that can enable TLS or authentication. --service_name="nginx" Systemd service name to observe --log.level=info Only log messages with the given severity or above. One of: [debug, info, warn, error] --log.format=logfmt Output format of log messages. One of: [logfmt, json]
Name | Type | Description | Labels |
---|---|---|---|
service_exporter_scrape_failures_total |
Counter | Shows the number of errors while getting systemd unit status | None |
service_exporter_status |
Gauge | Shows the status of the unit | status="nginx" |
scrape_configs:
- job_name: "some-unit"
scrape_interval: "30s"
target_groups:
- targets: ['your_server_ip:9120']