mtmon-admin-center – installation and user manual

Central view of several mtmon installations: all sites, problems, equipment and Wi-Fi clients on one page, with a mail when a site stops reporting.

Version 7.21.0Debian 13 · RHEL 8–10Configuration: /etc/mtmon-admin-center/center.conf

1What mtmon-admin-center is

mtmon-admin-center (the centre below) collects the status of several mtmon installations on one page: all sites, their problems, missing access points, unreachable devices, Wi-Fi clients and events, plus each site's own dashboard with its history.

Devices of a siteCAPsMAN · HP MSM · cnPilotswitches · routers · APsmtmonserver or container with a diskevery check: state → centremtmon-agentMikroTik container, RAM onlysettings and mails via the centreSSH · API · SNMP · pingmtmon-admin-centerall sites in one placehistory · reports · pushagent configurationHTTPS 443HTTPS 443 (outgoing)Mail (SMTP)outages, returns, reportsPhone – MT-Monpush: waits on the centreBrowserdashboard · wall · topologymtmon also mails by itselfthe sites open only outgoing connections
An arrow shows who opens the connection. Phone and browser ask the centre (or mtmon); the sites send to the centre by themselves – no ports to open at the sites.
  • Sites only connect out (HTTPS to the centre). No ports are opened at the sites, it works behind NAT; only port 443 on the centre must be open.
  • If the centre is unreachable, each mtmon keeps its records and sends them later, so the charts have no gaps. On the first contact it also sends its whole history – every level (checks, hours, days) and the events (mtmon 13.13.0+), and again at any time with mtmon --central-resend.
  • Each mtmon keeps mailing its own problems. The centre mails only what a site cannot report itself: that it stopped reporting (server, internet or firewall down).
  • The centre makes backups of everything (config, certificate, users, sites, history, phones) on a schedule by itself; from a backup it is restored or moved to a new server from the web page or with one command (since 7.20.0, Backup and restore).

2Requirements and network

WhatRequirement
SystemDebian 13 (.deb) or RHEL / Rocky / Alma 8–10 (.rpm you build yourself).
Sitesmtmon 9.0 or newer; 10.1 or newer recommended (compressed reports in parts).
IncomingTCP 443 from the addresses of all sites and of the web users.
OutgoingSMTP to the mail server (for mails about sites that stopped reporting).

3Installation

Debian 13

cp mtmon-admin-center_7.21.0_all.deb /tmp/
apt install /tmp/mtmon-admin-center_7.21.0_all.deb

Red Hat, Rocky, Alma

dnf install rpm-build
tar xzf mtmon-admin-center-7.21.0-src.tar.gz && cd mtmon-admin-center-7.21.0
./build-center-rpm.sh          # the package is written next to the source folder
dnf install ../mtmon-admin-center-7.21.0-1.noarch.rpm

What the package does

  • creates the user mtmon-center, the folders /etc/mtmon-admin-center/ and /var/lib/mtmon-admin-center/,
  • creates a self-signed certificate valid 30 years (center.crt / center.key),
  • installs the service mtmon-admin-center.service (not started yet). It listens on 443 without root (CAP_NET_BIND_SERVICE).

First start

  1. In /etc/mtmon-admin-center/center.conf set at least [mail] and one user in [web users] (hash with mtmon-admin-center --hash-password).
  2. Check the config: mtmon-admin-center --check.
  3. Start: systemctl enable --now mtmon-admin-center.
  4. Open port 443 in the server firewall (firewall-cmd --add-service=https --permanent && firewall-cmd --reload or ufw) and in the firewall in front of the centre.
  5. Open https://CENTRE/ and add the sites (Adding a site).

Upgrade and removal

Upgrade: same as installing; center.conf, the certificate and the received data are kept. Nothing changes at the sites.

New settings go into the config by themselves (since 7.4.0): the upgrade adds to center.conf each setting that is new in this version, with its explanation, at the end of its section – commented out, so nothing changes until you set it. Nothing is removed; the version line is updated. The previous file stays as center.conf.bak-OLDVERSION, the new template as center.conf.dist. By hand: mtmon-admin-center --config-upgrade (with -n it only shows what it would add).

apt remove mtmon-admin-center   # keeps config, certificate and data
apt purge mtmon-admin-center    # also removes them

4Configuration – center.conf

The file /etc/mtmon-admin-center/center.conf has the same format as mtmon.conf (comments only on their own line). Permissions: chown root:mtmon-center center.conf && chmod 640 center.conf. The centre reads changes by itself within a few seconds; systemctl reload mtmon-admin-center does it at once.

[general]

KeyDefaultMeaning
titleMT-Mon Admin CenterName on the page and in mails.
data_dir/var/lib/mtmon-admin-centerWhere the site data is stored.
offline_after0Minutes without a report before a site counts as "not reporting". 0 = automatic: 3 × that mtmon's interval + 1 min, at least 10 min.
notify_offlineyesMail when a site stops reporting and when it reports again. Not during a maintenance window of the whole site.
notify_devicesyesMail when a site's mtmon gets a new device, loses one or one is renamed (added to or removed from the mtmon config, or a new access point on a controller). The event and the push to the phones come in any case (7.8.0).
cert_warn_days30,14,7,3,1Mail before the centre's certificate expires.
disk_warn10Free space of the disk with data_dir in percent: below it a mail (and a push to users who see every site), one more when there is enough space again. 0 = off.

[report]

KeyDefaultMeaning
weekly / monthlyyes / yesReport of all sites on Monday (week before) and on the 1st (month before).
time07:00Time of sending.
to–Other recipients than [mail] to. A site's recipients (mail=) get a report of their sites only.

[backup]

Automatic backups of the whole centre (since 7.20.0). Without this section the defaults apply: every day at 03:15, the last 7. All about backups and restoring: Backup and restore.

KeyDefaultMeaning
autodailyoff, daily, weekly or every N hours: 6h, 12h (1h to 720h).
time03:15Time for daily and weekly (HH:MM, local time). Pick a quiet hour – the centre keeps working meanwhile.
weekdaysunDay for weekly: mon, tue, wed, thu, fri, sat, sun.
keep7How many automatic backups stay; older ones are deleted. Backups made by hand, from the command line or uploaded stay until you delete them; of the copies made before a restore the last 3 stay.
dir/var/lib/mtmon-admin-center/backupsFolder for the backups (absolute path, not data_dir itself). A folder outside /var/lib/mtmon-admin-center needs a permission to write under systemd – see Backups on another disk.
mailyesA mail to [mail] to when an automatic backup fails (with the reason).

[mail]

Same as in mtmon: method, smtp_host, smtp_port, starttls, ssl, ssl_verify, smtp_user, smtp_password, from, to, subject_prefix.

[web]

KeyDefaultMeaning
listen / port0.0.0.0 / 443Address and port.
allow–Networks that may open the web pages (empty = everyone). Site reports are accepted from anywhere, but only with a valid key.
tlsyesHTTPS.
cert_file / key_file/etc/mtmon-admin-center/center.crt / .keyCertificate (PEM, chain after the certificate, readable by user mtmon-center).
session_hours12How long a sign-in is valid.
refresh30Seconds between page updates.
history_days30History of every report per site.
history_hourly_days400Hourly history; daily is kept forever.
max_per_ip24Most open connections at the same time from one address (64 in total). Offices behind one NAT address share it.

[web users]

[web users]
boris  = {PBKDF2}50000$...$...
ana    = {PBKDF2}50000$...$...  role=operator
servis = {PBKDF2}50000$...$...  role=summary  sites=hotel-delfin,kongres
RoleSeesMayBackup
full (default)everything (within sites= / groups=)maintenance windows, Wi-Fi client lists, the Server page, agent configurationsyes – if it sees every site
operatorthe same as fullthe same as fullno (7.20.0)
summarynumbers and charts, without the Wi-Fi client list (names, MAC, IP)only lookno
  • role=operator (since 7.20.0) is for colleagues who work with the network as full does, but have no access to the backups – a backup holds every password and key of the centre. So only the administrator of the centre has backups; see Who may work with backups.
  • groups= limits the user to the sites of the listed groups. !name leaves a site or group out: sites=!test,!lab sees all but these two, groups=Obala sites=!koper the group without Koper (7.9.3).
  • Only users with role=full or role=operator may set maintenance windows.
  • sites= limits the user to the listed sites (e.g. an external service company). Without it they see all.
  • Without users the pages are open to everyone in allow – set at least one.
  • After 5 wrong attempts for one user name from one address, that name is locked from that address for 5 minutes; others behind the same address (an office behind NAT) can still sign in. Wrong passwords given to the API count the same.

[api keys]

Keys for apps and scripts (read-only): name = {SHA256}… [role=full|operator|summary] [sites=…] [allow=networks]. Created by mtmon-admin-center --new-api-key NAME. A key with role=full and no sites= can download backups (copies off the server); limit it with allow= to the address of the server that fetches them.

[sites]

Sites that may report: site-id = {SHA256}key-hash. Only a hash of the key is stored. Do not write these lines by hand – --add-site adds them.

After the hash a site may have a group and recipients (you may add or change these by hand):

[sites]
hotel-delfin = {SHA256}...  group="Slovenska obala"  mail=it@delfin.si  lat=45.548 lon=13.730
kongres      = {SHA256}...  group=Ljubljana
  • group= – the group picker in the top bar filters every page; a value with spaces in quotes.
  • lat= lon= – where the site is (degrees), for the globe of the wall view; without them the sites are drawn around the centre of Slovenia.
  • mail= – these addresses also get the mails about this site (not reporting, reports), with their sites only.

5Adding a site

On the centre

mtmon-admin-center --add-site hotel-delfin

The site ID is a short name (letters, digits, -, _). The command adds the line to [sites] and prints the block for that mtmon. The key is shown only this once. The centre accepts the new site by itself within a few seconds; no reload needed.

[central]
enabled     = yes
url         = https://center.example.com/
key         = hotel-delfin.4E9cYp9ok3VKoxlyaudlItIWYIMUZHr7TN0OV2OWSeo
fingerprint = sha256$5f0c...

On the site's mtmon

  1. Put the block into /etc/mtmon/mtmon.conf in place of the existing [central].
  2. Set url to the name or IP the site uses to reach the centre.
  3. If the centre has a purchased certificate, leave out the fingerprint line.
  4. systemctl reload mtmon && mtmon --test-central – it must end with OK.
  5. On the centre: mtmon-admin-center --list-sites shows the site as online.

Lost key, removing a site

  • Lost key: delete the site's line in [sites], run --add-site again with the same ID and give the mtmon the new key. History stays.
  • Removal: delete the line in [sites] – the centre no longer accepts the site. Its data stays in /var/lib/mtmon-admin-center/sites/ID/; delete that folder to remove it completely.

Agents (mtmon without a disk)

Since 7.13.0: a site with mtmon --agent (the mtmon-agent container on a MikroTik without a disk) has its configuration on the centre, the centre sends its mails and keeps its state for a restart.

  • mtmon-admin-center --add-site NAME --agent [--mail ...] creates the site and the agent configuration from a template (sites/NAME/agent.conf in the data folder) and prints the container's variables (MTMON_CENTRAL, MTMON_KEY, MTMON_FINGERPRINT) with the RouterOS commands. The key is shown only then.
  • Editing (users with role full): Sites → the agent link next to the mtmon version (or Agent config on the site card) opens /site/NAME/agent. Save; the page shows whether the agent runs the saved configuration and, if it refused it, the error with the line. Saving over a change someone else made meanwhile is refused. The previous version stays as agent.conf.prev.
  • mtmon-admin-center --agent-config NAME prints the file's path (creates it when missing) and whether the agent runs it.
  • The agent's mails go to [mail] to of the agent configuration, else mail= of the site, else the centre's [mail] to – each once; a failed one again with the next report.
