Skip to content

dorokhin/service_exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card GitHub go.mod Go version Go release GitHub release (latest SemVer including pre-releases)

service_exporter

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.

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