Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/patagonaa/prometheus-mndp-autodiscovery
Prometheus autodiscovery for Mikrotik devices
https://github.com/patagonaa/prometheus-mndp-autodiscovery
hacktoberfest mikrotik mndp nodejs prometheus snmp
Last synced: about 2 months ago
JSON representation
Prometheus autodiscovery for Mikrotik devices
- Host: GitHub
- URL: https://github.com/patagonaa/prometheus-mndp-autodiscovery
- Owner: patagonaa
- License: mit
- Created: 2019-06-30T10:56:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-25T00:12:11.000Z (almost 3 years ago)
- Last Synced: 2024-08-02T15:53:30.212Z (5 months ago)
- Topics: hacktoberfest, mikrotik, mndp, nodejs, prometheus, snmp
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prometheus-mndp-autodiscovery
Prometheus autodiscovery for Mikrotik devices
## Example using docker:
### docker-compose.yml
```yaml
version: "3"services:
prometheus:
image: prom/prometheus
volumes:
- "./prometheus.yml:/etc/prometheus/prometheus.yml"
- "mikrotik-discovery:/etc/prometheus/mikrotik-discovery"
- "prometheus-data:/prometheus"
# [...]mndp-autodiscovery:
image: prometheus-mndp-autodiscovery
build: ./prometheus-mndp-autodiscovery # path of git repo
volumes:
- "mikrotik-discovery:/file_sd/"
network_mode: host # required for receiving UDP broadcastsvolumes:
prometheus-data:
mikrotik-discovery:
```
### prometheus.yml
```yaml
global:
# [...]scrape_configs:
- job_name: 'snmp'
metrics_path: /snmp
file_sd_configs:
- files:
- 'mikrotik-discovery/targets.json'
relabel_configs:
- source_labels: [__address__]
target_label: instance
regex: '(^[^-]*-[^.]*).*'
replacement: '$1'
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__address__]
target_label: target
- target_label: __address__
replacement: '[ip or host where snmp-exporter is running]:9116'
```