2021-05-11 23:21:13 +03:00
|
|
|
# Grafana-Mikrotik
|
Major update
🐛 Fix correct show if cpu core > 1
✨ Added SNMP row (scrape time, etc)
✨ Added Note panel (winbox System->Note)
✨ Added Package ver. panel
✨ Added Neighbors table panel
✨ Added RxTx panel for showing [AlignError, CarrierError, Control, Drop, FCS Error, Fragment, Jabber, LengthError, Overflow, Pause, TooLong, TooShort, UnknownOp, Collisions, Deferred, Underrun]
2021-08-03 23:16:58 +03:00
|
|
|
|
2022-07-27 15:53:18 +03:00
|
|
|

|
|
|
|
|
|
2021-05-12 17:15:56 +03:00
|
|
|

|
2021-10-14 01:02:09 +03:00
|
|
|

|
2022-07-27 15:53:18 +03:00
|
|
|

|
|
|
|
|

|
|
|
|
|

|
2021-10-14 01:02:09 +03:00
|
|
|

|
2021-05-12 17:15:56 +03:00
|
|
|
|
2021-10-13 00:10:42 +03:00
|
|
|
[](https://liberapay.com/~1772367/donate)
|
|
|
|
|
|
2022-07-27 15:53:18 +03:00
|
|
|
---
|
2021-05-11 23:21:13 +03:00
|
|
|
|
2021-10-14 01:02:09 +03:00
|
|
|
## 🐳 Deploy with docker-compose
|
2021-10-08 03:03:16 +03:00
|
|
|
|
2021-10-16 23:58:57 +03:00
|
|
|
### Deploy with bash script
|
2021-10-10 12:30:54 +03:00
|
|
|
|
|
|
|
|
```console
|
2023-12-21 13:50:05 +05:00
|
|
|
git clone https://github.com/IgorKha/Grafana-Mikrotik.git
|
|
|
|
|
cd ./Grafana-Mikrotik
|
|
|
|
|
bash ./run.sh --config
|
2021-10-10 12:30:54 +03:00
|
|
|
```
|
2021-10-14 01:02:09 +03:00
|
|
|
|
|
|
|
|
```console
|
|
|
|
|
You can also pass some arguments to script to set some these options:
|
|
|
|
|
|
|
|
|
|
--config: change the user and password to grafana and specify the mikrotik IP address
|
|
|
|
|
|
2022-06-21 17:12:24 +03:00
|
|
|
--stop: stop docker containers
|
2021-10-14 01:02:09 +03:00
|
|
|
|
|
|
|
|
--help
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
|
|
```console
|
2022-01-31 19:28:07 +03:00
|
|
|
bash run.sh --config
|
2021-10-14 01:02:09 +03:00
|
|
|
```
|
2021-10-11 14:03:16 +03:00
|
|
|
|
|
|
|
|
[](https://asciinema.org/a/nOhuc7LvI6bRWbg7dcvqFQ4Kc)
|
|
|
|
|
|
2021-10-14 01:02:09 +03:00
|
|
|
### deploy with docker-compose manual
|
|
|
|
|
|
|
|
|
|
1.Change targets ip (192.168.88.1) into file prometheus/prometheus.yml
|
2021-10-16 23:58:57 +03:00
|
|
|
|
2021-10-14 01:02:09 +03:00
|
|
|
2.Run
|
2021-10-10 12:30:54 +03:00
|
|
|
|
2021-10-08 03:03:16 +03:00
|
|
|
```console
|
|
|
|
|
docker-compose up -d
|
|
|
|
|
```
|
2021-10-14 01:02:09 +03:00
|
|
|
|
|
|
|
|
3.Open [localhost:3000](http://localhost:3000)
|
2021-10-08 03:03:16 +03:00
|
|
|
|
2022-07-27 15:53:18 +03:00
|
|
|
* Grafana login: `admin`
|
2021-10-16 23:58:57 +03:00
|
|
|
|
2022-07-27 15:53:18 +03:00
|
|
|
* Password: `mikrotik`
|
2021-10-08 03:03:16 +03:00
|
|
|
|
|
|
|
|
If you want to change the credentials, then edit the ".env" file
|
|
|
|
|
|
2022-07-27 15:53:18 +03:00
|
|
|
---
|
2021-10-14 01:02:09 +03:00
|
|
|
|
2021-10-08 03:03:16 +03:00
|
|
|
## Manual deploy
|
2021-07-31 23:13:48 +03:00
|
|
|
|
Major update
🐛 Fix correct show if cpu core > 1
✨ Added SNMP row (scrape time, etc)
✨ Added Note panel (winbox System->Note)
✨ Added Package ver. panel
✨ Added Neighbors table panel
✨ Added RxTx panel for showing [AlignError, CarrierError, Control, Drop, FCS Error, Fragment, Jabber, LengthError, Overflow, Pause, TooLong, TooShort, UnknownOp, Collisions, Deferred, Underrun]
2021-08-03 23:16:58 +03:00
|
|
|
1.add into prometheus.yml
|
2021-07-31 23:13:48 +03:00
|
|
|
|
2021-05-11 23:21:13 +03:00
|
|
|
```yml
|
|
|
|
|
- job_name: Mikrotik
|
|
|
|
|
static_configs:
|
|
|
|
|
- targets:
|
2021-10-08 03:03:16 +03:00
|
|
|
- 192.168.88.1 # SNMP device IP.
|
2021-05-11 23:21:13 +03:00
|
|
|
metrics_path: /snmp
|
|
|
|
|
params:
|
|
|
|
|
module: [mikrotik]
|
|
|
|
|
relabel_configs:
|
|
|
|
|
- source_labels: [__address__]
|
|
|
|
|
target_label: __param_target
|
|
|
|
|
- source_labels: [__param_target]
|
|
|
|
|
target_label: instance
|
|
|
|
|
- target_label: __address__
|
|
|
|
|
replacement: localhost:9116 # The SNMP exporter's real hostname:port.
|
|
|
|
|
```
|
Major update
🐛 Fix correct show if cpu core > 1
✨ Added SNMP row (scrape time, etc)
✨ Added Note panel (winbox System->Note)
✨ Added Package ver. panel
✨ Added Neighbors table panel
✨ Added RxTx panel for showing [AlignError, CarrierError, Control, Drop, FCS Error, Fragment, Jabber, LengthError, Overflow, Pause, TooLong, TooShort, UnknownOp, Collisions, Deferred, Underrun]
2021-08-03 23:16:58 +03:00
|
|
|
|
|
|
|
|
2.Configure Prometheus and run /snmp/snmp_exporter
|
|
|
|
|
|
|
|
|
|
3.Add dashboard <https://grafana.com/grafana/dashboards/14420>
|
2021-05-11 23:21:13 +03:00
|
|
|
|
2022-07-27 15:53:18 +03:00
|
|
|
---
|
Major update
🐛 Fix correct show if cpu core > 1
✨ Added SNMP row (scrape time, etc)
✨ Added Note panel (winbox System->Note)
✨ Added Package ver. panel
✨ Added Neighbors table panel
✨ Added RxTx panel for showing [AlignError, CarrierError, Control, Drop, FCS Error, Fragment, Jabber, LengthError, Overflow, Pause, TooLong, TooShort, UnknownOp, Collisions, Deferred, Underrun]
2021-08-03 23:16:58 +03:00
|
|
|
|
2023-12-21 13:50:05 +05:00
|
|
|
### Docker snmp_exporter (deprecated)
|
2021-07-31 23:13:48 +03:00
|
|
|
|
|
|
|
|
[](https://hub.docker.com/repository/docker/mashinkopochinko/snmp_exporter_mikrotik)
|
|
|
|
|
|
|
|
|
|
> amd64-linux container
|
|
|
|
|
|
|
|
|
|
```console
|
|
|
|
|
sudo docker run -d -p 9116:9116 mashinkopochinko/snmp_exporter_mikrotik:latest
|
|
|
|
|
```
|
|
|
|
|
|
2022-07-27 15:53:18 +03:00
|
|
|
---
|
2021-10-07 20:37:58 +03:00
|
|
|

|