mktxp

by obeone

Helm chartv1.1.10App latestVerified publisher

Mikrotik (RouterOS) exporter for Prometheus metics

About this chart

mktxp

Mikrotik (RouterOS) exporter for Prometheus metics

TL;DR

helm repo add obeone https://charts.obeone.cloud
helm repo update
helm install mktxp obeone/mktxp

About

MKTXP is a Prometheus exporter for MikroTik RouterOS devices. It collects metrics from one or several routers (interfaces, wireless, CAPsMAN, DHCP, firewall, system health, ...) and pairs nicely with its companion Grafana dashboard.

Prerequisites

  • Helm 3
  • A Kubernetes cluster matching the chart's kubeVersion constraint (see Chart.yaml)

Configuration

This chart is built on the k8s-at-home common library (v4). Most configuration keys (image, env, service, ingress, persistence, ...) follow its schema, so the library supports more than what is spelled out in values.yaml.

Defaults are meant to work out of the box on any cluster. The full list of options lives in values.yaml, is validated by values.schema.json at install time, and is documented in the Values section below. Override it with your own values file:

helm install mktxp obeone/mktxp -f my-values.yaml

Declaring routers

Routers to monitor are declared in the bundled ConfigMap:

configmap:
  config:
    enabled: true
    data:
      mktxp.conf: |
        [my-router]
            hostname = 192.0.2.1
            username = mktxp
            password = change-me

See the upstream documentation for the RouterOS side of the setup (dedicated read-only user, API access).

Prometheus integration

With metrics.enabled set (the default), the chart creates a ServiceMonitor for the Prometheus Operator; scrape interval and labels are tunable under metrics.serviceMonitor.

Upgrading

helm repo update
helm upgrade mktxp obeone/mktxp

Each release lists its changes in the Artifact Hub changelog; give it a look before jumping across several chart versions.

Uninstalling

helm uninstall mktxp

PersistentVolumeClaims created by the chart are kept around: delete them manually if you also want the data gone.

Requirements

Kubernetes: >=1.16.0-0

RepositoryNameVersion
https://library-charts.k8s-at-home.comcommon4.5.2

Values

KeyTypeDefaultDescription
configmap.config.data."_mktxp.conf"string"[MKTXP]\n port = 49090\n socket_timeout = 2\n\n initial_delay_on_failure = 120\n max_delay_on_failure = 900\n delay_inc_div = 5\n\n bandwidth = True # Turns metrics bandwidth metrics collection on / off\n bandwidth_test_interval = 3600 # Interval for colllecting bandwidth metrics\n minimal_collect_interval = 5 # Minimal metric collection interval\n\n verbose_mode = True # Set it on for troubleshooting\n\n fetch_routers_in_parallel = False # Set to True if you want to fetch multiple routers parallel\n max_worker_threads = 5 # Max number of worker threads that can fetch routers (parallel fetch only)\n max_scrape_duration = 10 # Max duration of individual routers' metrics collection (parallel fetch only)\n total_max_scrape_duration = 30 # Max overall duration of all metrics collection (parallel fetch only)\n\n # Required since mktxp 1.2.x: the auto-migration on first boot\n # writes this key; if the running user cannot write _mktxp.conf\n # the migration silently fails and mktxp then crashes with\n # KeyError: 'compact_default_conf_values' at startup.\n compact_default_conf_values = False\n"
configmap.config.data."mktxp.conf"string"## Copyright (c) 2020 Arseniy Kuznetsov\n##\n## This program is free software; you can redistribute it and/or\n## modify it under the terms of the GNU General Public License\n## as published by the Free Software Foundation; either version 2\n## of the License, or (at your option) any later version.\n##\n## This program is distributed in the hope that it will be useful,\n## but WITHOUT ANY WARRANTY; without even the implied warranty of\n## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n## GNU General Public License for more details.\n\n\n[Sample-Router]\n enabled = False # turns metrics collection for this RouterOS device on / off\n\n hostname = localhost # RouterOS IP address\n port = 8728 # RouterOS IP Port\n\n username = username # RouterOS user, needs to have 'read' and 'api' permissions\n password = password\n\n use_ssl = False # enables connection via API-SSL servis\n no_ssl_certificate = False # enables API_SSL connect without router SSL certificate\n ssl_certificate_verify = False # turns SSL certificate verification on / off\n\n installed_packages = True # Installed packages\n dhcp = True # DHCP general metrics\n dhcp_lease = True # DHCP lease metrics\n\n connections = True # IP connections metrics\n connection_stats = False # Open IP connections metrics\n\n pool = True # Pool metrics\n interface = True # Interfaces traffic metrics\n\n firewall = True # IPv4 Firewall rules traffic metrics\n ipv6_firewall = False # IPv6 Firewall rules traffic metrics\n ipv6_neighbor = False # Reachable IPv6 Neighbors\n\n poe = True # POE metrics\n monitor = True # Interface monitor metrics\n netwatch = True # Netwatch metrics\n public_ip = True # Public IP metrics\n route = True # Routes metrics\n wireless = True # WLAN general metrics\n wireless_clients = True # WLAN clients metrics\n capsman = True # CAPsMAN general metrics\n capsman_clients = True # CAPsMAN clients metrics\n\n user = True # Active Users metrics\n queue = True # Queues metrics\n\n remote_dhcp_entry = None # An MKTXP entry for remote DHCP info resolution (capsman/wireless)\n\n use_comments_over_names = True # when available, forces using comments over the interfaces names\n\n check_for_updates = False # check for available ROS updates\n"
configmap.config.enabledbooltrue
envobjectSee belowenvironment variables. See more environment variables in the cyberchef documentation.
env.TZstring"UTC"Set the container timezone
image.pullPolicystring"IfNotPresent"image pull policy
image.repositorystring"ghcr.io/akpw/mktxp"image repository
image.tagstringchart.appVersionimage tag
ingress.main.enabledboolfalse
metricsobject{"enabled":true,"serviceMonitor":{"interval":"30s","labels":{},"scrapeTimeout":"20s"}}ServiceMonitor to tell to prometheus to scrape metrics
persistenceobjectSee values.yamlConfigure persistence settings for the chart under this key. (none required for this chart)
serviceobjectSee values.yamlConfigures service settings for the chart.

Verifying the chart signature

Charts in this repository are signed with GPG and every release ships a provenance file. The public key is available at charts.obeone.cloud/public_key.gpg, fingerprint B9FE852F28888D27F8C9A11CD33E04CD22E335CE.

# Import the signing key into a legacy keyring (helm verifies with GnuPG v1 keyrings)
curl -fsSL https://charts.obeone.cloud/public_key.gpg | gpg --import
gpg --export > ~/.gnupg/pubring.gpg

# Pull the chart and check it against its provenance file
helm pull --verify obeone/mktxp

Support

This is a personal chart repository, maintained on a best-effort basis. Bug reports and contributions are welcome on GitHub.


Autogenerated from chart metadata using helm-docs v1.14.2

Deploy mktxp with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mktxp on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmktxp is pinned at v1.1.10 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply