mikrotik-exporter
mikrotik-exporter copied to clipboard
Cannot retrieve DHCP Leases
As the title says, I'm unable to retrieve DHCP Leases from my MikroTik RB4011. I'm running the script on Ubuntu 20.04, and followed this guide for the installation.
For example, when doing curl localhost:9436/metrics
, only some stuff is displayed, such as some system stats and interfaces tx/rx data.
This is my yaml file:
devices:
- name: Mikrotik
address: 10.0.10.1
user: prometheus
password: xxxxxxxxxxxxx
features:
bgp: true
dhcp: true
dhcpv6: true
dhcpl: true
routes: true
pools: true
optics: true
ipsec: true
Are you getting an error message reported by the exporter?
Same problem with my configuration . DHCP leases is empty . No errors
What device and OS version? Building from master
I get :
# TYPE mikrotik_dhcp_leases_active_count gauge
mikrotik_dhcp_leases_active_count{address="x.x.x.x",name="router",server="default"} 72
mikrotik_dhcp_leases_active_count{address="x.x.x.x",name="router",server="dhcp1"} 0
when I curl against it.
Do you have IPV6 configured and running? If not and you turn off dhcpv6 to false does it work?
I have the same problem
curl 10.240.43.56:9436/metrics | grep uptime
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 22162 100 22162 0 0 569k 0 --:--:-- --:--:-- --:--:-- 584k
# HELP mikrotik_system_uptime uptime
# TYPE mikrotik_system_uptime counter
mikrotik_system_uptime{address="10.240.43.1",boardname="RB1100AHx4",name="MikroTik",version="6.49 (stable)"} 2.155016e+06
curl 10.240.43.56:9436/metrics | grep dhcp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 22163 100 22163 0 0 636k 0 --:--:-- --:--:-- --:--:-- 636k
Same here CRS305 V6.49.2