RouterOS Prometheus client
Description
Prometheus client for Mikrotik devices. Can be configured to collect metrics from a single device or multiple devices.
To access the api, use RouterOS-api.
To create metrics, use Prometheus Python Client.
Install
pip install routeros-prometheus-client
Usage
Mikrotik Config
Create a user on the device that has API and read-only access.
/user group add name=prometheus policy=api,read,winbox
Create the user to access the API via.
/user add name=prometheus group=prometheus password=changeme
Create config file
[my_router]
host = 192.168.1.1
username = login
password = password
plaintext_login = True
interface = True
wireless = False
caps_man = True
l2tp = True
gre = True
[my_second_router]
host = 192.168.1.2
username = login
password = password
plaintext_login = True
interface = True
wireless = True
caps_man = False
l2tp = False
gre = False
[section]- String - Used for identification devicehost- String - Hostname or IP of deviceusername- String - Login username - Default 'admin'password- String - Login password - Default empty stringport- Integer - TCP Port for API - Default 8728 or 8729 when using SSLplaintext_login- Boolean - Try plaintext login (for RouterOS 6.43 onwards) - Default Falseuse_ssl- Boolean - Use SSL or not? - Default Falsessl_verify- Boolean - Verify the SSL certificate? - Default Truessl_verify_hostname- Boolean - Verify the SSL certificate hostname matches? - Default Truessl_context- Object - Pass in a custom SSL context object. Overrides other options. - Default Noneinterfacewirelesscaps_manl2tpgre- What metrics to collect
Start routeros-prometheus-client
routeros-prometheus-client -c routeros-prometheus-client\config.ini -p 8000
-c--configpath toconfig.ini-p--portHTTPServer port
Metadata
Release files for RouterOS-Prometheus-client 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| RouterOS-Prometheus-client-0.0.7.tar.gz | 4.9 kB | Without provenance | Details for RouterOS-Prometheus-client-0.0.7.tar.gz |
Release files / RouterOS-Prometheus-client-0.0.7.tar.gz
| Download URL | RouterOS-Prometheus-client-0.0.7.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df7829aa33cac2831151407fa4a7a790a250cce361fec7efd566e39bc02e0b41
|
|
BLAKE2b-256 checksum How to use checksums |
e484ce693b18bbb3a4aa7e59e1a19636d95be27e48f1eb95f581f42798f8fa33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
|
Security for RouterOS-Prometheus-client 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.