Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cherrysuryp/node-exporter-secure
Secured forwarder API for Prometheus Node Exporter
https://github.com/cherrysuryp/node-exporter-secure
exporter grafana prometheus prometheus-metrics
Last synced: 27 days ago
JSON representation
Secured forwarder API for Prometheus Node Exporter
- Host: GitHub
- URL: https://github.com/cherrysuryp/node-exporter-secure
- Owner: CherrySuryp
- License: gpl-3.0
- Created: 2024-07-30T13:01:50.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-09-18T18:27:57.000Z (about 2 months ago)
- Last Synced: 2024-10-11T06:03:22.444Z (27 days ago)
- Topics: exporter, grafana, prometheus, prometheus-metrics
- Language: Python
- Homepage: https://hub.docker.com/r/abelodev/node-exporter-secure
- Size: 67.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node Exporter Secure
This is a custom API written with FastAPI Python framework that forwards [Prometheus Node-Exporter](https://github.com/prometheus/node_exporter) metrics data over secured endpoint with Bearer Auth## Installation
### Docker-Compose
Fully complete `docker-compose.yml` ready to deploy, you only need to update `API_BEARER_TOKEN` env variable
```yaml
services:
node-exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node-exporter
command:
- '--path.rootfs=/host'
pid: host
restart: unless-stopped
volumes:
- /:/host:ro,rslaveapi:
image: abelodev/node-exporter-secure:latest
container_name: node-exporter-secure
environment:
API_BEARER_TOKEN: "token"
command: ["sh", "-c", "uvicorn app.main:app --host=0.0.0.0 --port=8000"]
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://node-exporter-secure:8000/debug/healthcheck"]
interval: 1m
timeout: 10s
ports:
- "9100:8000"
depends_on:
- node-exporter```
## Environment Variables
- `ENV` - `DEV` or `PROD`. Production env disables `/docs`, `/redoc` and `/openapi.json` endpoints. `PROD` is set by default.
- `API_BEARER_TOKEN` - Your Bearer token auth
- `METRICS_ROUTE` - Metrics route. Default set to `/metrics`
- `NODE_EXPORTER_METRICS_PATH` - Node-Exporter endpoint path. Default set to `http://node-exporter:9100/metrics`