Skip to content

container = True in mktxp.conf does not export any container metrics (RouterOS 7.x with running containers) #320

@suhrke

Description

@suhrke

Description
I'm trying to monitor containers running on a MikroTik RouterOS device using MKTXP. The connection to the router works fine, and other metrics (interface, health, resource, etc.) are exported successfully. However, setting container = True in mktxp.conf does not produce any container-related metrics in the Prometheus exporter output.

Expected behavior
Container metrics (like container_status, container_health, container_uptime_seconds, or at least container_info) should appear in the /metrics endpoint when container = True is set.

Actual behavior
No container-related metrics appear at all. The /metrics endpoint only shows Python process metrics and other router metrics (interfaces, health, etc.), but nothing related to containers.

Steps to reproduce
Create a mktxp.conf with:

ini
[RB5009]
enabled = True
hostname = 192.168.32.1
username = mktxp
password = "your_password"
port = 8728
container = True
Run MKTXP (as Docker container or local install)

Check curl http://localhost:49090/metrics | grep container

Configuration
mktxp.conf:

ini
[RB5009]
enabled = True
hostname = 192.168.32.1
username = mktxp
password = "your_password"
port = 8728
use_ssl = False
plaintext_login = True
container = True
health = True
interface = True
resource = True
poe = False

[default]
container = True
health = True
interface = True
resource = True
poe = False
_mktxp.conf: (default/unchanged)

Environment
MKTXP version: latest (Docker image ghcr.io/akpw/mktxp:latest, pulled 2026-05-28)

Docker image digest: sha256:bd6f22f7db0a79557c4af8a73aa22517f4c32d54fafa19fb0de29e7332440613

RouterOS version:
7.22.3 (stable)

Router model: RB5009

Containers running on router: Yes, multiple containers (uptime-kuma, caddy, adguard, gatus, cloudflared) – all running and healthy

MKTXP connection to router: Successful (logs show "Connection to router RB5009@192.168.32.1 has been established")

Additional context
The API user has api and read permissions (group mktxp_group)

The API service is enabled on port 8728 and accessible from the MKTXP host

Other metrics (interface, health, resource) are exported correctly

Running mktxp print -en RB5009 does not show a flag for containers (the print --help output only lists -cc for CAPsMAN, -wc for WiFi clients, -dc for DHCP clients, etc. – no container flag)

The container = True option is mentioned in some configuration examples, but it's unclear if it's actually implemented

Question
Is container = True actually implemented in the current MKTXP version? If yes, are there any additional prerequisites or configuration steps needed to enable container metrics? If not, are there plans to add support for RouterOS container monitoring?

Logs
text
2026-05-28 02:50:48 Connection to router RB5009@192.168.32.1 has been established
Error getting PoE info from router RB5009@192.168.32.1: ('Error "no such command prefix" executing command b'/interface/ethernet/poe/print .tag=24'', b'no such command prefix')
... (repeated for other ports)
(PoE errors are expected, as PoE is not used; they don't affect other metrics)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions