swoga / mikrotik-exporter Goto Github PK
View Code? Open in Web Editor NEWPrometheus Exporter for MikroTik RouterOS
License: Apache License 2.0
Prometheus Exporter for MikroTik RouterOS
License: Apache License 2.0
2023-11-27T08:29:30-08:00 ERR failed to parse datetime error="parsing time \"2023-11-27 06:59:42\": month out of range" command_no=1 connection_no=1 metric_name=last_link_up module=interface request_no=201 sentence_no=12 target=hex1.lmk word="2023-11-27 06:59:42"
Hello
i was working on the installation of the exporter for SNMP services, all works fine !
But is that any way to me prometheus compliant ?
Url format /probe?target=xxx
generate failure on the config need to create a proxy rewrite rules to make it works..
Can the route /metrics
can expose all data of all the snmp monitored system ? OR JUST changing the URL path to remove the parameter system and replace by /probe/TARGET_NAME
?
tanks you
Hello,
I've been struggling for a couple of days now for getting a sensible result from single-value Mikrotik API requests.
For example, this one:
/ip/dhcp-server/lease/print
=active=
=count-only=
?server=LAN-8-floor
<<< /ip/dhcp-server/lease/print
<<< =active=
<<< =count-only=
<<< ?server=LAN-8-floor
<<<
>>> !done
>>> =ret=7
>>>
As we can see in this example API returns an unnamed/anonymous object that doesn't fall into re={โฆ}
response:
{ret: 7}
In the debug session we see no response to such requests.
The immediate trace reply is:
TRC response channel closed
My configuration is as follows:
modules:
- name: testx
commands:
- command: |-
/ip/dhcp-server/lease/print
?server=LAN-8-floor
=active=
=count-only=
metrics:
- metric_name: dhcp_entries
param_name: ret
param_type: int
metric_type: gauge
labels:
- param_name: source
param_type: string
value: dhcp
So, is it possible somehow to get this value?
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
Dockerfile
.github/workflows/build.yml
actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
actions/cache v4
actions/setup-go v5
actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
actions/cache v4
actions/setup-go v5
actions/upload-artifact v4
softprops/action-gh-release v2
actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
actions/download-artifact v4
docker/setup-buildx-action v3
docker/login-action v3
docker/login-action v3
docker/login-action v3
go.mod
go 1.22.2
github.com/goccy/go-yaml v1.11.3
github.com/prometheus/client_golang v1.19.0
github.com/prometheus/common v0.53.0
github.com/rs/zerolog v1.32.0
github.com/swoga/go-routeros v1.1.0
go.uber.org/atomic v1.11.0
Hell, newes firmware have changes to time now i get this error
ERR failed to parse datetime error="parsing time "2023-06-26 00:32:53" as "Jan/02/2006 15:04:05": cannot parse "2023-06-26 00:32:53" as "Jan"" command_no=1 connection_no=0 metric_name=last_link_up module=interface request_no=6 sentence_no=0 target=test word="2023-06-26 00:32:53"
currently a command times out when a trap is returned from the device
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.