{"id":13397138,"url":"https://github.com/nshttpd/mikrotik-exporter","last_synced_at":"2026-01-12T07:46:40.694Z","repository":{"id":39613654,"uuid":"102426702","full_name":"nshttpd/mikrotik-exporter","owner":"nshttpd","description":"prometheus mikrotik device(s) exporter","archived":false,"fork":false,"pushed_at":"2024-06-25T13:45:25.000Z","size":3751,"stargazers_count":545,"open_issues_count":51,"forks_count":151,"subscribers_count":22,"default_branch":"trunk","last_synced_at":"2024-07-31T18:19:04.161Z","etag":null,"topics":["golang","mikrotik","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nshttpd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-05T02:56:11.000Z","updated_at":"2024-07-29T13:35:02.000Z","dependencies_parsed_at":"2024-01-15T22:43:00.351Z","dependency_job_id":"53dbf559-1ff0-40c0-8114-ca245ae9d818","html_url":"https://github.com/nshttpd/mikrotik-exporter","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nshttpd%2Fmikrotik-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nshttpd%2Fmikrotik-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nshttpd%2Fmikrotik-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nshttpd%2Fmikrotik-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nshttpd","download_url":"https://codeload.github.com/nshttpd/mikrotik-exporter/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243500245,"owners_count":20300761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","mikrotik","prometheus","prometheus-exporter"],"created_at":"2024-07-30T18:01:11.662Z","updated_at":"2026-01-12T07:46:40.689Z","avatar_url":"https://github.com/nshttpd.png","language":"Go","funding_links":[],"categories":["Go","Monitoring"],"sub_categories":[],"readme":"[![Docker Pulls](https://img.shields.io/docker/pulls/nshttpd/mikrotik-exporter.svg)](https://hub.docker.com/r/nshttpd/mikrotik-exporter/)\n\n## prometheus-mikrotik\n\ntl;dr - prometheus exporter for mikrotik devices\n\nThis is still a work in progress .. consider `master` at the moment as a preview\nrelease.\n\n#### Description\n\nA Prometheus Exporter for Mikrotik devices. Can be configured to collect metrics\nfrom a single device or multiple devices. Single device monitoring can be configured\nall on the command line. Multiple devices require a configuration file. A user will\nbe required that has read-only access to the device configuration via the API.\n\nCurrently the exporter collects metrics for interfaces and system resources. Others\ncan be added as long as published via the API.\n\n#### Mikrotik Config\n\nCreate a user on the device that has API and read-only access.\n\n`/user group add name=prometheus policy=api,read,winbox`\n\nIf `lte` is enabled it requires also the `test` policy.\n\n`/user group add name=prometheus policy=api,read,winbox,test`\n\nCreate the user to access the API via.\n\n`/user add name=prometheus group=prometheus password=changeme`\n\n#### Single Device\n\n`./mikrotik-exporter -address 10.10.0.1 -device my_router -password changeme -user prometheus`\n\nwhere `address` is the address of your router. `device` is the label name for the device\nin the metrics output to prometheus. The `user` and `password` are the ones you\ncreated for the exporter to use to access the API.\n\nUser and password flags can be set with the `MIKROTIK_USER` and `MIKROTIK_PASSWORD` environment variables, respectively.\n\n```\nMIKROTIK_USER=prometheus\nMIKROTIK_PASSWORD=changeme\n./mikrotik-exporter -address 10.10.0.1 -device my_router\n```\n\n#### Config File\n\n`./mikrotik-exporter -config-file config.yml`\n\nwhere `config-file` is the path to a config file in YAML format.\n\n###### example config\n```yaml\ndevices:\n  - name: my_router\n    address: 10.10.0.1\n    user: prometheus\n    password: changeme\n  - name: my_second_router\n    address: 10.10.0.2\n    port: 8999\n    user: prometheus2\n    password: password_to_second_router\n    wifiwave2: true\n  - name: routers_srv_dns\n    srv:\n      record: _mikrotik._udp.example.com\n    user: prometheus\n    password: password_to_all_dns_routers\n  - name: routers_srv_custom_dns\n    srv:\n      record: _mikrotik2._udp.example.com\n      dns:\n        address: 1.1.1.1\n        port: 53\n    user: prometheus\n    password: password_to_all_dns_routers\n\nfeatures:\n  bgp: true\n  dhcp: true\n  dhcpv6: true\n  dhcpl: true\n  routes: true\n  pools: true\n  optics: true\n  wlanif: true\n  wlansta: true\n```\n\nIf you add a devices with the `srv` parameter instead of `address` the exporter will perform a DNS query\nto obtain the SRV record and discover the devices dynamically. Also, you can specify a DNS server to use\non the query.\n\nUse the option `wifiwave2: true` for devices that have the `wifiwave2` package,\nwhich replaces the `wireless` implementation, installed. This is necessary as `wifiwave2` has a slightly\ndifferent API and exposes a slightly smaller set of attributes (for example, no signal-to-noise, etc.)\n\n\n###### example output\n\n```\nmikrotik_interface_tx_byte{address=\"10.10.0.1\",interface=\"ether2\",name=\"my_router\"} 1.4189902583e+10\nmikrotik_interface_tx_byte{address=\"10.10.0.1\",interface=\"ether3\",name=\"my_router\"} 2.263768666e+09\nmikrotik_interface_tx_byte{address=\"10.10.0.1\",interface=\"ether4\",name=\"my_router\"} 1.6572299e+08\nmikrotik_interface_tx_byte{address=\"10.10.0.1\",interface=\"ether5\",name=\"my_router\"} 1.66711315e+08\nmikrotik_interface_tx_byte{address=\"10.10.0.1\",interface=\"ether6\",name=\"my_router\"} 1.0026481337e+10\nmikrotik_interface_tx_byte{address=\"10.10.0.1\",interface=\"ether7\",name=\"my_router\"} 3.18354425e+08\nmikrotik_interface_tx_byte{address=\"10.10.0.1\",interface=\"ether8\",name=\"my_router\"} 1.86405031e+08\n```\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnshttpd%2Fmikrotik-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnshttpd%2Fmikrotik-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnshttpd%2Fmikrotik-exporter/lists"}