Python Prometheus client to RouterBoard devices produced by MikroTik.
Project description
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
[my_second_router]
host = 192.168.1.2
username = login
password = password
plaintext_login = True
[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 None
Start routeros-prometheus-client
routeros-prometheus-client -c routeros-prometheus-client\config.ini -p 8000
-c
--config
path toconfig.ini
-p
--port
HTTPServer port
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for RouterOS-Prometheus-client-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e94ce0a7616ddcb41a9831854e2b1b25a053ef4013bf1a26fe3661fba7e1dfc |
|
MD5 | 913e882075dae8394d1aa790a1b8356b |
|
BLAKE2b-256 | 3972be6c3d66b2aa79aa1593ee8230a1c1f0d700475b5f7dd21e1196d728b32f |