Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slashdoom/sla_exporter
rometheus exporter for simple SLA tests
https://github.com/slashdoom/sla_exporter
curl dns ping prometheus prometheus-exporter service-level-agreement tcping
Last synced: 3 days ago
JSON representation
rometheus exporter for simple SLA tests
- Host: GitHub
- URL: https://github.com/slashdoom/sla_exporter
- Owner: slashdoom
- License: mit
- Created: 2024-04-01T15:17:07.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-04-02T15:45:06.000Z (7 months ago)
- Last Synced: 2024-10-11T03:23:25.727Z (26 days ago)
- Topics: curl, dns, ping, prometheus, prometheus-exporter, service-level-agreement, tcping
- Language: Go
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sla_exporter
Prometheus exporter for SLA-like metrics. Currently supported are: cURL (http/https), DNS, Ping (ICMP) and TCPing.
Similar in a lot of way to [Blackbox Exporter](https://github.com/prometheus/blackbox_exporter), and honestly most people will probably be better served by this. This exporter was desgined to be a bit more basic as it was intended to be run on tele-operated forklifts and the operator stations for them.
# Flags
Name | Description | Default
---------|-------------|---------
version | Print version information. |
web.listen-address | Address on which to expose metrics and web interface. | :9909
web.telemetry-path | Path under which to expose metrics. | /metrics
level | Set logging verbose level. | info
timeout | Global default test timeout. | 5
config.file | Path to config file (required). | ./config.yaml# Install
```bash
go get -u github.com/slashdoom/sla_exporter
```# Usage
## Binary
```bash
./sla_exporter -config.file=config.yml
```## Docker
An example Docker compose file is included. It includes services for production, with 2 step build/deploy and Promethus container and one for a dev environment with hot reload. These examples use the golang:alpine image.### Production
```bash
docker compose up prometheus sla_exporter
```### Development
```bash
docker compose up prometheus-dev sla_exporter-dev
```## Config file
The exporter can be configured with a YAML based config file:```yaml
---
level: debug
timeout: 5sweb:
listen_address: 9909
metrics_path: "/metrics"curl_tests:
- url: "http://example.com"
timeout: 5s
- url: "https://example.com"
timeout: 5s
- url: "https://slashdoom.com"
timeout: 5sdns_tests:
- host: "example.com"
timeout: 5s
- host: "example.com"
server: "9.9.9.9"
timeout: 5s
- host: "example.com"
server: "8.8.8.8"
timeout: 5s
- host: "slashdoom.com"
timeout: 5sping_tests:
- host: "example.com"
count: 3
timeout: 5s
- host: "slashdoom.com"
count: 3
timeout: 5stcping_tests:
- host: "example.com"
port: 80
timeout: 5s
- host: "example.com"
port: 443
timeout: 5s
- host: "slashdoom.com"
port: 443
timeout: 5s
```# Third Party Components
This software uses components of the following projects
* Prometheus Go client library (https://github.com/prometheus/client_golang)
* zap Logging library (https://github.com/uber-go/zap)# License
(c) slashdoom (Patrick Ryon), 2024. Licensed under [MIT](LICENSE) license.# Prometheus
See https://prometheus.io/