mikroview

command module
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2026 License: AGPL-3.0 Imports: 73 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

[!IMPORTANT] Development disclosure: MikroView was coded by Claude under human direction.

[!WARNING] Under heavy development: MikroView is pre-1.0 and still changing shape. Not every feature described in the docs is finished, and some do not yet work as intended.

MikroView

See what your firewall just did. MikroView turns RouterOS's firewall log into a live picture of your network: every boundary the router watches, every connection accepted, dropped or rejected, and which rule decided it. The router pushes; MikroView never logs in to it — no RouterOS credentials, no API access, near-zero load on the router. One container, one Go binary with the interface built in.

Quickstart

curl -fsSL https://raw.githubusercontent.com/tomlawesome/mikroview/main/install.sh | sh

It pulls the image. It starts one container with two named volumes (your data, and the app folder) and two ports. It prints the address to open. Running it again is the upgrade line: same volumes, latest image. The script is short enough to read before you run it — install.sh on GitHub.

Open https://<docker-host>, create the admin account, and the setup wizard writes every RouterOS command with your values already filled in — syslog over TLS, RouterOS 7.18+. Paste it into the router once and the picture builds itself. The browser warns about the self-signed certificate on first visit, as any self-hosted admin interface does; docs/configuration.md covers bringing your own.

latest is the most recent release; each release is also tagged v<version> if you would rather pin one (sh -s -- v0.6.0). The no-script docker run form, the full Compose file, image tags and where your data lives are in docs/install.md.

Docs

Contributions

Not accepted: no pull requests, and there is no public bug tracker — development happens on a private GitLab and this repository is its mirror. Security problems are the exception: report them privately, see SECURITY.md. You are free to fork under the AGPL.

License

MikroView is free and open source under the GNU AGPL v3.0. You can use, modify and self-host it at no cost. If you change it and offer it to others over a network, the AGPL asks you to publish your changes under the same licence. There is no other licence on offer.

MikroView is an independent, community project, not affiliated with or endorsed by MikroTik. RouterOS is a trademark of MikroTikls SIA.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
demo-history command
Command demo-history builds a mikroview backup envelope (internal/backup) carrying seven nights of watchlist history and a matching week of retained corpus, for `-restore` to load into a fresh demo instance -- issue #959.
Command demo-history builds a mikroview backup envelope (internal/backup) carrying seven nights of watchlist history and a matching week of retained corpus, for `-restore` to load into a fresh demo instance -- issue #959.
internal
api
Package api exposes the HTTP/WebSocket surface: historical event queries, device/stat snapshots, and the live-tail WebSocket feed.
Package api exposes the HTTP/WebSocket surface: historical event queries, device/stat snapshots, and the live-tail WebSocket feed.
audit
Package audit records who did what admin-privileged mutation in mikroview itself, when, and to what -- an accountability log for the humans operating mikroview, distinct from internal/flags (which is about behavior mikroview *observes on the network*, not actions taken *in* mikroview) and from internal/store (raw ingested firewall events).
Package audit records who did what admin-privileged mutation in mikroview itself, when, and to what -- an accountability log for the humans operating mikroview, distinct from internal/flags (which is about behavior mikroview *observes on the network*, not actions taken *in* mikroview) and from internal/store (raw ingested firewall events).
auth
Package auth implements mikroview's local username/password authentication: user accounts (this file), Argon2id password hashing (password.go), in-memory sessions (session.go), and login-attempt rate limiting (ratelimit.go).
Package auth implements mikroview's local username/password authentication: user accounts (this file), Argon2id password hashing (password.go), in-memory sessions (session.go), and login-attempt rate limiting (ratelimit.go).
backup
Package backup reads and writes mikroview's whole persisted state as a single gzipped JSON document (issue #97).
Package backup reads and writes mikroview's whole persisted state as a single gzipped JSON document (issue #97).
backupsftp
Package backupsftp is the write-only SFTP drop box RouterOS pushes its configuration backups into (#394).
Package backupsftp is the write-only SFTP drop box RouterOS pushes its configuration backups into (#394).
backupslice
Package backupslice reassembles a router backup delivered as small slices over the HTTPS ingest channel (#955) -- the second way (beside #394's SFTP push) a router with no open SFTP port gets its backup into mikroview.
Package backupslice reassembles a router backup delivered as small slices over the HTTPS ingest channel (#955) -- the second way (beside #394's SFTP push) a router with no open SFTP port gets its backup into mikroview.
backupvault
Package backupvault keeps the RouterOS configuration backups pushed over SFTP (#394), encrypted at rest under the same retention key #853 covers the state store and event history with.
Package backupvault keeps the RouterOS configuration backups pushed over SFTP (#394), encrypted at rest under the same retention key #853 covers the state store and event history with.
baseline
Package baseline is the line register behind the living topology's second always-on rule (issue #1016, round 49): "colour is the verdict; brightness is the baseline".
Package baseline is the line register behind the living topology's second always-on rule (issue #1016, round 49): "colour is the verdict; brightness is the baseline".
blocklist
Package blocklist implements local IP/CIDR "known-bad" matching against a small, vetted menu of free, curated threat-intel feeds (issue #113 Part B) -- deliberately *not* an arbitrary user-supplied URL field.
Package blocklist implements local IP/CIDR "known-bad" matching against a small, vetted menu of free, curated threat-intel feeds (issue #113 Part B) -- deliberately *not* an arbitrary user-supplied URL field.
config
Package config loads mikroview's configuration with precedence defaults < YAML file < environment variables < CLI flags.
Package config loads mikroview's configuration with precedence defaults < YAML file < environment variables < CLI flags.
coverage
Package coverage stores coverage-gap declarations (issue #630/#392): an admin's deliberate record that a specific boundary-direction pair -- e.g.
Package coverage stores coverage-gap declarations (issue #630/#392): an admin's deliberate record that a specific boundary-direction pair -- e.g.
decommission
Package decommission holds the retirement of a network segment as a state machine rather than as an event (issue #460, owner ruling 2026-08-17).
Package decommission holds the retirement of a network segment as a state machine rather than as an event (issue #460, owner ruling 2026-08-17).
device
Package device holds the one list of RouterOS devices mikroview knows about, and attributes syslog source addresses to them.
Package device holds the one list of RouterOS devices mikroview knows about, and attributes syslog source addresses to them.
dossier
Package dossier assembles everything mikroview already knows about one host into a single evidence card (issue #410): what it talks to, on which ports and how often, its hardware address and who made it, whether its address is a lease or fixed, the names it goes by and where each came from, when it was first and last seen, which firewall rules its traffic matched, and -- from a small explicit table -- a suggested identity that always carries its evidence and a confidence in words.
Package dossier assembles everything mikroview already knows about one host into a single evidence card (issue #410): what it talks to, on which ports and how often, its hardware address and who made it, whether its address is a lease or fixed, the names it goes by and where each came from, when it was first and last seen, which firewall rules its traffic matched, and -- from a small explicit table -- a suggested identity that always carries its evidence and a confidence in words.
droplist
Package droplist is issue #1223, stage 1 of the design ratified on #461: an admin-authored list of ranges to block, one Entry at a time, each typed in directly or raised from a flag's drawer -- never written by a detector (settled on #461: "the reviewed by a human property holds by construction, not by policy").
Package droplist is issue #1223, stage 1 of the design ratified on #461: an admin-authored list of ranges to block, one Entry at a time, each typed in directly or raised from a flag's drawer -- never written by a detector (settled on #461: "the reviewed by a human property holds by construction, not by policy").
engine
Package engine is the evaluation chassis described in docs/decisions/evaluation-engine.md -- the machine internal/detect and internal/watchlist each build by hand today, unified into one place.
Package engine is the evaluation chassis described in docs/decisions/evaluation-engine.md -- the machine internal/detect and internal/watchlist each build by hand today, unified into one place.
entities
Package entities is the shared primitive behind two roadmap items (issue #107): a persisted, admin-manageable record per (entity type, key) with an optional friendly label and open-ended tags.
Package entities is the shared primitive behind two roadmap items (issue #107): a persisted, admin-manageable record per (entity type, key) with an optional friendly label and open-ended tags.
evict
Package evict bounds maps whose keys come from untrusted input.
Package evict bounds maps whose keys come from untrusted input.
flags
Package flags stores manually-clearable behavioral flags raised by internal/detect (port scans, per-source activity spikes, repeated critical-port attempts, global volume spikes).
Package flags stores manually-clearable behavioral flags raised by internal/detect (port scans, per-source activity spikes, repeated critical-port attempts, global volume spikes).
geoip
Package geoip resolves public IPs to a country code using an optional, locally-mounted MaxMind GeoLite2-Country database.
Package geoip resolves public IPs to a country code using an optional, locally-mounted MaxMind GeoLite2-Country database.
hosts
Package hosts is the presence register behind the living topology (issue #1016): the record of which hosts the syslog feed has actually shown, so a host that stops talking can go quiet on the map instead of silently disappearing from it.
Package hosts is the presence register behind the living topology (issue #1016): the record of which hosts the syslog feed has actually shown, so a host that stops talking can go quiet on the map instead of silently disappearing from it.
hub
Package hub fans newly inserted events out to connected WebSocket clients for the live-tail view, and carries the much rarer "something you are displaying has changed" notices alongside them (see Change).
Package hub fans newly inserted events out to connected WebSocket clients for the live-tail view, and carries the much rarer "something you are displaying has changed" notices alongside them (see Change).
ingest
Package ingest is the payload schema and validation for issue #186's RouterOS push ingest (step 2): what a router-side script may POST to POST /api/ingest/routeros, and the strict decoding that stands between that attacker-shaped input and the rest of mikroview.
Package ingest is the payload schema and validation for issue #186's RouterOS push ingest (step 2): what a router-side script may POST to POST /api/ingest/routeros, and the strict decoding that stands between that attacker-shaped input and the rest of mikroview.
logging
Package logging is mikroview's server-side log formatting: leveled, colorized (auto-disabled off a TTY or with NO_COLOR set), with a stable component column so a scrolling terminal or `docker logs` stays scannable.
Package logging is mikroview's server-side log formatting: leveled, colorized (auto-disabled off a TTY or with NO_COLOR set), with a stable component column so a scrolling terminal or `docker logs` stays scannable.
matchlog
Package matchlog persists watchlist matches (#243) -- the discrete, rare, high-value events a control-port/watchlist entry raises, distinct from internal/store's high-volume, volatile event ring and from internal/flags' aggregate, capped-evidence judgements.
Package matchlog persists watchlist matches (#243) -- the discrete, rare, high-value events a control-port/watchlist entry raises, distinct from internal/store's high-volume, volatile event ring and from internal/flags' aggregate, capped-evidence judgements.
naming
Package naming resolves friendly display names for firewall rule labels, host IPs, (issue #109) ports and (issue #600) the routers events arrive from, from two layers: internal/ config's static RuleNames/HostNames maps (config-driven only, no auto-discovery or liveness tracking the way internal/device's Registry has, since a rule label or a host IP doesn't have a "connection" to observe the way a syslog source does), and, taking precedence when set, internal/entities' live, admin-manageable Store (issue #107) -- so an alias edited in the UI overrides the YAML-configured one for the same key without a restart, while config.yaml stays a fully supported fallback for anything not (yet) given an entity.
Package naming resolves friendly display names for firewall rule labels, host IPs, (issue #109) ports and (issue #600) the routers events arrive from, from two layers: internal/ config's static RuleNames/HostNames maps (config-driven only, no auto-discovery or liveness tracking the way internal/device's Registry has, since a rule label or a host IP doesn't have a "connection" to observe the way a syslog source does), and, taking precedence when set, internal/entities' live, admin-manageable Store (issue #107) -- so an alias edited in the UI overrides the YAML-configured one for the same key without a restart, while config.yaml stays a fully supported fallback for anything not (yet) given an entity.
netclass
Package netclass attributes an IP address to a network class -- Tor exit, commercial VPN, cloud/datacenter, privacy relay -- from a small vetted menu of feeds, refreshed on a timer and matched locally.
Package netclass attributes an IP address to a network class -- Tor exit, commercial VPN, cloud/datacenter, privacy relay -- from a small vetted menu of feeds, refreshed on a timer and matched locally.
notify
Package notify delivers newly-raised behavioral flags (see internal/flags) somewhere outside the mikroview UI, batched rather than one message per flag so a real incident (many flags firing in quick succession) doesn't flood whatever channel is receiving them.
Package notify delivers newly-raised behavioral flags (see internal/flags) somewhere outside the mikroview UI, batched rather than one message per flag so a real incident (many flags firing in quick succession) doesn't flood whatever channel is receiving them.
oidc
Package oidc is mikroview's OIDC/SSO relying-party layer: provider discovery, the Authorization Code + PKCE flow, and ID token verification.
Package oidc is mikroview's OIDC/SSO relying-party layer: provider discovery, the Authorization Code + PKCE flow, and ID token verification.
oui
Package oui turns a hardware address into the organisation IEEE assigned its 24-bit prefix to -- the "vendor" half of identifying an unknown host (issue #410) -- and reports the one case where asking that question is a category error: a locally-administered address, which no vendor ever registered.
Package oui turns a hardware address into the organisation IEEE assigned its 24-bit prefix to -- the "vendor" half of identifying an unknown host (issue #410) -- and reports the one case where asking that question is a category error: a locally-administered address, which no vendor ever registered.
persist
Package persist is the storage boundary the six persisted stores sit on: accounts/tokens (internal/auth), flags, entities, the MAC registry, rule usage, and detector settings.
Package persist is the storage boundary the six persisted stores sit on: accounts/tokens (internal/auth), flags, entities, the MAC registry, rule usage, and detector settings.
prefs
Package prefs is issue #1283: one preferences record per user, held on the server instead of in the browser's localStorage, so a user's presets, widgets and layout follow them to any browser and a shared machine shows the next operator nothing of the last one.
Package prefs is issue #1283: one preferences record per user, held on the server instead of in the browser's localStorage, so a user's presets, widgets and layout follow them to any browser and a shared machine shows the next operator nothing of the last one.
reputation
Package reputation provides on-demand IP reputation/threat-intel lookups for public addresses, combining a free keyless source (Shodan InternetDB) with an optional source that needs an API key (AbuseIPDB).
Package reputation provides on-demand IP reputation/threat-intel lookups for public addresses, combining a free keyless source (Shodan InternetDB) with an optional source that needs an API key (AbuseIPDB).
retention
Package retention writes the events mikroview holds in memory to encrypted, compressed daily files, so a replay can reach further back than the ring does (#856).
Package retention writes the events mikroview holds in memory to encrypted, compressed daily files, so a replay can reach further back than the ring does (#856).
routeros
Package routeros decodes the body of a RouterOS firewall log message (the part after the syslog envelope has already been stripped) into structured fields.
Package routeros decodes the body of a RouterOS firewall log message (the part after the syslog envelope has already been stripped) into structured fields.
routeros/export
Package export parses the text RouterOS's `/export hide-sensitive` produces, for #435's Log every rule helper ("Tune logging" until #1134 renamed the page) and, per that issue's own decision record, #895's later scheduled-config-backup reader -- one parser, built once, shared by both rather than each growing its own.
Package export parses the text RouterOS's `/export hide-sensitive` produces, for #435's Log every rule helper ("Tune logging" until #1134 renamed the page) and, per that issue's own decision record, #895's later scheduled-config-backup reader -- one parser, built once, shared by both rather than each growing its own.
routerstate
Package routerstate holds the most recent state each router pushed via POST /api/ingest/routeros (issue #186 step 4): its firewall rule table, NAT table, and the host-identity records (DNS static entries, DHCP leases, WireGuard peers) that give addresses the operator's own names.
Package routerstate holds the most recent state each router pushed via POST /api/ingest/routeros (issue #186 step 4): its firewall rule table, NAT table, and the host-identity records (DNS static entries, DHCP leases, WireGuard peers) that give addresses the operator's own names.
rules
Package rules persists a long-lived, per-rule-label usage record -- when a firewall rule was first observed firing, when it last fired, and how many times -- independent of internal/store's ring buffer.
Package rules persists a long-lived, per-rule-label usage record -- when a firewall rule was first observed firing, when it last fired, and how many times -- independent of internal/store's ring buffer.
seen
Package seen is the register of values this instance has actually observed for the two filter fields that have no option list anywhere else in the app -- protocol, and interface (issue #1226).
Package seen is the register of values this instance has actually observed for the two filter fields that have no option list anywhere else in the app -- protocol, and interface (issue #1226).
servertls
Package servertls provides mikroview's TLS certificate, either loaded from an operator-supplied cert/key pair or, as the zero-config default, a self-generated local certificate authority + leaf certificate.
Package servertls provides mikroview's TLS certificate, either loaded from an operator-supplied cert/key pair or, as the zero-config default, a self-generated local certificate authority + leaf certificate.
settings
Package settings holds the small set of configuration an admin may change from inside the running app, as opposed to in config.yaml.
Package settings holds the small set of configuration an admin may change from inside the running app, as opposed to in config.yaml.
setup
Package setup records what mikroview has observed of a router's setup, so the guided wizard (issue #320) can tell an operator that a step worked instead of asking them to go and look.
Package setup records what mikroview has observed of a router's setup, so the guided wizard (issue #320) can tell an operator that a step worked instead of asking them to go and look.
snapshot
Package snapshot writes and reads the rotated warm-restart documents: the derived state mikroview has learned since it started -- counters, per-minute buckets, baselines, device first/last-seen -- so a restart resumes from a few minutes ago instead of from nothing (#795).
Package snapshot writes and reads the rotated warm-restart documents: the derived state mikroview has learned since it started -- counters, per-minute buckets, baselines, device first/last-seen -- so a restart resumes from a few minutes ago instead of from nothing (#795).
store
Package store holds the in-memory, time-windowed event buffer.
Package store holds the in-memory, time-windowed event buffer.
suggest
Package suggest is #243 slice 5: watchlist entries suggested from data RouterOS has already pushed (internal/routerstate), rather than an operator having to already know what to watch.
Package suggest is #243 slice 5: watchlist entries suggested from data RouterOS has already pushed (internal/routerstate), rather than an operator having to already know what to watch.
syslog
Package syslog parses the BSD/RFC3164-style syslog lines that RouterOS emits, and listens for them over UDP/TCP.
Package syslog parses the BSD/RFC3164-style syslog lines that RouterOS emits, and listens for them over UDP/TCP.
tlssniff
Package tlssniff lets one port answer both a TLS client and someone who typed the address into a browser.
Package tlssniff lets one port answer both a TLS client and someone who typed the address into a browser.
watchlist
Package watchlist is the operator-owned entry set #243 grew Control Ports into: a persisted, admin-manageable list of (source, destination, port set) tuples, replacing the single flat criticalPorts port list every operator previously shared regardless of what they actually wanted watched.
Package watchlist is the operator-owned entry set #243 grew Control Ports into: a persisted, admin-manageable list of (source, destination, port set) tuples, replacing the single flat criticalPorts port list every operator previously shared regardless of what they actually wanted watched.
scripts
routerosappendrow command
Command routerosappendrow appends one row to internal/routeros/dialects.go's Rows table -- the mechanical half of #894's weekly CHR exercise.
Command routerosappendrow appends one row to internal/routeros/dialects.go's Rows table -- the mechanical half of #894's weekly CHR exercise.
routeroscommands command
Command routeroscommands prints the RouterOS commands the setup wizard renders (#436), straight from internal/routeros -- the same functions POST /api/setup/commands calls -- so anything that needs "the commands mikroview tells an operator to paste in" reads them from the one table instead of holding a second copy that can drift from the wizard's own (#894).
Command routeroscommands prints the RouterOS commands the setup wizard renders (#436), straight from internal/routeros -- the same functions POST /api/setup/commands calls -- so anything that needs "the commands mikroview tells an operator to paste in" reads them from the one table instead of holding a second copy that can drift from the wizard's own (#894).
routerosfreshness command
Command routerosfreshness answers the one question scripts/routeros-freshness.sh needs from Go: is a candidate RouterOS version newer than the release mikroview's command knowledge has been reviewed against?
Command routerosfreshness answers the one question scripts/routeros-freshness.sh needs from Go: is a candidate RouterOS version newer than the release mikroview's command knowledge has been reviewed against?
routerosreference command
SPDX-License-Identifier: AGPL-3.0-only
SPDX-License-Identifier: AGPL-3.0-only
Package web embeds the built frontend into the mikroview binary so it ships as a single self-contained executable/image.
Package web embeds the built frontend into the mikroview binary so it ships as a single self-contained executable/image.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL