MirvMon

← Все публичные проекты

MirvMon — self-hosted-система мониторинга серверов и сайтов для домашней и небольшой рабочей инфраструктуры.

Она рассчитана на ситуацию, когда одному администратору или небольшой команде нужен понятный обзор собственной инфраструктуры без развёртывания тяжёлого enterprise-стека. Нативные агенты сами отправляют данные на сервер по HTTPS, поэтому наблюдаемым машинам не нужны входящие порты или белые IP-адреса.

MirvMon хранит историю метрик и доступности, следит за сайтами и сервисами, ведёт инциденты и проактивные наблюдения, считает показатели надёжности, умеет публиковать безопасную status page, отправляет уведомления, позволяет централизованно обновлять агентов и восстанавливать систему из резервной копии через единый веб-интерфейс.

Главный экран MirvMon

Основные возможности

  • мониторинг Linux и Windows нативным Go-агентом;
  • исходящие HTTPS-соединения от агентов без необходимости открывать входящие порты;
  • метрики CPU, RAM, дисков, I/O, сети, температуры, uptime, процессов и системных сервисов;
  • история и графики на PostgreSQL + TimescaleDB с периодами от часа до года;
  • группы серверов, оперативные сводки и live-обновление интерфейса;
  • пороговые warning/critical-состояния, recovery и единая лента Incidents / Events;
  • Telegram и SMTP через outbox с retry/backoff и индивидуальными получателями;
  • графики в уведомлениях для серверных метрик и измеряемых проверок сайтов;
  • maintenance windows без остановки сбора данных и с post-maintenance уведомлением для сохранившихся проблем;
  • проактивные Observations для необычных CPU/RAM-паттернов и прогноза заполнения дисков;
  • оценка исходов predictive observations для последующего анализа качества без автоматического переобучения детектора;
  • отчёт о надёжности серверов и сайтов за 7/30 дней: availability, coverage, инциденты и среднее время восстановления;
  • opt-in публичная status page с явно выбранными объектами и публичными именами;
  • мониторинг HTTP/HTTPS-сайтов: несколько endpoint, допустимые статусы, redirects, TLS, проверка текста, auth/headers, время ответа и сроки доменов;
  • диагностика очереди website checks и ручной requeue исчерпанных заданий;
  • установка и самообновление агентов из веб-интерфейса, массовое обновление и обзор версий парка;
  • совместимые сборки и сценарии обновления для legacy Windows и SysV-систем;
  • самодиагностика MirvMon, PostgreSQL/TimescaleDB, worker’ов, очереди уведомлений и хоста;
  • проверка внешней сетевой связности по контрольным узлам и кворуму;
  • роли user, operator и admin;
  • append-only журнал административных действий;
  • зашифрованный Backup & Disaster Recovery с переносом действующих credentials агентов;
  • русский и английский интерфейс;
  • Docker/Portainer-развёртывание, multi-arch образы amd64/arm64 и работа за reverse proxy.

Проактивные наблюдения

Обычный пороговый мониторинг отвечает на вопрос: «что уже вышло за допустимые пределы?» Отдельный слой Observations пытается раньше заметить другое: «что ведёт себя необычно для конкретного сервера, хотя warning ещё не достигнут?»

Для CPU и RAM MirvMon строит контекстный профиль по истории до восьми недель. Нагрузка сравнивается прежде всего с тем же днём недели и локальным временем, затем с более широкими временными контекстами. Поэтому обычные дневные 25–70% CPU не должны считаться аномалией только потому, что ночью этот же сервер работает на 5–10%.

Одно непрерывное отклонение считается одним эпизодом даже при изменении уровня нагрузки. Кратковременное ослабление признака аномалии не считается восстановлением: для закрытия observation требуется устойчивый возврат к нормальному диапазону. Если нагрузка уже дошла до обычного warning threshold, сигнал передаётся incident pipeline, а observation не создаёт конкурирующую аварию.

Для дисков MirvMon анализирует тренд заполнения и оценивает время до warning-порога и полного заполнения. После заметной очистки старый тренд не продолжается механически — начинается новый участок анализа. Алиасы одного filesystem объединяются, чтобы один и тот же диск не порождал несколько одинаковых прогнозов.

Оператор может отметить эпизод как Проверено, не обучая систему считать его нормой. Отдельное действие Считать это нормальным создаёт обратимое контекстное исключение: учитываются день недели, время и диапазон нагрузки, поэтому, например, подтверждённый ночной backup не должен подавлять похожую нагрузку в рабочее время.

Начиная с v0.8.0 исход каждого predictive-эпизода можно отдельно оценить как полезный сигнал, обычное поведение, предотвращённую действием проблему или неясный результат. Эта оценка нужна для анализа качества и не меняет работу детектора.

Подробнее об истории появления Observations →

Надёжность и публичный статус

Раздел Аналитика → Отчёт о надёжности собирает эксплуатационную картину за 7 или 30 дней: доступность, полноту наблюдений, число и длительность инцидентов и среднее время восстановления для серверов и сайтов.

Если MirvMon получил меньше 95% ожидаемых измерений, availability не показывается как достоверная цифра. Недостаток данных не маскируется под высокий uptime.

Публичная страница /status включается только явно. Администратор выбирает конкретные серверы и сайты и задаёт им публичные имена. По умолчанию список пуст; внутренние адреса, метрики и подробности инцидентов наружу не публикуются.

Maintenance windows

Режим обслуживания в MirvMon означает «не будить оператора», а не «перестать наблюдать». Во время maintenance агенты и website checks продолжают работать, метрики и история сохраняются, а alerts/incidents фиксируются как обычно.

Если проблема возникла во время обслуживания и остаётся активной после окончания окна, MirvMon отправляет одно явно помеченное post-maintenance уведомление. Если проблема успела начаться и закончиться внутри maintenance, догоняющей пары trigger/recovery после окна не будет.

Состояние проекта

Статус: активная разработка; текущий стабильный релиз — v0.8.0.
Платформы: сервер — Docker/Portainer; агенты — Linux и Windows.
Технологии: PHP 8.5, Slim 4, Twig 3, FrankenPHP, PostgreSQL 17, TimescaleDB, Go, Bootstrap 5, Chart.js.
Лицензия: MIT.

Что изменилось в MirvMon после v0.7.0 →

Ссылки

Исходный код · Релизы · Установка · Скриншоты · Сообщить об ошибке

История релизов

v0.8.0 — MirvMon v0.8.0

MirvMon v0.8.0

Что изменилось

  • Отчёт /reports/reliability показывает надёжность серверов и сайтов за 7 или 30 дней, полноту наблюдений, длительность инцидентов и среднее время восстановления. При недостаточной полноте доступность не выводится.
  • Администратор может явно выбрать объекты и публичные имена для /status в /admin/public-status. По умолчанию список пуст; публичный ответ не содержит внутренних адресов, метрик и деталей инцидентов.
  • Оператор может отметить исход каждого эпизода predictive observation. Оценка не изменяет детектор и уведомления. Анализ исходного качества и ограничения метрики confidence описаны в docs/predictive-quality.md.

Обновление

Используйте ghcr.io/mirivlad/mirvmon:0.8.0. Перед обновлением сделайте резервную копию БД. Миграции 029 и 030 выполняются автоматически; старые явно принятые как нормальные аномалии получают соответствующую оценку. Новых сервисов Compose, переменных окружения и изменений протокола агента нет.

v0.7.7 — MirvMon v0.7.7

MirvMon v0.7.7

Исправления

  • Инцидент сайта закрывается после двух последовательных успешных проверок. Счётчики результатов ограничены порогами переходов, поэтому длительная нормальная работа больше не переполняет PostgreSQL smallint и не останавливает проверки.
  • Карточка «Критично» открывает список сайтов с соответствующими состояниями. Пустой результат фильтра теперь отличается от отсутствия сайтов.
  • Задания проверки сайта после десятой неудачной попытки переходят в конечное состояние failed. Задания с истёкшей арендой также переводятся в него, а ручная проверка может поставить новое задание. /admin/system показывает состояние очереди проверок.

Диагностика и производительность

  • bin/benchmark-websites теперь честно показывает чтение raw проб для точной доступности за последние 24 часа и использует более представительную историю для 50 и 1000 сайтов. Два запроса к модели чтения сохранены; изменение SQL без подтверждённого выигрыша не включено.

Обновление

Используйте ghcr.io/mirivlad/mirvmon:0.7.7. Перед обновлением сделайте резервную копию БД. Миграция 028_website_check_job_terminal.sql выполняется автоматически; ранее исчерпавшие попытки задания переводятся в failed без изменения статусов сайтов и инцидентов вручную. Новых переменных окружения и сервисов Compose нет.

v0.7.6 — MirvMon v0.7.6

MirvMon v0.7.6

What changed

  • Fixed a UI regression where the literal characters \\n were rendered above application pages.
  • The regression affected both the main application layout and the login/setup layout.
  • Added a contract test so literal escaped newline sequences cannot silently reappear in shared document heads.

Upgrade

Use:

ghcr.io/mirivlad/mirvmon:0.7.6

No database migration, agent protocol change, agent reinstall, new Compose service or new configuration is required.

v0.7.5 — MirvMon v0.7.5

MirvMon v0.7.5

What changed

  • Maintenance windows continue collecting agent metrics and running website checks; metric history, alerts and incidents are still recorded.
  • Notifications suppressed specifically by maintenance are now retained as deferred delivery state.
  • When maintenance ends, MirvMon sends one explicit post-maintenance notification if the underlying alert or observation is still active.
  • Problems that start and recover entirely inside maintenance remain silent: there is no delayed trigger/recovery pair after the window.
  • The behavior is shared by server metric/service alerts, offline incidents, website incidents and proactive observations.
  • Post-maintenance messages explicitly state that the problem survived maintenance and preserve the original event time when available.
  • Migration 027 adds the durable deferral state. Current code also tolerates the previous schema revision during DR acceptance.

Upgrade

Use:

ghcr.io/mirivlad/mirvmon:0.7.5

Migration 027 is applied automatically on startup.

No agent protocol change, agent reinstall, new Compose service or new configuration is required.

v0.7.4 — MirvMon v0.7.4

MirvMon v0.7.4

What changed

  • MirvMon now has one canonical visual identity across the product UI.
  • The main navbar uses the MirvMon telemetry mark and wordmark instead of the previous Font Awesome placeholder.
  • Login and initial setup screens use the same brand component.
  • The browser favicon is now the same MirvMon mark used by the interface, removing the previous mismatch between product branding and tab icon.
  • The wordmark adapts to the existing UI surfaces: a light variant on the dark navbar and the standard dark/blue variant on light auth screens.

Upgrade

Use:

ghcr.io/mirivlad/mirvmon:0.7.4

No database migration, agent protocol change, agent reinstall, new Compose service or new configuration is required.

v0.7.3 — MirvMon v0.7.3

MirvMon v0.7.3

What changed

  • CPU/RAM proactive analysis now uses deterministic level_shift_v2 contextual baselines instead of one all-hours median.
  • Up to 56 days of hourly history are interpreted in APP_TIMEZONE; the worker prefers the same weekday/hour (±1h), then weekday-vs-weekend/hour, then hour-of-day. The learned range uses hourly minima/maxima so ordinary short peaks survive aggregation. No contextual history means no anomaly rather than a global fallback.
  • Anomaly lifecycle now has real hysteresis: a missing strict trigger is only elevated, crossing the configured warning threshold is incident_owned, and recovery requires twelve consecutive normal 5-minute buckets.
  • Recovery uses the current contextual boundary but still requires a full stable hour, so planned night/day transitions can end an old episode without instant context-boundary flapping.
  • “Treat as normal” becomes contextual for v2: weekday/hour and bounded load range are learned, while existing v1 operator-approved patterns remain usable as compatibility hints.
  • Observation UI and notifications show the expected range for the current context, its median and history depth.

Upgrade

Use:

ghcr.io/mirivlad/mirvmon:0.7.3

Migration 026 resolves any still-open level_shift_v1 anomaly episodes so the new detector starts clean. Accepted-normal v1 rows are preserved.

No agent protocol change, agent reinstall, new Compose service or new configuration is required. APP_TIMEZONE is the operational timezone used by the contextual model; deployments should keep it set to the timezone in which their workload schedule is understood.

v0.7.2 — MirvMon v0.7.2

MirvMon v0.7.2

v0.7.2 fixes anomaly episode semantics and notification navigation discovered during the first production use of proactive Observations.

What changed

  • One continuous CPU/RAM anomaly now remains one observation even while the measured value moves through several fingerprint bands. The first detection notifies; later growth only refreshes the same episode.
  • A recovered anomaly starts a new independent episode and can notify again. Resolved history is no longer treated as a lifetime notification suppression for that pattern.
  • Anomalies now expose Проверено / Reviewed in addition to Считать это нормальным. Reviewing acknowledges only the current episode; it does not teach MirvMon that the behavior itself is normal.
  • accepted_normal remains explicit, reversible pattern learning. A materially different anomaly pattern can still surface.
  • Migration 025 collapses duplicate open anomaly rows left by v0.7.0/v0.7.1 and enforces one open anomaly episode per server + metric + detector while preserving prediction fingerprint uniqueness.
  • Notification formatting now keeps every relevant internal link. Observation messages contain both a direct server-detail link and an observation link; server alerts, warnings and recovery messages link directly to the server when PUBLIC_BASE_URL is configured.

Upgrade

Pull ghcr.io/mirivlad/mirvmon:0.7.2 and redeploy the existing Compose stack.

Migration 025 is automatic. No agent update or protocol change is required. Existing duplicate active anomaly observations are normalized during migration, keeping the most recently seen episode open.

v0.7.1 — MirvMon v0.7.1

MirvMon v0.7.1

v0.7.1 is a hotfix for duplicate disk-growth observations introduced with proactive Observations in v0.7.0.

What changed

  • Disk forecasts now collapse mount aliases that strongly represent the same filesystem instead of treating every disk_used_* metric as an independent disk.
  • Alias detection is deliberately conservative: filesystem size, current usage and at least one day of overlapping hourly history must match within tight tolerances.
  • disk_used_root is preferred as the canonical metric when / is one of the aliases; otherwise MirvMon uses a stable metric-name order.
  • The canonical forecast uses the lowest warning threshold from the alias group so a stricter alias threshold is not ignored.
  • Existing active or handled duplicate predictions are resolved immediately when the next observation cycle recognizes the aliases. The canonical fingerprint and notification cycle are preserved, so an already-sent root prediction is not sent again.
  • Forecast notifications now label the confidence value as forecast quality and list equivalent filesystem metrics when aliases were collapsed.

Upgrade

Pull ghcr.io/mirivlad/mirvmon:0.7.1 and redeploy the existing Compose stack.

No database migration, configuration change, agent reinstall, or agent protocol change is required. The fix is entirely server-side and works with existing native agents that already report disk_used_* and disk_total_gb_* metrics.

v0.7.0 — MirvMon v0.7.0

MirvMon v0.7.0

v0.7.0 adds proactive Observations: a separate, explainable layer for behavior changes and maintenance forecasts that appear before ordinary incident thresholds are crossed.

What changed

  • Added a dedicated Observations domain and UI, separate from Incidents / Events, with active, history, and accepted-normal views.
  • Added deterministic CPU/RAM sustained and recurrent level-shift detection based on each server's own robust historical baseline.
  • Added disk-growth forecasting with cleanup-aware trend segmentation, quality gates, and projections for warning/full thresholds.
  • Added a supervised observation-worker that analyzes existing TimescaleDB history server-side without changing the native-agent protocol or adding another Compose service.
  • Added one-notification-per-episode deduplication and safe rearm behavior: handled forecasts stay quiet until the condition actually clears, then a later independent episode may notify again.
  • Added operator feedback actions: mark a prediction as handled, accept an anomaly as normal behavior, or return an accepted pattern to analysis. Operator actions are recorded in the append-only audit log.
  • Reused the existing per-server Telegram/SMTP recipients and outbox pipeline for observation notifications without creating fake incident rows.
  • Added database migration 024_observations.sql, RU/EN UI strings, controller/state-machine/integration coverage, and a DR acceptance fixture that always validates restore from exactly one supported schema revision behind current.

Upgrade

Pull ghcr.io/mirivlad/mirvmon:0.7.0 and redeploy the existing Compose stack. Migration 024_observations.sql is applied by the normal migration path; no agent reinstall, agent-token rotation, or configuration change is required.

The new observation worker runs inside the existing application container under Supervisor. Existing agents continue to use the same protocol and credentials.

v0.6.9 — MirvMon v0.6.9

MirvMon v0.6.9

v0.6.9 is a behavior-preserving authorization cleanup release.

What changed

  • Added one RolePolicy for the canonical user, operator, and admin role catalog.
  • AdminMiddleware, OperatorMiddleware, AdminController, SystemController, and AuditController now consume the same policy instead of duplicating string comparisons.
  • User-role validation now uses that same catalog, so new role handling cannot drift independently from request authorization.
  • Existing route permissions are unchanged: users remain read-only, operators keep operational actions, and admin-only credentials/users/system/DR operations remain admin-only.

Upgrade

No database migration or configuration change is required. Pull ghcr.io/mirivlad/mirvmon:0.6.9 and redeploy the existing Compose stack.

Источник: GitHub Releases · данные кэшируются на сервере.