mtmon-agentMikroTik containerRAM disk (tmpfs)MTMON_CENTRAL · MTMON_KEYmtmon-admin-centersites/ID/agent.confsites/ID/agent-backup.jsonsends mails and reportsat start: GET /api/v1/agent/backup (state)GET /api/v1/agent/config (when it changed)every check: POST /api/v1/ingest – state, events, mails, a copy of the stateanswer: md5 of the configuration, mails sent, "state kept"SMTPRouter: CAPsMAN, switchesAPI · SNMP · ping
The agent opens every connection. After a reboot of the router it takes its state back and carries on as if nothing happened.
File (in the site's folder)Content
agent.confThe agent's configuration (the same settings as mtmon.conf), 0600 – holds passwords.
agent.conf.prevThe version before the last change.
agent-backup.jsonThe agent's state for a restart (state, maintenance, topology, inventory …).
agent-mails.jsonIDs of the agent's mails sent (every mail only once).

A new agent step by step

  1. On the centre: mtmon-admin-center --add-site NAME --agent --mail noc@company.com – note the printed variables (the key is shown only once).
  2. On the centre open Sites → agent at that site and enter the CAPsMAN (host = 172.17.0.1, method = api, a read-only user) and the switches. Save.
  3. On the MikroTik: the container package, device-mode, veth, RAM disk, the variables and the start script – the commands are in the README of the container images (section mtmon-agent).
  4. Within a minute the agent's page shows "The agent runs this configuration", the site is in the Sites table. If it shows an error, it names the line of the configuration.

6Certificate

Self-signed (default): every mtmon pins it in [central] fingerprint – it accepts exactly this certificate. mtmon-admin-center --fingerprint prints the fingerprint again.

Purchased certificate (e.g. a wildcard):

  1. Copy the certificate (PEM, intermediate chain after the certificate) and key to /etc/mtmon-admin-center/, owner mtmon-center, key chmod 600.
  2. Set cert_file and key_file in [web], then systemctl reload mtmon-admin-center.
  3. On every mtmon remove the fingerprint line from [central] and reload. Until then the mtmon rejects the new certificate, but keeps its records and sends them later.
openssl x509 -in /etc/mtmon-admin-center/center.crt -noout -subject -enddate
echo | openssl s_client -connect center.example.com:443 2>/dev/null | openssl x509 -noout -subject

7Web interface

https://CENTRE/. The menu on the left opens the pages (also as links /#/topology, /#/wifi …):

PageContent
DashboardA line with the state of all sites (number of sites, newest report), key figures with trends, topology on a map, Wi-Fi chart, Wi-Fi by site, alerts, equipment health, sites, events.
TopologyEvery site with its controllers and device groups; under them every access point and device with IP, model and downtime. "Only what is down" shows only problems.
Site topologySince 7.12.0: the Topology link on a site card (and the Open the topology button on the site's page) opens /site/ID/topology in a new tab: the site's network port to port, with speeds, VLANs along the path (choose a VLAN at the top: solid blue = carried, red dotted = it stops here, amber = tagged/untagged do not match, dashed blue = the other end unknown; in detail: The topology page and Is a VLAN carried along the whole path?), neighbours mtmon does not monitor, and a panel with a device's uplink, downlinks and ports. It is drawn from what mtmon reports to the centre, so it works also when that mtmon's web is not running.
Wi-Fi clientsClients now, peak and average in the period, chart per site or all together, SSIDs across all sites, every site per controller and SSID. The Report button opens the owner report of all sites (month, year or from – to, comparison with the period before, calendar, daily rhythm, weekly pattern, networks and sites as donuts, access points optional; print / PDF, Slovenian or English). It follows the chosen group. The same report for one site is on the site page (Report button). A click on the chart leads to the Wi-Fi page. The Find a Wi-Fi client panel (7.7.0, full role) finds a client by MAC, IP, name, user or network on every site and shows its site, access point, network, VLAN, band and signal.
DevicesEvery device of every site in one table (7.7.0): controllers, access points, switches and mtmon servers with their state now (online, missing, not responding, warning, maintenance and how long it is left). The details column per type: an AP's ethernet speed, clients and VLANs; a switch's ports, PoE, temperature, uptime, port alerts and SNMP errors; a controller's access points; an mtmon's memory, CPU and free disk. A click on a row opens the full details of the device in place, as on the site's page. Filters by type and state; the search on top finds names, IPs, MACs, models and sites.
PushThe signed-in user's phones with the MT-Mon app and what each gets (7.9.0): a switch per kind of notification - outages and returns of access points, switches, controllers, sites, disk, maintenance (set by someone else, optionally your own too), devices added/removed, unstable devices, switch ports, restarts, certificates. A change counts at once. Role full without a site limit sees every phone.
AlertsOpen problems: Critical (site not reporting, controller down), Warning (access point missing, device down), Muted.
SitesAll sites with state, last report, equipment, Wi-Fi, problems and mtmon version; click a column to sort. Sites with an older mtmon than the current one (the one the centre is built with, or a newer one a site already runs) are marked "update to …".
EventsEvents per day (chart) and the list; filter by site, period and kind.
MaintenanceMaintenance windows of all sites; a new window for any site (whole site or a device), end early. The window waits in the centre until the mtmon takes it with its next report and confirms it ("waiting for mtmon").
InventoryModels, serial numbers and versions of the equipment of all sites; filter by kind and version mismatch, CSV download.
Equipment by modelSince 7.5.0, in Inventory: how many devices of each model the sites have, their kind, the sites with the most of them and the firmware versions (versions other than the most common one in yellow). The kind buttons, the group and the search apply. A click on a model shows its devices in the list below, the × next to the model all again.
Click on a deviceSince 7.5.0: a click on a device in the inventory, the alerts, the events, the topology or on a device's square in the sites table opens its details right there, under the row, as on the site's page: for a switch with SNMP its description, name, PoE, temperature and ports with state, speed and VLANs; for an access point its address, model, version, controller, number of Wi-Fi clients and (from mtmon 13.4.0) its ports with VLANs; for a controller its access points (a click on one shows it). Another click closes them. The data is from the site's last report. A click on a site's name (or Site dashboard) opens the site's page in its own tab, so the centre stays open; another click on the same site uses the same tab.
Wall viewWall screen for a TV or NOC monitor (/wall, opens in a new tab): sites, state, alerts and Wi-Fi clients around a picture drawn from the data – Orbit (the planet in the middle, every site its own circle on an orbit around it, joined to its place on the planet), Orbit Arctic (the same in light ice colours), Hive (every site a honeycomb, its Wi-Fi clients in the middle and around it one cell per device in the colour of its state – green access point, petrol switch / device, dark with a dot controller, red only a device that is down, grey unknown), Hive Night (the same honeycomb in Orbit's dark colours – for the night, less glare) or Matrix (terminal with the event log). The bar on top (theme, group, full screen – also key F) hides after a few seconds; the address keeps the choice, e.g. /wall?t=orbit&group=Obala. Refreshed every 30 s; devices of a site that does not report count as unknown. Click a site or a device (circle, honeycomb, cell, block, row, alert) for a panel with everything about it: Wi-Fi clients now, peak and the last 24 hours, networks, controllers, access points and devices with their state (click a device for its details: for switches with SNMP the system, uptime, PoE, temperature, uplinks and every port with speed, errors and VLANs), problems, outages in 24 hours, equipment by model, events, maintenance, mtmon version and links to the site page and its reports. The wall slides to the left to make room, so the panel covers nothing. Esc or a click elsewhere closes it; it closes by itself after 90 seconds.
Push notificationsThe MT-Mon app for Android (1.2.0 or newer) shows a notification on the phone when an access point, a device, a controller or a site goes down and when it is back (not during maintenance). In the app, signed in to the centre: page menu → Notifications on this phone. The phone waits on a connection to the centre, so a notification arrives within seconds; no Google services are needed. The phone sees the sites of the user who turned the notifications on. The phones: mtmon-admin-center --push-list; stop one: --push-remove NAME or all.
CertificatesCertificates checked by the sites, and the centre's own, with the days left.
BackupSince 7.20.0, for the administrator only (role full, every site, not operator). Backups of the whole centre: the last and the next automatic one, the list of backups (when, kind, from which server and version, size), Back up now, Upload a backup…, for each Download, Restore… and Delete; the settings from [backup] and short steps for moving. A red mark in the menu: the last backup or restore failed. All of it: Backup and restore.
ServerOnly for role full (and operator). What the centre uses on its server (memory, CPU, processes, running time), the disk with the data (centre data, everything else, free, the alert limit) and a table of the sites: how much space each takes in the centre and the server of its mtmon (version, memory, CPU, free disk; from mtmon 13.3.0). When less than disk_warn % of the centre's disk is free, a mail and a push go to users who see every site; the alert for a site's disk is sent by its mtmon. In the console: mtmon-admin-center --server.

Reports come in two kinds, the switch Wi-Fi | Devices at the top of the report page. The device report (/report?r=dev for all sites or the chosen group, /site/ID/report?r=dev for one site): availability of devices, access points and controllers (over several sites weighted by the number of devices), outages and total downtime, availability by day, an outage timeline, the least reliable devices with their site, restarts, firmware changes, maintenance and switch statistics (ports in use, PoE, temperature, uplink traffic) from sites with mtmon 12.0.0. Sites with an older mtmon are listed under the report.

Manuals: the menu under your name has Admin Center Manual (this manual, /manual) and MT-Mon manual (/manual/mtmon); the MT-Mon manual button on a site page opens the mtmon manual. They are also installed in /usr/share/doc/mtmon-admin-center/.

  • Clicking a site opens its dashboard (/site/ID/) – the same as on that mtmon, with the data kept by the centre.
  • The palette button chooses the theme of the overview: the futuristic Orbit, Arctic, Neon, Ember, Matrix and Breeze (animated background, glass panels) or the classic Dark, Blue, Clear, Light blue, Gray, Light green, Orange, Rose, Graphite, Green, Purple; for each theme also an accent colour (12 colours or any colour) and whether the background moves. Each site page has its own Themes button: "Same as the overview" by default, or its own theme – with several sites open in tabs you tell them apart quickly (also by the colour of the tab icon). Sites with their own colours are marked with a coloured square on the Sites page.
  • On a site page, right of its name, ‹ All sites goes back and a list of all sites (by group) jumps straight to another site.
  • Search (key /) filters all pages by site, device name or IP; Enter opens the site when only one matches.
  • On a phone the menu opens with the button at the top left.
  • The group picker (when sites have group=) limits every page to one group.
  • On a site page the Maintenance… buttons work as on the mtmon; the window reaches the mtmon with its next report. While the whole site is in maintenance the centre sends no "not reporting" mail; if it is still silent after the window, it does.

How a push reaches the phone

Outage at a sitemtmon / agentCentreevents.jsonl (rt)Filtersthe user's categoriesmaintenance · behind · quietPhonenotificationreportThe phone keeps waiting on the centre (/api/push/events, device key). If the system stops it or it has no connection, there is no push – the mail still comes.
mtmon-admin-center --push-list shows when the phone last called in (refreshed once an hour).
  • What everyone gets each user chooses on the Push page (or in the app): outages, returns, maintenance, new/removed devices …
  • Not pushed: events during maintenance (of a device or the whole site), devices "behind" (behind a failed one – only the top one goes), single outages when more than 5 come in one report (one summary comes).
  • A user gets pushes only for the sites he may see (sites=, groups=).
  • mtmon-admin-center --push-list – phones, user, registration, last contact; --push-remove NAME removes a phone.

A user with only some sites

  1. mtmon-admin-center --hash-password asks for the password and prints {PBKDF2}…; add the line serviser = {PBKDF2}… to [web users].
  2. Add the limits on the same line: role=summary (no list of Wi-Fi clients), sites=hotel-delfin,kongres or groups=Coast, exceptions with !.
  3. The centre reads the change by itself within seconds; the user sees only his sites – everywhere, also in reports, on the wall and in push.

8Web dashboard

Turn it on in [web] (enabled = yes), run systemctl reload mtmon and open https://SERVER:8686/. The web part runs as a child process of the same service; if it stops the daemon restarts it, and monitoring and mails keep running.

  • Top: Wi-Fi clients (all and per controller); a click on a chart jumps to the details.
  • Status board: every access point and device as a light, a ring per group.
  • Problems (longest first), events, availability with date navigation (24 h – all), device tables with search.
  • Wi-Fi: charts per SSID and controller, peaks (today, yesterday, week, month, year, all), client list with EAP names, IP, MAC, signal.

The menu on the left lists the sections of the page (Overview, Wi-Fi clients, Availability, Devices, Problems with the number open, Maintenance, Events, Certificates, Inventory) – a click scrolls to the section, the section in view is marked. Below them are the Wi-Fi report, the Device report and the Manual, at the bottom the state of the site. Sections that are not used are not listed. On a phone the menu opens with ☰.

Wi-Fi report for owners (Report button, opens in a new tab, address /report): a document to print or save as PDF (one A4 page; access points on the next). Download PDF (since 13.10) makes a real PDF that looks the same as the report on the screen (page by page as a picture, the text cannot be selected); Print stays for the printer, Slovenian or English. Period: a month (1st to last day, any month back), a year or from – to; the period is in the address, so a report can be bookmarked or sent as a link. Content: most devices at one time (when), devices on average, connection hours, busiest day / month – each compared with the period before; three summary sentences; usage by day (by month for a year), the month as a calendar or the year at a glance, the daily rhythm as a 24-hour clock, the weekly pattern (day × hour), networks (SSID) and controllers as donuts. Access points (bars and a table) are in the report only when ticked. Averages are whole numbers (below a half: "<1").

mtmon computes the report from the hourly history (kept 400 days; older periods from the daily one). Finished months are kept in report-cache/, a year is put together from its months, so it opens at once the second time. Faster with libjson-xs-perl. Access points are the devices the controller knows (remote CAPs, HP / cnPilot APs), not radios or SSID interfaces; mtmon --clients lists the CAPsMAN interfaces that could not be assigned to a CAP.

Device report (the switch Wi-Fi | Devices on the same page, address /report?r=dev): availability of the pinged devices, access points and controllers (with the change from the period before), number of outages and total downtime, the longest outage, availability by day (a bar is green, only the part on top is red – the time some device did not answer), an outage timeline, availability per device (worst first), restarts, unstable devices, firmware changes and maintenance windows. For switches with snmp = yes also ports in use, PoE against the budget, temperature and uplink traffic (average and most, % of the link speed). Outages during a maintenance window are not counted. Same periods, languages and one-page A4 print as the Wi-Fi report.

Manual: the MT-Mon manual button opens this manual (/manual; ?lang=sl or ?lang=en, otherwise the browser language). It is also installed in /usr/share/doc/mtmon/.

The Themes button chooses the theme. The futuristic themes have an animated background behind glass panels: Orbit (globe with orbits and a network in cyan), Arctic (bright ice, grid and light pillars), Neon (violet network with beacons), Ember (amber layers of the network), Matrix (falling code, green terminal) and Breeze (light blue glass). Classic: Automatic (follows the system), Clear, Dark, Light blue, Dark blue, Gray, Graphite, Light green, Green, Orange, Rose, Purple.

Every theme can have its own accent colour (12 colours or any colour). The background animation is turned off in the same menu; it is also off when the system asks for reduced motion, stops while the tab is not shown and is not printed. Status colours (green, amber, red) are the same in every theme. The choice is kept in this browser; the tab icon takes the accent colour.

Certificate

Self-signed by default (the browser warns once). Own certificate, e.g. a wildcard:

[web]
cert_file = /etc/mtmon/wildcard.crt
key_file  = /etc/mtmon/wildcard.key

New self-signed certificate (e.g. after renaming the server or a new IP):

rm /etc/mtmon/web.crt /etc/mtmon/web.key
/usr/lib/mtmon/mkcert /etc/mtmon/web.crt /etc/mtmon/web.key mtmon && systemctl reload mtmon

If the server firewall is on, open the port: firewall-cmd --add-port=8686/tcp --permanent && firewall-cmd --reload (or ufw).

Push notifications on the phone

The MT-Mon app for Android (1.3.0 or newer) shows a notification when an access point, a device or a controller goes down and when it is back (not during maintenance). In the app, signed in to this mtmon: page menu → Notifications on this phone. The phone waits on a connection to mtmon, so a notification arrives within seconds; no Google services are needed. If the site reports to a centre that sends notifications already, turn them on only there – otherwise each one comes twice.

API

Same access rules as the page; sign in with -u user:password or an API key.

PathContent
/api/statusCurrent state of all devices.
/api/events?limit=NRecent events.
/api/history?from=EPOCH&to=EPOCHAvailability history.
/api/clientsWi-Fi clients now.
/api/clients/history?from=..&to=..Client history per SSID.
/report?p=m:2026-10&lang=slThe Wi-Fi report page (p = m:YYYY-MM, y:YYYY or c:from:to; aps=1; ctl=controller).
/api/clients/report?from=..&to=..[&ctl=][&aps=1]Data of the Wi-Fi report.
/api/devices/report?from=..&to=..Data of the device report (since 12.0.0).
/manualThis manual.
/api/clients/aphistory?from=..&to=..Client history per access point (since 11.2.0).
/api/clients/peaksClient peaks.
/healthzWhether the web part runs (no sign-in).
/api/inventory, /api/inventory.csvInventory (model, serial, version) as JSON or CSV with ;.
/api/certificatesState of the watched certificates (days to expiry).
GET /api/maintenanceActive maintenance windows and whether the user may change them (can_edit).
POST /api/maintenanceA new window, JSON {"target": "10.0.0.11", "duration": "2h", "reason": "…"} (target as for --mute; role full only).
POST /api/maintenance/endEnds a window: {"id": "…"}.
POST /api/push/registerA phone signs up for push (device name); returns a device key mtp_….
GET /api/push/events?since=..&wait=..Events for the phone (device key); waits up to wait seconds for new ones.
POST /api/push/unregisterThe phone signs off.
/topology, /reportThe topology and report pages (see above).

Sign-in: the dashboard cookie or Authorization: Bearer mtk_… (a key from [api keys], role full or summary, allow). Answers are JSON in UTF-8, times are seconds since 1970 (Unix time).

curl -k -H 'Authorization: Bearer mtk_...' https://SERVER:8686/api/status

9Topology

mtmon finds what is behind what by itself (every topology_hours, or now with mtmon --topology): neighbours over LLDP and CDP (SNMP of the switches) and /ip neighbor of MikroTik, the MAC tables of the switches (a device without LLDP hangs on the port with the fewest MACs), the routers on the way. The Topology panel draws it as a tree: each device in the colour of its state (red down, grey behind a device that is down, blue maintenance), on each link the ports on both sides; solid line = neighbour (LLDP/CDP/MikroTik), dashed = MAC table, dotted = route. A click on a device opens it in Devices, + / − folds a branch. The Open the topology button (or /topology) opens it on its own page in a new tab: full screen, zoom with the wheel / fingers / + −, move by dragging, Fit (F) shows everything. Each device lists the ports something hangs on (with their speed), the line goes to the port of the device behind it, whose name is at the end of the line; left is towards mtmon (uplink), right the downlinks, 10 G links are thicker. Choosing a VLAN colours the links that carry it on both ends, a red dotted line shows where it stops (on one end only), amber where it is tagged on one end and untagged on the other. Not monitored shows neighbours mtmon does not monitor (a server, a modem …). A click on a device opens a panel with its uplink, downlinks and all its ports (state, speed, VLANs, what is on them). Find by name or address. When a device goes down, the devices behind it are not reported one by one - its mail lists them, no push goes for them. The ports of a device show what is connected (a click on a port opens the list).

The topology page

The Open the topology button in the Topology panel (or /topology; on the centre /site/ID/topology) opens the topology on its own page in a new tab.

WhatHow
MoveDrag with the mouse or a finger; the arrow keys.
ZoomMouse wheel, two fingers on the touchpad (swipe or pinch), pinch on a phone / tablet, the + and − buttons, the + and − keys, double-click (Shift+double-click zooms out).
Everything on the screenThe Fit button or the F key.
Full screenThe Full screen button or F11; the page follows the size of the window.
LookLook: as the dashboard (its theme / the system), light, dark, blueprint or high contrast – when something is hard to see in a theme. The choice is remembered in this browser.
Port to portEvery device lists the ports something hangs on (speed, down/disabled); the line goes to the port of the device behind it, whose name is at the end of the line. Left is towards mtmon (uplink).
LinesSolid: a neighbour over LLDP/CDP/MNDP · dashed: found in a MAC table · dotted: a route (port not known) · thicker: 10 G · red: to a device that is down · grey: behind it.
VLANChoose a VLAN – see Is a VLAN carried along the whole path?
DevicesA click opens a panel: uplink, downlinks, all ports with state, speed, VLANs and what is on them. Access points hides or shows the APs, Not monitored the neighbours mtmon does not monitor, Expand all opens folded branches, the search box finds a device by name or IP.

Is a VLAN carried along the whole path?

On the topology page (mtmon: the Open the topology button or /topology; centre: Topology on the site card or /site/ID/topology, works also without the web of that mtmon) choose a VLAN at the top. The links are coloured:

  • solid blue – the VLAN is on both ends of the link (carried)
  • red dotted – the VLAN is on one end only: it stops here
  • amber – tagged on one end, untagged on the other
  • dashed blue – on one end, the other end is not known (that device does not report VLANs)
  • faded – the VLAN is not on this link

When a VLAN is chosen, the legend at the bottom has one more row with all five colours and lines and the t / u marks, so there is no need to look it up.

At the top right a list of the links where the VLAN stops or the tag does not match; devices without that VLAN are faded; next to a port how it carries it (e.g. 20t, 20u). A click on a device opens a panel with all its ports and their VLANs, the ports with the chosen VLAN marked. The VLANs of single ports are also in the device details on the dashboard, but without the view of the whole path.

Needed: mtmon 13.8.0+ (centre 7.12.0+) and devices that report their VLANs – switches over SNMP (snmp = yes, Q-BRIDGE-MIB), MikroTiks over SNMP or the RouterOS API, access points through CAPsMAN's port data. Where a device does not report VLANs its ends are unknown and the page does not claim that the VLAN stops there.

10Maintenance windows

During planned work (replacing a switch, a firmware upgrade, painting rooms …) mtmon sends no mails about the chosen target. Whatever is still down when the window ends is mailed right after it ("still missing after maintenance"). Events are still recorded, marked maintenance.

mtmon --mute 10.0.0.12 2h replacing the switch  # one device, 2 hours
mtmon --mute 'AP-2NAD*' 18:00 upgrade         # wildcard, until 18:00
mtmon --mute all 22:00-02:00                  # whole site, tonight
mtmon --mutes                                 # list
mtmon --unmute 1c3e39c3                       # end early
TargetWhat it mutes
allThe whole site: controllers, access points, devices, certificates.
mainA [capsman main], [msm …] or [cnpilot …] name: the controller with all its access points.
AP-Recepcija, B8:69:F4:…, 192.168.10.21An access point by identity, MAC or IP.
10.0.0.12, SW-coreA device from [switches] by IP or description.
AP-2NAD*, 10.0.1.*Everything matching the wildcard * or ?.

On the dashboard, users with role full have a Maintenance… button at every device, every controller and for the whole site, and a Maintenance panel with End. A window set in the centre (mtmon-admin-center 5.0) arrives with the answer to the next report.

11Weekly and monthly report

On Monday at 7:00 a report for the week before arrives, on the 1st for the month before ([report]). It contains:

  • availability of access points, devices and controllers (in %),
  • the least available devices (outages, total time, %) and the longest outages,
  • Wi-Fi peak (with time) and average, peak per SSID,
  • unstable devices, switch restarts, firmware changes,
  • certificates expiring within 30 days, version mismatches, maintenance windows.

Outages during a maintenance window do not count against availability (only the time until the window ended). Now: mtmon --period-report week (or month, 7d); -n only prints it.

12Certificates

Once a day mtmon checks with openssl when the certificates of web and mail servers expire and mails at each of warn_days (30, 14, 7, 3, 1 day) and when a certificate is renewed. It also watches its own dashboard certificate.

[certificates]
Web shop    = https://shop.example.com
Mail server = smtp://mail.example.com:587
IMAP        = imaps://mail.example.com
VPN         = file:/etc/ssl/certs/vpn.pem
TargetMeaning
https://host[:port]Web server (443).
smtp://host[:port], submission://hostMail with STARTTLS (25 / 587).
smtps://, imaps://, pop3s://, ldaps://Direct TLS (465, 993, 995, 636).
imap://, pop3://, ftp://STARTTLS.
host:portAny TLS port.
file:/pot/cert.pemA file on this server.

Test: mtmon --certs. The state is on the dashboard in the Certificates panel.

13Unstable devices

An access point or device that drops and comes back again and again sends one "unstable" mail when it has flap_count drops within flap_window minutes (default 4 in 60). A drop is one missed check – also the short ones that cap_miss_threshold and fail_threshold hide – or, for MikroTik, a "disconnected" line about that access point in the CAPsMAN log (flap_log). After an hour without drops it is stable again (an event, no mail).

14Switches over SNMP

With snmp = yes in [switches] (and the snmp / net-snmp-utils package) mtmon also asks every device that answers the ping over SNMP. Alarms are only for the uplinks you list: the port is down, slower than before (or than the given speed), or has more errors than error_rate per minute. Besides: PoE budget (poe_warn %), temperature (temp_warn °C), restart (uptime) and SNMP not answering. All other ports are only in the dashboard statistics (status, speed, errors) – click the switch name.

[switches]
snmp      = yes
community = public
10.0.0.11 = SW-core | uplinks=49,50
10.0.0.12 = SW-floor | uplinks=sfp-sfpplus1:10G community=other
10.0.0.20 = Printer | snmp=no
KeyDefaultMeaning
uplinks–Port numbers (matched to names like Gi1/0/49, 1/1/49, ether49), port names or ifIndex. :10G adds the expected speed; without it the highest seen so far counts.
snmpnoOn for all; uplinks= turns it on for that device, snmp=no off.
community / snmp_versionpublic / 2cFor SNMPv3: snmp_user, snmp_auth_proto, snmp_auth_pass, snmp_priv_proto, snmp_priv_pass.
error_rate / poe_warn / temp_warn10 / 90 / 70Alarm limits; 0 = no alarm.
snmp_timeout / snmp_retries2 / 1Wait and retries per request.

VLANs: every port on the dashboard shows its VLANs in a short form, e.g. 1u,20-24t (u = untagged, t = tagged; consecutive VLANs are joined). The tooltip adds the PVID. mtmon reads them from Q-BRIDGE-MIB once an hour; a switch without that table shows none.

Statistics for the device report are recorded with every check: ports in use, PoE power and budget, temperature and the traffic on the uplinks (from the 64-bit interface counters, Mbit/s in and out).

mtmon --check prints what SNMP sees and which port each uplink maps to. All options except uplinks can also be given per device after the |.

15Inventory

Model, serial number, version and firmware of every controller (RouterOS /system resource and routerboard, HP MSM sysDescr; once per inventory_hours), access point and switch (SNMP ENTITY-MIB). The dashboard has a table with Download CSV (separator ;, opens in Excel), the console mtmon --inventory or --inventory --csv. Devices with another version than most of the same model are marked; version changes are events.

16Ports and VLANs of the access points

Since 13.4.0 mtmon asks every access point on its own address every ap_ports_minutes (15) minutes which ports it has and which VLANs they carry. On the dashboard a summary is under the name of the AP (ethernet port with its speed, VLANs); a click on the name shows all ports as tiles - as for switches. The centre and the wall show the same.

DeviceHowVLANs
MikroTik (CAPsMAN)SSH with the user and key of the section (or ap_user / ap_key / ap_port); method = api: the API with its user and password. When that does not work: SNMP (ap_community).bridge VLAN filtering (tagged / untagged, PVID), VLAN interfaces, the VLAN of each wireless / wifi interface (vlan-id, datapath.vlan-id) - over SSH and the API. Over SNMP only the ports.
Cambium cnPilotSNMP with the settings of the section.where the AP gives them in Q-BRIDGE-MIB

The user on the APs only needs read rights (group read). An AP that cannot be read has "ports not readable" under its name (the reason in the tooltip); after 3 failures it is only tried every 6 hours. Try it: mtmon --ap-ports or mtmon --ap-ports cAP-Recepcija. When CAPsMAN sends the traffic to the controller (no local forwarding), the VLANs are on the controller, not on the AP - then the AP does not show them.

17Command line

CommandWhat it does
--add-site ID [--group G] [--mail a,b]Adds a site (with group and recipients) and prints the [central] lines for its mtmon.
--period-report week|month|7dSends the report of all sites now; with -n only prints it.
--list-sitesSites with state, last report and mtmon version; for older ones also what they are missing.
--fingerprintCertificate fingerprint for [central] fingerprint.
--hash-passwordPassword hash for [web users].
--new-api-key NAMEAPI key for apps / scripts.
--backup [FILE|DIR]A backup of the whole centre now – into [backup] dir or to a file / folder (since 7.20.0). As root or mtmon-center.
--backup-listThe backups in the folder, the schedule, the last result.
--restore FILERestore from a backup, as root. If the centre runs, it stops and its next start applies the backup; if not, it is applied at once. A copy of the present state is made first.
--apply-restoreApplies a waiting restore (restore/pending.tar.gz). systemd runs it as root before every start (ExecStartPre=+); without a waiting restore it does nothing.
--checkChecks the config.
--serverWhat the centre uses on the server, free disk, data in groups and per site.
--config-upgrade [--template FILE] [-n]Adds the settings new in this version to the config (commented out, with their explanation); --template takes another template (default /usr/share/mtmon-admin-center/center.conf.template); -n only lists them. The package does it by itself.
--webOnly the web server in the foreground (testing).
-c, --config FILEAnother config.
-d, --debugVerbose output.
--changelog [V]Change history.
-V / -hVersion (with the mtmon it is built with and the compatibility table) / help.
systemctl status mtmon-admin-center
systemctl reload mtmon-admin-center     # config at once (otherwise by itself within seconds)
systemctl restart mtmon-admin-center

Which mtmon

The centre is built with one mtmon version (the one released with it: 6.0.0 with mtmon 12.0.0) and works with every mtmon from 9.0.0 on. Each side skips what it does not know. What needs a newer mtmon:

Featuremtmoncentre
reports in parts, compressed10.1.04.1.0
maintenance windows set on the centre11.0.05.0.0
Wi-Fi clients per access point11.2.15.1.0
switch statistics in the device report, VLANs on ports12.0.06.0.0
the whole history to the centre (every level and the events): on the first contact and mtmon --central-resend13.13.07.21.0

mtmon-admin-center --version prints this table, --list-sites names what each older site is missing, and the Sites page shows the same in the tooltip of the mtmon version. The centre tells mtmon its version in every answer (mtmon --test-central).

18Logs

journalctl -u mtmon-admin-center -f
journalctl -u mtmon-admin-center --since today
journalctl -u mtmon-admin-center -p warning --since "7 days ago"     # warnings and errors
journalctl -u mtmon-admin-center --since "7 days ago" | grep -i sign  # sign-ins
journalctl -u mtmon-admin-center --since today | grep -i -E "rejected|report"   # site reports

Detailed (debug) log

Shows every received report and every connection error. At start the log must contain Web dashboard: certificate … – otherwise debug is not on.

mkdir -p /etc/systemd/system/mtmon-admin-center.service.d
cat > /etc/systemd/system/mtmon-admin-center.service.d/debug.conf <<'EOF'
[Service]
ExecStart=
ExecStart=/usr/bin/mtmon-admin-center --config /etc/mtmon-admin-center/center.conf -d
EOF
systemctl daemon-reload && systemctl restart mtmon-admin-center

# off:
rm /etc/systemd/system/mtmon-admin-center.service.d/debug.conf && systemctl daemon-reload && systemctl restart mtmon-admin-center

Common messages

MessageMeaning
mtmon-admin-center X started: N site(s)Start.
…center.conf changed, reading it againThe centre noticed a config change.
Configuration reloaded: N site(s); new: x; removed: y; new key: zConfig read; which sites are new, removed or have a new key.
Reload failed, keeping the old configuration: …Error in the config; the reason is in the message.
Ingest from IP rejected: site 'x' is not in [sites] of …No site with this ID.
Ingest from IP rejected: wrong key for site 'x' (key ending ...abcd)Wrong key; compare the last four characters with the key on the mtmon.
Site x: report from IP incomplete: got N of M bytes (…)The report did not arrive whole; the reason is in brackets.
Site x: report from IP not stored: …Report received but not stored; the reason is in the message.
Site x (Title): no report since …Site not reporting (mail if notify_offline).
Site x (Title): reporting againSite reporting again.
Web: 'ime' signed in from IPWeb sign-in.
Web: failed sign-in as 'ime' from IP (N)Wrong password.
Backup NAME made (auto, 120 MB, 14 s)Backup made (kind, size, time it took).
Backup (auto) failed: …The backup failed, the reason in the message (mail if [backup] mail).
Backup NAME removed (auto: the newest 7 stay)An old automatic backup removed by keep.
Web: backup … asked for / downloaded / uploaded / deleted by USER from IPWho did what with the backups.
A restore from a backup is waiting - stopping, the next start applies itA restore is staged; the centre stops (exit 75).
Restoring the centre from the backup NAME (asked by USER)The start as root (systemd ExecStartPre or the container) applies the backup.
Restore of NAME done: …Restore done; notes follow (the copy before the restore …).
Site ID: history from IP merged into FILE: N new, M replaced, K in allAn mtmon sent its history (first contact or mtmon --central-resend, 7.21.0) and the centre merged it with its own.
Restore of NAME failed: …Restore failed, everything was put back; the reason is in the message.

19Data

PathContent
/etc/mtmon-admin-center/center.confConfiguration, users, site keys (hash).
/etc/mtmon-admin-center/center.crt, center.keyCertificate.
/etc/mtmon-admin-center/center.conf.dist, .bak-VERZIJATemplate of the last upgrade and the config before it (since 7.4.0).
/var/lib/mtmon-admin-center/server.json, center-events.jsonlLast server sample and the centre's own events (disk).
/var/lib/mtmon-admin-center/sites/ID/latest.jsonLast report of the site.
…/sites/ID/history*.jsonl, clients*.jsonl, clientsap*.jsonl, devstats*.jsonlHistory (every report, hourly, daily); devstats = switch statistics (from mtmon 12.0.0).
…/sites/ID/events.jsonlSite events.
…/sites/ID/agent.conf, agent-backup.jsonConfiguration and saved state of an agent (since 7.13.0).
/var/lib/mtmon-admin-center/push-tokens.jsonPhones with the MT-Mon app and their choices.
/var/lib/mtmon-admin-center/backups/Backups ([backup] dir, since 7.20.0); next to each .tar.gz a .tar.gz.json describing it.
/var/lib/mtmon-admin-center/backup-state.jsonThe last backup, the last automatic one, a backup in progress.
/var/lib/mtmon-admin-center/restore/A waiting restore (pending.tar.gz), the result of the last one (last.json).
/usr/share/doc/mtmon-admin-center/README, CHANGELOG, manuals of the centre and mtmon (HTML).

20Backup and restore

Since 7.20.0 the centre makes backups of the whole solution itself – configuration, certificate, users, sites and their keys, all history, events, maintenance windows, phones and agents – into one .tar.gz file. From it the centre is restored on the same or on a new server without losing data, from the web page or with one command.

mtmon-admin-center/etc/mtmon-admin-center/center.conf · center.crt · center.key/var/lib/mtmon-admin-center/sites · history · events · phonesmtmon-center-backup-….tar.gzmtmon-backup.jsonconfig/ – center.conf, certificate, keycerts/ – certificate outside the folderdata/ – all of data_dirwithout backups/ and restore/mode 0600scheduleBack up now--backupFolder backups/keep = 7 automaticDownload (web, API)NAS / another server
One file carries the whole centre. It holds every password, the site keys and the private key of the certificate – keep it like a password.

Who may work with backups

  • On the web: a user with role=full who sees every site (no sites= / groups=). Only such a user sees the Backup page in the menu.
  • role=operator has every right of full except backups – for colleagues who should not see the passwords and keys. If the centre has several full users and only the administrator should handle backups, change the others to role=operator.
  • role=summary, users limited to some sites and phones (push key) have no backups; the API answers 403.
  • An API key with role=full and no sites= may download backups (to copy them to another server automatically). A key with role=operator may not.
  • On the command line: --backup and --backup-list root or user mtmon-center; --restore root only.

What a backup holds

In the archiveFromContent
mtmon-backup.json–What the backup is: the centre's version and the mtmon it is built with, server, title, time, kind, who, config folder, data_dir, list of sites.
config//etc/mtmon-admin-center/center.conf and every *.crt, *.key, *.pem in that folder (certificate, key, chain).
certs/the path of cert_file / key_fileOnly if the certificate is outside the config folder (e.g. a purchased one in /etc/ssl).
data//var/lib/mtmon-admin-center/Everything: sites (last report, history, events, Wi-Fi, switch statistics, agents), the centre's events, phones, sessions, maintenance. Without the backup folder, restore/ and backup-state.json (these belong to this server).

Name: mtmon-center-backup-SERVER-YYYYMMDD-HHMMSS.tar.gz. Its size is about a third of data_dir (history packs well); how much data the centre has is at the top of the Backup page and on the Server page. Before it starts the centre checks that the folder has room. The file opens with tar tzf – it is an ordinary archive.

The centre keeps working while the backup is made (a separate process makes it). A file being written at that moment is in the backup as it was then – for the centre's data that is fine, records are only appended. Every new backup is read back and checked at once.

KindMade byHow many stay
Automatic (auto)the schedule of [backup]the newest keep (default 7)
By hand (manual)the Back up now buttonuntil you delete it
Command line (cli)mtmon-admin-center --backupuntil you delete it
UploadedUpload a backup… (e.g. from the old server)until you delete it
Before a restore (before-restore)a restore, right before it replaces anythingthe last 3
Copied ina file you copied into the folder yourselfuntil you delete it

Automatic backups

By default every day at 03:15, the last 7 (one week). Change it in [backup] (all settings); the centre reads the config by itself.

[backup]
auto    = daily     # off | daily | weekly | 6h, 12h …
time    = 02:30
keep    = 14        # two weeks

# weekly, on Sundays:
# auto = weekly
# weekday = sun
# keep = 8          # two months
  • The first automatic backup is made soon after the first start of 7.20.0 (there is none yet); then by the schedule. If the centre was off at the time of the backup, it makes it at the next start.
  • If a backup fails (full disk, folder not writable …), a mail with the reason comes (mail = yes), the menu shows a red mark at Backup, the log Backup (auto) failed. The next try is at the next slot; the previous backups stay.
  • The backups are on the same disk as the centre – against a broken server only a copy elsewhere helps: see below.

A backup by hand

  1. Menu Backup → Back up now. »Backing up…« shows at the top; for a typical centre it takes a few seconds.
  2. The new backup is first in the list (kind By hand, with your name). Download saves it to your computer.

On the command line:

mtmon-admin-center --backup                         # into [backup] dir
mtmon-admin-center --backup /root/                  # into another folder
mtmon-admin-center --backup /root/before-upgrade.tar.gz
mtmon-admin-center --backup-list                    # backups, schedule, last result

Copies off the server

To be safe from a broken server, keep the last backup elsewhere too. The simplest: another server fetches it through the API (name=latest is always the newest):

  1. On the centre: mtmon-admin-center --new-api-key backup-nas and add the line to [api keys], limited to that server's address: backup-nas = {SHA256}… allow=10.0.0.20/32 (the role is full by default).
  2. On the other server (e.g. cron every day at 04:00):
0 4 * * *  curl -fsS -k -H 'Authorization: Bearer mtk_...' -o /backup/centrala-$(date +\%u).tar.gz https://center.example.com/api/backup/download?name=latest

$(date +%u) gives 7 files (day of the week) that rotate. -k for a self-signed certificate; better --pinnedpubkey or a purchased certificate. By hand: Download on the Backup page or scp root@centre:/var/lib/mtmon-admin-center/backups/*.tar.gz .

Backups on another disk

dir may point to a mounted NAS or another disk. systemd locks the centre in (ProtectSystem=strict), so allow it to write there:

systemctl edit mtmon-admin-center
#   [Service]
#   ReadWritePaths=/mnt/backup
mkdir -p /mnt/backup/centre && chown mtmon-center: /mnt/backup/centre && chmod 700 /mnt/backup/centre
# center.conf: [backup] dir = /mnt/backup/centre
systemctl restart mtmon-admin-center

Restore

A restore replaces everything on this centre with the state of the backup: center.conf (users, passwords, sites and their keys, all settings), the certificate and all data. What happened after the backup (reports, events, windows) is not in it; the sites keep reporting and the present state comes back with their next reports.

From the web page:

  1. Backup → Restore… at the backup (a backup from another server: first Upload a backup… – the centre checks it whole on upload and tells from which server and version it is and how many sites it has).
  2. The dialog shows what is in the backup and what will happen. Tick Replace this centre with the backup and click Restore.
  3. The dialog follows the steps: backup checked and put in place → the centre stops and starts again (about 20 s under systemd) → backup applied → done. With notes (e.g. the name of the copy of the state before).
  4. Sign in with a user of the backup (the passwords are those of the backup).

On the command line (root):

mtmon-admin-center --restore /root/mtmon-center-backup-centrala-20261125-031500.tar.gz
  • If the centre runs, it stops within seconds and its next start applies the backup (systemd starts it after 15 s). Follow it with journalctl -u mtmon-admin-center -f.
  • If it does not run (e.g. right after installing on a new server), it applies it at once and prints what it did; then systemctl enable --now mtmon-admin-center.
  • From the command line also a certificate kept outside the config folder is restored (to the same path), and a backup with another data_dir – the web restore does neither.

How a restore runs

Restore…web page Backup--restore FILE1. checkonly files and foldersversion ≤ centrerestore/pending.tar.gzthe centre stops(exit 75)systemdstart againRestartForceExitStatus=75ExecStartPre=+ … --apply-restore (root)2. a copy of the present state (Before a restore)3. config/ → /etc/mtmon-admin-center4. data/ → data_dir (the old goes aside)5. owner mtmon-center, new settings into center.confThe centre runswith the backup's stateAn error?all back as it was
The centre itself may not write to /etc (systemd ProtectSystem=strict), so the backup is put in place by the step before the start, as root. In the container the centre runs as root and does it by itself at start.
  1. Check. The centre reads the whole file: is it a centre backup (mtmon-backup.json), does it hold only plain files and folders (no links, no paths outside config/, certs/, data/), is its center.conf valid. A backup of a newer version than the centre is not restored – install that version or a newer one first.
  2. In place. The backup goes to restore/pending.tar.gz; the centre stops with exit 75. systemd starts it again (RestartForceExitStatus=75), so does the container.
  3. A copy of the present state. Before the start, as root (ExecStartPre=+… --apply-restore), a backup of kind Before a restore is made first. If that fails (e.g. no room), nothing is changed.
  4. Replace. The files of config/ go to /etc/mtmon-admin-center (center.conf root:mtmon-center 640, certificate and key mtmon-center 600), the content of data_dir goes aside and data/ of the backup takes its place (owner mtmon-center). The backup folder stays as it is.
  5. Config upgrade. A backup of an older version gets the settings new in this version into its center.conf (commented out), as a package upgrade does.
  6. Start. The centre starts with the state of the backup; the result is in restore/last.json, on the Backup page and in the log. If any of the steps 4–5 fails, everything is put back as it was and the centre runs on with its previous state.

Restored the wrong backup? The Before a restore copy is in the list – restore that one.

Moving to a new server

  1. Old server: Backup → Back up now → Download (or mtmon-admin-center --backup /root/).
  2. New server: install the mtmon-admin-center package of the same or a newer version (Installation). No need to edit the config.
  3. Copy the backup to it and as root: mtmon-admin-center --restore mtmon-center-backup-….tar.gz, then systemctl enable --now mtmon-admin-center. (Or: set a temporary user, start the centre, Backup → Upload a backup… → Restore….)
  4. Sites: the certificate and the site keys came with the backup, so fingerprint in the mtmons' [central] stays valid. If the address of the centre changed, correct only url in [central] at every site (or point the DNS name to the new server – then nothing at all). Meanwhile the sites queue their reports and send them once they reach the centre again – nothing is lost.
  5. Phones (MT-Mon app) stay signed in – their keys are in the backup. If the address changed, correct it in the app.
  6. When the new centre works, stop the old one (systemctl disable --now mtmon-admin-center), so the sites do not report to two places.

If the server name changes and you have a purchased certificate for the old name, issue a new one; for a self-signed one the name does not matter (the sites check the fingerprint).

By hand, without the backup feature (e.g. from a centre older than 7.20.0): on the old server systemctl stop mtmon-admin-center; tar czf /root/center.tgz -C / etc/mtmon-admin-center var/lib/mtmon-admin-center, on the new one after installing:

systemctl stop mtmon-admin-center
tar xzf center.tgz -C /
chown -R mtmon-center:mtmon-center /var/lib/mtmon-admin-center
chown root:mtmon-center /etc/mtmon-admin-center/center.conf && chmod 640 /etc/mtmon-admin-center/center.conf
chown mtmon-center:mtmon-center /etc/mtmon-admin-center/center.crt /etc/mtmon-admin-center/center.key && chmod 600 /etc/mtmon-admin-center/center.key
mtmon-admin-center --config-upgrade
systemctl start mtmon-admin-center

In the container

In the mtmon-admin-center container (MikroTik, Docker) everything is in /data: config in /data/etc, data in /data/state, backups in /data/state/backups. Backups and restore work the same from the web page; the centre runs as root there, so it applies a restore by itself when it starts again (the container starts it within seconds). To be safe from a broken device, fetch the backups elsewhere (API). A backup of an ordinary server can be restored in the container and the other way, if data_dir is the same (it is by default).

Trouble with backups

Message / symptomCause and fix
Not enough free space in DIRA backup needs about a third of data_dir. Free space, lower keep or set dir to another disk.
Cannot make the folder DIR / not writableA folder outside /var/lib/mtmon-admin-center needs ReadWritePaths (see) and owner mtmon-center.
This backup is from mtmon-admin-center X, newer than this centreUpgrade the centre to X or newer first.
The backup keeps its data in …, this centre in …The backup has another data_dir. Restore with --restore as root or set the same data_dir.
…holds a link or a special file / an unsafe name / not part of a centre backupThe file is not a centre backup or was changed. The centre does not restore such a file.
Cannot read the file as .tar.gzThe file is damaged or not completely transferred – transfer it again.
…a restore must run as root before the centre startsThe systemd unit has no ExecStartPre=+… --apply-restore (e.g. an own copy of the unit in /etc/systemd/system). Add the line, or stop the centre and run mtmon-admin-center --restore FILE.
Cannot sign in after a restoreThe users and passwords of the backup apply. If need be, set a password in center.conf (--hash-password).
A »reporting again« mail after a restoreThe backup had a site that was not reporting then; when it reports, the centre says so. Expected.

21API

Sign in with Basic auth or Authorization: Bearer KEY; roles and sites= apply here too.

PathContent
/api/overviewAll sites: state, equipment, problems, Wi-Fi per controller and SSID.
/api/overview/events?limit=..&days=..Events of all sites (up to 5000).
/api/overview/clients?from=..&to=..Wi-Fi clients per site over time.
/report, /site/ID/reportReport of all sites / one site (parameters as in mtmon: p, r=dev, aps, ctl, lang).
/api/overview/report?from=..&to=..[&group=][&aps=1]Data of the report of all sites.
/api/overview/devices/report?from=..&to=..[&group=]Data of the device report of all sites (with the mtmon versions).
/manual, /manual/mtmonManual of the centre / of mtmon.
/site/ID/api/clients/aphistory?from=..&to=..Clients of one site per access point over time (from mtmon 11.2.1).
/api/overview/history?from=..&to=..Working and not working devices of all sites over time.
/site/ID/api/…API of one site (status, clients, history, events …).
POST /api/v1/ingestSite reports (site key).
GET /api/v1/agent/config, /api/v1/agent/backupAn agent takes its configuration / saved state (site key, since 7.13.0).
/api/overview/devicesAll devices of all sites (the Devices page).
/api/overview/clients/find?q=..Where a Wi-Fi client is (name, MAC or IP) – at which site and access point.
/api/overview/inventory, …/inventory.csvInventory of all sites (JSON, CSV).
/api/overview/certificatesCertificates of the sites and the centre.
GET /api/overview/maintenanceMaintenance windows of all sites.
POST /api/overview/maintenance, …/maintenance/endA new window (site, target, duration, reason) / end of a window (id); role full only.
/api/overview/serverUse of the centre's server (role full).
/api/push/register, /events, /unregister, /phonesPush for the MT-Mon app (device key mtp_…); /phones the user's phones and their categories.
/wall, /site/ID/topology, /site/ID/agentWall view, the site's topology, the agent configuration (role full).
POST /api/v1/historyFor mtmon (site key, like ingest; 7.21.0): the whole local history file by file in parts – {file, start, end, lines}; with the last part the centre merges it with its own.
GET /api/backupBackups, schedule, last result, space, a waiting and the last restore (administrator, since 7.20.0).
GET /api/backup/download?name=NAME|latestDownload a backup (latest = the newest).
POST /api/backup/createMake a backup now (JSON {}).
POST /api/backup/upload?name=FILEUpload a backup (body = the file, application/gzip); the answer says what is in it, with warnings.
POST /api/backup/restore{"name": "…", "confirm": "…"} (confirm = the same name) – restore from a backup; the centre stops and starts again.
POST /api/backup/delete{"name": "…"} – deletes a backup.
GET/POST /site/ID/api/agent-configThe agent configuration as JSON; POST {"config": "…", "base": "md5"} saves it (409 if it changed meanwhile).

Answers are JSON in UTF-8, times are seconds since 1970 (Unix time). The user's role and limits (sites=, groups=) apply to every path.

curl -k -H 'Authorization: Bearer mtk_...' https://center.example.com/api/overview

22Troubleshooting

A site cannot report

On the site's mtmon run mtmon --test-central and at the same time watch journalctl -u mtmon-admin-center -f on the centre:

mtmon saysCentre logsCause and fix
HTTP 401 … key rejectedrejected: …Wrong key or the site is not in [sites]. Compare the key; create a new one if needed.
fingerprint …nothingThe centre's certificate is not the pinned one. --fingerprint, or remove the line with a purchased certificate.
Broken pipe, Connection reset, SSL read error, Unexpected end of streamnothingThe request does not reach the centre. Most often the firewall in front of the centre lets port 443 only from selected IPs – add the site's IP.
Connection refused / timeoutnothingThe centre is not running, the port is closed or url is wrong.
HTTP 400 incomplete bodyreport … incompleteThe connection broke during the transfer; the reason is in the centre's log.

Test the path without mtmon (from the site, deliberately wrong key – nothing is stored). The right answer is {"error":"unknown site or wrong key"}, and the centre logs rejected:

head -c 20000 /dev/zero | curl -sk -X POST --data-binary @- \
  -H 'Authorization: Bearer test.aaaaaaaaaaaaaaaaaaaaaaaa' \
  https://center.example.com/api/v1/ingest; echo

A site counts as "not reporting" although mtmon runs

At the site: journalctl -u mtmon | grep -i central. If sending is fine, check offline_after (with a longer mtmon interval set more minutes, or 0 = automatic).

The web pages do not open

systemctl status mtmon-admin-center, [web] allow, firewall, curl -vk https://localhost/healthz. Site pages without a sign-in redirect to the sign-in page.

The mail comes, the push does not

mtmon-admin-center --push-list: if "Last seen" is older than an hour or two, the phone no longer asks the centre. The cause is almost always on the phone: the system stopped the app (Xiaomi/MIUI – battery saver "no restrictions", autostart) or it has no connection to the centre (VPN). Restarting the phone or turning notifications off and on in the app starts it again. See also How a push reaches the phone – some events are not pushed on purpose.

The agent does not take its configuration

  • The agent's page shows the error with its line – correct it and save; until then the agent runs the previous one.
  • "Saved – the agent takes it with its next report" that does not go away: the agent does not report (see Sites, last report) – on the MikroTik /log print where topics~"container".
  • In the agent's log "waiting for the configuration (HTTP 401)": the key (MTMON_KEY) does not match the site; "HTTP 404": the site has no agent.conf (--agent-config ID).

Hard to see on the wall or the topology

The wall has a choice of look at the top (Orbit, Orbit Arctic, Hive, Hive Night, Matrix), the topology the Look choice (light, dark, blueprint, high contrast) – independent of the centre's theme; the choice is remembered in the browser.

23Building from source

tar xzf mtmon-admin-center-7.21.0-src.tar.gz && cd mtmon-admin-center-7.21.0
./build-center-rpm.sh      # RHEL / Rocky / Alma / Fedora (dnf install rpm-build)
./build-center-deb.sh      # Debian

The package is written next to the source folder. The version is in pkg/DEBIAN/control and on top of CHANGELOG.md. shared/ holds the code shared with mtmon (web server, sign-in, history, mail, site dashboard).