Go Report Card
GitHub go.mod Go version

service_exporter

This Prometheus exporter makes it possible to monitor systemd unit (e.g. nginx.service) status: running or not

Flags:

  -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]

Common metrics:

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"

Add to Prometheus targets

scrape_configs:
  - job_name: "some-unit"
    scrape_interval: "30s"
    target_groups:
    - targets: ['your_server_ip:9120']