igorkha / grafana-mikrotik Goto Github PK
View Code? Open in Web Editor NEW๐ฐ Grafana dashboard for Mikrotik/routerOS [Prometheus, SNMP]
Home Page: https://grafana.com/grafana/dashboards/14420
License: GNU General Public License v3.0
๐ฐ Grafana dashboard for Mikrotik/routerOS [Prometheus, SNMP]
Home Page: https://grafana.com/grafana/dashboards/14420
License: GNU General Public License v3.0
Hello,
I have a CCR2216 and when I use your exporter, I do not see certain parts.
System is fully marked "No Data" except the Uptime
How can I fix this?
After much troubleshooting, I finally figured out why the snmp docker container wasn't starting on RPi 3, turns out that docker image only supports x64 machine type not arm type. The armv7 binaries for snmp_exporter are already available would you be able to add support for that. Thanks
P.S: I'm a total noob, when it comes to docker, so I haven't been able to come up with a solution for fixing the issue.
Hi
How can the instance field (Grafana) see the System identity, or the hostname of the device instead of the IP address?
- job_name: Mikrotik
static_configs:
- targets:
- 172.16.1.254 # LER130
- 172.16.6.254 # CHONA
- 172.16.7.254 # SDM
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: mk_snmp_exporter:9116
but i didn't see it in dropbox of grafana
RouterOS version: 6.48.6
[[
(which is better) everywhere.${var}
instead of $var
.'
and "
quoted strings.RED=$(printf '\033[31m')
โ RED='\033[31m'
... just use echo -e "${RED}Blah"
to print escape symbols$(id -u)
is just ${UID}
$(id -g)
is ${GID}
.env
file is by design is a shell compatible. No need to "parse" it w/ grep
and sed
... just source it. Example:
[[ -f ${ENV_FILE} ]] && . "${ENV_FILE}"
IP=${MIKROTIK_IP} # However, this become useless ;-)
${2:-}
?? empty default value ?? ;-) this is default ;-) It's equal to $2
in this case....env
file (typically) is not supposed to be in the repo and ought to be in .gitignore
. This is personal user settings.helper()
function violates the DRY (Do not Repeat Yourself) principle. Since you have a similar comment in the beginning it can "reuse" it ;)
help() {
sed -n -e 's/^# //' -e '4,9p;' $0
}
--help
option case and exit.there are definitely some more things to fix but I guess it's enough for the start ;-) I can review it again after fixes...
Hye there! Could you please share the generator.yml file from what you got snmp.yml
Thank you!
Hello,
I have your exporter and dashboard working with a remote CCR2216 but there are some issues.
1.) No "System" info is displaying except for the uptime.
2.) Tx Ether Errors, Rx Ether errors show no data.
Please let me know how I can fix this!
It's not an issue with dashboard. I just don't understand what simple queue query mean. Rather hard Prometheus queries for me.
Could you please give some information what they show? "In - myqueuename" and "PCQ In - myqueuename" for example.
Also I see the warning in Grafana "Metric mtxrQueueSimplePCQQueuesIn is a counter. Try apply a rate() function". There are the same warnings for all PCQ-queries.
I like your dashboard. Gave it 5 stars but review has been pending for 2 weeks now.
Where is documentation on snmp authentication???
What about using snmpv3, does this support snmpv3?
Is it possible to add multiple devices? If yes, how to do it? Thank you!
Is there any way to add SNMP community and version? If not, please add it.
Thank you
please help i see issue when run #docker-compose up -d
this is error screen
root@mikrotik:~/Grafana-Mikrotik# docker-compose up -d
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the services
key, or omit the version
key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
In the run.sh
, before doing anything make sure that all needed tools are present/installed. Cuz it's gonna be a disappointment to see an error about some missing tool in the middle of actions.
Help to change mikrotik api port, username and password
i cant get graph on
image
early time i keep getting "context deadline exceed" prometheus, so i try adding scrape_interval and scrape_timeout on prometheus.yml
it work but i cant get graph one those 3 above.
I tried on different router as target and everything work fine.
and can we monitor more than 1 mikrotik router?
Hi there, I love this dashboard and is one my first Grafana / Prometheus, so I'm not so experienced yet customizing on my own.
With this said, is there any chance on kindly taking into consideration these two request:
Add wifi client count support on the main view of the dashboard when using capsman, without capsman this works just fine but with capsman I see the client count as zero.
In the wireless tab there is a cool graph showing the historic level of signal of the customers, is there anyway to replicate this in the capsman tab?
After launch, some of the containers start, but this one cannot. Please help me get started. Console output below.
[root@ww Grafana-Mikrotik]# bash run.sh --config
====================================
Prometheus
Change target mikrotik IP address ? (current 192.168.3.1) [Y/n]
Enter target mikrotik IP address: 192.168.3.30
... Prometheus target IP changed to 192.168.3.30
====================================
Grafana
Change default credentials Grafana ? [y/N]
Default Grafana:
User: admin
Password: mikrotik
[+] Building 0.0s (0/0)
[+] Running 2/3
โ Container mk_grafana Running 0.0s
โ ฟ Container mk_prometheus Starting 43516.2s
โ Container mk_snmp_exporter Recreated 0.3s
^Z
[3]+ Stopped bash run.sh --config
While trying to scrape Mikrotik target, in walking subtree" oid=1.3.6.1.4.1.14988, snmp_exporter returns the following error message:
Error scraping target" err="error walking target x.x.x.x: request timeout (after 3 retries)
I also try snmpwalk (snmpwalk -v 2c -c public x.x.x.x 1.3.6.1.4.1.14988) the target with subtree 1.3.6.1.4.1.14988 and encounter "No more variables" error
[snipped]
SNMPv2-SMI::enterprises.14988.1.1.17.1.1.4.1 = STRING: "RouterOS v6.48.3 May/25/2021 06:09:45"
SNMPv2-SMI::enterprises.14988.1.1.17.1.1.5.1 = INTEGER: 1
SNMPv2-SMI::enterprises.14988.1.1.17.1.1.6.1 = INTEGER: 1
SNMPv2-SMI::enterprises.14988.1.1.20.1.1.0 = Gauge32: 0
SNMPv2-SMI::enterprises.14988.1.1.20.2.1 = No more variables left in this MIB View (It is past the end of the MIB tree)
I did some search but can't figure out what causes the issue. Would you mind shedding me some light?
Hello friends,
Maybe you can help me.. I'm a bit newly in Grafana
I cannot see many of MK datas, as board info, cpu or interfaces list (the table of interfaces is amazing designed, but I cannot see it)
My snmp is placed at /etc/prometheus/snmp.yml and /usr/local/bin/snmp.yml
This is my file
snmp.zip
Grafana ver 8
Prometheus ver 0.20.0
snmp_exporter installed like this: https://snapcraft.io/install/prometheus-snmp-exporter/centos
(I was not able to see a step by step install procedure)
Distribution: Centos 8
What I'm doing wrong?
Thank you so much for your help
First off, thank you for your work on this. I'm just having issues with the dashboard when running this on my k8s cluster. More than likely a relabeling issue and I am not quite sure how to address it to be completely honest. My router is on IP 10.10.0.1 but the container IP is 172.16.0.66. I only have one relabeling, but the dashboard is showing a lot of duplicate entries. I'm definitely a noob at grafana/prometheus so hoping you could maybe point me in the right direction.
relabelings:
- sourceLabels: [__param_target]
targetLabel: instance
can you tell which Prometheus Exporter for Mikrotik RouterOS is used?
I have found a few so far, which all have some issues, so it would be nice to know, which limitation the one used her has.
I have found so far:
snmp_exporter of v0.20.0, embedded in this repo's dockerfile, won't work with proposed config
level=info ts=2023-12-21T17:06:38.467Z caller=main.go:152 msg="Starting snmp_exporter" version="(version=0.20.0, branch=HEAD, revision=c33572b6c8c8e43a479fde0f9fa8ac86e15598bc)"
level=info ts=2023-12-21T17:06:38.467Z caller=main.go:153 build_context="(go=go1.15.8, user=root@eebd39e6960e, date=20210212-11:37:48)"
level=error ts=2023-12-21T17:06:38.482Z caller=main.go:159 msg="Error parsing config file" err="yaml: unmarshal errors:\n line 3: field public_v2 not found in type config.plain\n line 10: field mikrotik not found in type config.plain"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.