Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kpetremann/salt-exporter
Salt Prometheus exporter working out of the box without any configuration on Salt side. Comes with an event watcher TUI.
https://github.com/kpetremann/salt-exporter
prometheus prometheus-exporter salt saltstack tui
Last synced: 3 months ago
JSON representation
Salt Prometheus exporter working out of the box without any configuration on Salt side. Comes with an event watcher TUI.
- Host: GitHub
- URL: https://github.com/kpetremann/salt-exporter
- Owner: kpetremann
- License: mit
- Created: 2022-07-01T21:43:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-23T17:45:43.000Z (4 months ago)
- Last Synced: 2024-09-30T13:34:29.980Z (3 months ago)
- Topics: prometheus, prometheus-exporter, salt, saltstack, tui
- Language: Go
- Homepage: https://kpetremann.github.io/salt-exporter/
- Size: 14 MB
- Stars: 27
- Watchers: 4
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![Latest](https://img.shields.io/github/v/release/kpetremann/salt-exporter)](https://github.com/kpetremann/salt-exporter/releases)
[![Go](https://img.shields.io/github/go-mod/go-version/kpetremann/salt-exporter)](https://github.com/kpetremann/salt-exporter)
[![CI](https://github.com/kpetremann/salt-exporter/actions/workflows/go.yml/badge.svg)](https://github.com/kpetremann/salt-exporter/actions/workflows/go.yml)
[![GitHub](https://img.shields.io/github/license/kpetremann/salt-exporter)](https://github.com/kpetremann/salt-exporter/blob/main/LICENSE)## Salt Live
> _`salt-run state.event pretty=True` under steroids_
Salt Exporter comes with `Salt Live`. This is a Terminal UI tool to watch events in real time.
## Salt Exporter
`Salt Exporter` is a Prometheus exporter for [Saltstack](https://github.com/saltstack/salt) events. It exposes relevant metrics regarding jobs and results.
This exporter is passive. It does not use the Salt API.
It works out of the box: you just need to run the exporter on the same user as the Salt Master.
```
$ ./salt-exporter
``````
$ curl -s 127.0.0.1:2112/metricssalt_expected_responses_total{function="cmd.run", state=""} 6
salt_expected_responses_total{function="state.sls",state="test"} 1salt_function_responses_total{function="cmd.run",state="",success="true"} 6
salt_function_responses_total{function="state.sls",state="test",success="true"} 1salt_function_status{minion="node1",function="state.highstate",state="highstate"} 1
salt_new_job_total{function="cmd.run",state="",success="false"} 3
salt_new_job_total{function="state.sls",state="test",success="false"} 1salt_responses_total{minion="local",success="true"} 6
salt_responses_total{minion="node1",success="true"} 6salt_scheduled_job_return_total{function="state.sls",minion="local",state="test",success="true"} 2
salt_health_last_heartbeat{minion="local"} 1703053536
salt_health_last_heartbeat{minion="node1"} 1703053536salt_health_minions_total{} 2
```### Deprecation notice
`-health-minions`, `health-functions-filter` and `health-states-filter` are deprecated.
They should be replaced by metrics configuration in the `config.yml` file.The equivalent of `./salt-exporter -health-minions -health-functions-filter "func1,func2" -health-states-filter "state1,state2"` is:
```yaml
metrics:
salt_responses_total:
enabled: truesalt_function_status:
enabled: true
filters:
functions:
- "func1"
- "func2"
states:
- "state1"
- "state2"
```### Installation
Just use the binary from [Github releases](https://github.com/kpetremann/salt-exporter/releases) page.
Or, install from source:
- latest published version: `go install github.com/kpetremann/salt-exporter/cmd/salt-exporter@latest`
- latest commit (unstable): `go install github.com/kpetremann/salt-exporter/cmd/salt-exporter@main`### Usage
Simply run:
```./salt-exporter```The exporter can be configured in different ways, with the following precedence order:
* flags
* environment variables
* configuration file (config.yml)See the [official documentation](https://kpetremann.github.io/salt-exporter) for more details