kpetremann / salt-exporter

Salt Prometheus exporter working out of the box without any configuration on Salt side. Comes with an event watcher TUI.
https://kpetremann.github.io/salt-exporter/
MIT License
30 stars 8 forks source link

Configurable metrics #35

Closed kpetremann closed 1 year ago

kpetremann commented 1 year ago

each metrics can now be enabled/disabled.

Some can be filtered or customized.

Example of configuration:

metrics:
  global:
    filters:
      ignore-test: false
      ignore-mock: false

  salt_new_job_total:
    enabled: true

  salt_expected_responses_total:
    enabled: true

  salt_function_responses_total:
    enabled: true
    add-minion-label: false  # not recommended in production

  salt_scheduled_job_return_total:
    enabled: true
    add-minion-label: false  # not recommended in production

  salt_responses_total:
    enabled: true

  salt_function_status:
    enabled: true
    filters:
      functions:
        - "state.highstate"
      states:
        - "highstate"

Note: It deprecated -health-minions, health-functions-filter and health-states-filter flags. They should be replaced by configuring metrics in the config.yml file.

Implements: #26