mirror of
https://github.com/M0r13n/mikrotik_monitoring.git
synced 2025-12-06 01:59:30 +00:00
adds note about permissions errors
This commit is contained in:
parent
94463b4944
commit
4cefd2b7b2
4 changed files with 58 additions and 27 deletions
18
README.md
18
README.md
|
|
@ -165,3 +165,21 @@ I find them very hard to read.
|
|||
In addition, the API offers a lot of flexibility.
|
||||
Any command can be executed on RouterOS via the API.
|
||||
Thus it is possible to collect complex metrics.
|
||||
|
||||
### I get a PermissionError when running docker-compose up
|
||||
|
||||
When bind-mounting a directory from the host into a container, files and directories
|
||||
maintain the permissions they **have on the host**. These can not be changed by Docker.
|
||||
Typically, a bind-mounted directory has permissions like these: `rwxrwxr-x`.
|
||||
This means that the container can read from the bind-mounted directory. But it can not
|
||||
write or modify the mounted files.
|
||||
|
||||
This mostly works fine. But the Prometheus exporter mktxp has a specialty:
|
||||
It may update it's configuration if some keys are missing from the configuration file.
|
||||
Imagine, that the key `ipv6_firewall` is missing from the **mktxp.conf**. In this case
|
||||
mktxp will add `ipv6_firewall=false` to the configuration file instead of failing.
|
||||
This is a helpful feature, but can cause the container to crash, if the user inside
|
||||
the container lacks write permissions.
|
||||
|
||||
In order to resolve this issue, make sure that all keys that mktxp currently supports
|
||||
are listed in your **mktxp.conf** file.
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ services:
|
|||
mktxp:
|
||||
# https://github.com/M0r13n/mikrotik_monitoring
|
||||
# Note: You might need to build the image yourself if not on AMD64 or ARM-v7/V8
|
||||
image: leonmorten/mktxp:latest
|
||||
image: mktxp:latest
|
||||
volumes:
|
||||
# Since Version v0.37 mktxp runs as single user
|
||||
# Prior it was root
|
||||
|
|
@ -66,7 +66,7 @@ services:
|
|||
- ./nginx/nginx-selfsigned.crt:/etc/nginx/ssl/nginx-selfsigned.crt
|
||||
- ./nginx/self-signed.conf:/etc/nginx/ssl/self-signed.conf
|
||||
ports:
|
||||
- 80:80
|
||||
- 80:80 # You may adjust to some unprivileged ports
|
||||
- 443:443
|
||||
networks:
|
||||
- default
|
||||
|
|
|
|||
|
|
@ -19,5 +19,7 @@
|
|||
max_delay_on_failure = 900
|
||||
delay_inc_div = 5
|
||||
|
||||
bandwidth = True # Turns metrics bandwidth metrics collection on / off
|
||||
bandwidth_test_interval = 420 # Interval for colllecting bandwidth metrics
|
||||
bandwidth = True # Turns metrics bandwidth metrics collection on / off
|
||||
bandwidth_test_interval = 420 # Interval for colllecting bandwidth metrics
|
||||
|
||||
verbose_mode = False # Set it on for troubleshooting
|
||||
|
|
|
|||
|
|
@ -11,26 +11,37 @@
|
|||
## GNU General Public License for more details.
|
||||
|
||||
|
||||
[Chateau] # Change to your Router
|
||||
capsman_clients = True
|
||||
firewall = True
|
||||
wireless_clients = True
|
||||
use_ssl = False
|
||||
pool = True
|
||||
wireless = True
|
||||
monitor = True
|
||||
capsman = True
|
||||
netwatch = True
|
||||
ssl_certificate_verify = False
|
||||
enabled = True
|
||||
use_comments_over_names = True
|
||||
no_ssl_certificate = False
|
||||
dhcp_lease = True
|
||||
dhcp = True
|
||||
route = True
|
||||
interface = True
|
||||
poe = False # Enable for PoE stats
|
||||
hostname = 192.168.0.1 # Change to your IP
|
||||
username = prometheus # Change to your Mikrotik user
|
||||
password = Mascha33 # Change to your Mikrotik password
|
||||
port = 8728 # Default Port for Mikrotik API
|
||||
[Sample-Router]
|
||||
enabled = False # turns metrics collection for this RouterOS device on / off
|
||||
|
||||
hostname = localhost # RouterOS IP address
|
||||
port = 8728 # RouterOS IP Port
|
||||
|
||||
username = username # RouterOS user, needs to have 'read' and 'api' permissions
|
||||
password = password
|
||||
|
||||
use_ssl = False # enables connection via API-SSL servis
|
||||
no_ssl_certificate = False # enables API_SSL connect without router SSL certificate
|
||||
ssl_certificate_verify = False # turns SSL certificate verification on / off
|
||||
|
||||
installed_packages = True # Installed packages
|
||||
dhcp = True # DHCP general metrics
|
||||
dhcp_lease = True # DHCP lease metrics
|
||||
connections = True # IP connections metrics
|
||||
pool = True # Pool metrics
|
||||
interface = True # Interfaces traffic metrics
|
||||
|
||||
firewall = True # IPv4 Firewall rules traffic metrics
|
||||
ipv6_firewall = False # IPv6 Firewall rules traffic metrics
|
||||
ipv6_neighbor = False # Reachable IPv6 Neighbors
|
||||
|
||||
monitor = True # Interface monitor metrics
|
||||
poe = True # POE metrics
|
||||
public_ip = True # Public IP metrics
|
||||
route = True # Routes metrics
|
||||
wireless = True # WLAN general metrics
|
||||
wireless_clients = True # WLAN clients metrics
|
||||
capsman = True # CAPsMAN general metrics
|
||||
capsman_clients = True # CAPsMAN clients metrics
|
||||
|
||||
use_comments_over_names = True # when available, forces using comments over the interfaces names
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue