Novij Monitoring Agent

Linux-агент мониторинга на базе Novij Protocol.

Linux monitoring agent for Novij Protocol.

RU EN

Последняя версияLatest: 0.6.07.021440

Стабильная версияStable: 0.6.06.231505

Описание

Details

Что делает

Novij Monitoring Agent - локальный Linux-агент для наблюдения за Ubuntu- и другими Linux-серверами. Он запускается как systemd-сервис, читает YAML-конфиг, выполняет включенные проверки по расписанию и хранит состояние в локальной SQLite-базе.

Агент создает дедуплицированные инциденты, сохраняет диагностический snapshot, ведет локальный журнал действий и готовит историю мониторинга для публикации в NTP через durable-очередь, spool export или внешний command bridge.

Проверки

  • Системные метрики: CPU, RAM, swap, load average, uptime, таблица открытых файлов и температуры.
  • Диски: свободное место, inode usage, прогноз заполнения и Disk I/O по счетчикам блочных устройств.
  • Сеть: throughput по интерфейсам и лимит трафика за заданное окно, например за 30 дней.
  • Сервисы и процессы: systemd units, Docker containers, process counts и synthetic test incident для RC-проверок.
  • Внешние и прикладные проверки: HTTP endpoints, SSL expiry/fingerprint, DNS records/changes, срок доменов через RDAP/WHOIS, content-change baseline, OS updates, log patterns и backup markers/commands.

Инциденты и история

  • Инциденты имеют severity, status, fingerprint и жизненный цикл open/updated/resolved, поэтому одинаковая проблема не создает новую карточку на каждом цикле.
  • Локальное хранилище ротируется по числу закрытых инцидентов и размеру SQLite, не теряя события, ожидающие отправки в NTP.
  • NTP history writer работает с retry/backoff и помечает события отправленными только после успешного завершения выбранного транспорта.

Telegram и отчеты

  • Алерты можно отправлять напрямую через Telegram Bot API или централизованно через Novij Telegram Service.
  • Через Telegram Service агент поддерживает live alert-карточки, reply с деталями, action buttons и generic commands через manifest/poll/reply.
  • Доступны диагностические команды status, servers, incidents, cpu, memory, disk, processes, docker, systemd, logs, healthcheck и details.
  • Ежедневный информационный отчет показывает активные инциденты, средние и пиковые CPU/load/RAM за 24 часа, запас диска и inodes, а также сетевой трафик.

Установка, обновления и безопасность

  • Пакет .deb ставит бинарь, systemd service, update service/timer, пример конфига и директории для данных и логов.
  • Обновления идут с package-site по каналам latest или stable; существующие пользовательские конфиги и локальные данные сохраняются при upgrade.
  • Server actions через Telegram по умолчанию выключены. При включении они требуют подтверждения от telegram-service и проходят allowlist для systemd-сервисов и Docker-контейнеров; произвольный shell из payload не выполняется.

What it does

Novij Monitoring Agent is a local Linux agent for observing Ubuntu and other Linux servers. It runs as a systemd service, reads a YAML configuration, executes enabled checks on schedule, and stores state in a local SQLite database.

The agent creates deduplicated incidents, stores diagnostic snapshots, keeps a local action journal, and prepares monitoring history for NTP through a durable queue, spool export, or an external command bridge.

Checks

  • System metrics: CPU, RAM, swap, load average, uptime, open file table, and temperatures.
  • Disks: free space, inode usage, fill forecast, and Disk I/O from block-device counters.
  • Network: interface throughput and traffic quotas for a configured window, for example 30 days.
  • Services and processes: systemd units, Docker containers, process counts, and a synthetic test incident for RC validation.
  • External and application checks: HTTP endpoints, SSL expiry/fingerprint, DNS records/changes, domain expiry through RDAP/WHOIS, content-change baseline, OS updates, log patterns, and backup markers/commands.

Incidents and history

  • Incidents have severity, status, fingerprint, and an open/updated/resolved lifecycle, so the same problem does not create a new card on every cycle.
  • The local store rotates by closed incident count and SQLite size without dropping events waiting for NTP delivery.
  • The NTP history writer uses retry/backoff and marks events as sent only after the selected transport succeeds.

Telegram and reports

  • Alerts can be delivered directly through the Telegram Bot API or centrally through Novij Telegram Service.
  • With Telegram Service, the agent supports live alert cards, detail replies, action buttons, and generic commands through manifest/poll/reply.
  • Diagnostic commands include status, servers, incidents, cpu, memory, disk, processes, docker, systemd, logs, healthcheck, and details.
  • The daily informational report shows active incidents, 24-hour average and peak CPU/load/RAM, disk and inode headroom, and network traffic.

Install, updates, and safety

  • The .deb package installs the binary, systemd service, update service/timer, example config, and data/log directories.
  • Updates are installed from the package site through latest or stable channels; existing user configs and local data are preserved during upgrades.
  • Telegram server actions are disabled by default. When enabled, they require confirmation from telegram-service and pass allowlists for systemd services and Docker containers; arbitrary shell payloads are not executed.

Установка

Install

Последняя:

Latest:

curl -fsSL https://packages.novij.tech/agents/monitoring/install.sh | sudo bash

Стабильная:

Stable:

curl -fsSL https://packages.novij.tech/agents/monitoring/install.sh | sudo env NOVIJ_PACKAGE_CHANNEL=stable bash

Релизы

Releases

Команды

Commands

novij-monitoring-agent init --wizard
Создаёт рабочий YAML-конфиг.Creates a working YAML config.
novij-monitoring-agent config validate
Проверяет конфиг и обязательные параметры.Validates the config and required parameters.
novij-monitoring-agent run --once
Выполняет один цикл проверок.Runs one check cycle.
novij-monitoring-agent status
Показывает состояние агента, инцидентов и очередей.Shows agent, incident, and queue status.
novij-monitoring-agent status current
Выполняет свежий срез включенных проверок.Runs a fresh read-only snapshot of enabled checks.
novij-monitoring-agent overview
Показывает настройку агента и состояние сервиса.Shows agent setup and service state.
novij-monitoring-agent update [--check] [--channel stable]
Проверяет или ставит обновление.Checks or installs an update.
novij-monitoring-agent checks list
Показывает доступные проверки и их состояние.Lists available checks and their state.
novij-monitoring-agent incidents list
Показывает последние инциденты.Lists recent incidents.
novij-monitoring-agent telegram setup-bot
Настраивает прямую отправку в Telegram Bot API.Configures direct Telegram Bot API delivery.
novij-monitoring-agent telegram report
Отправляет ежедневный информационный отчёт сейчас.Sends the daily informational report now.
novij-monitoring-agent telegram connect
Подключает алерты через Novij Telegram Service.Connects alert delivery through Novij Telegram Service.
novij-monitoring-agent telegram poll-actions
Получает действия пользователя по кнопкам Telegram.Polls Telegram button actions.
novij-monitoring-agent ntp status
Показывает очередь записи истории в NTP.Shows the NTP history queue status.
novij-monitoring-agent ntp key status
Проверяет NTP wallet-файл и права доступа.Checks the NTP wallet file and permissions.
novij-monitoring-agent version
Показывает версию, commit и метаданные сборки.Shows version, commit, and build metadata.

Частые сценарии

Common Scenarios

1. Первичная настройка после установки1. Initial setup after install
sudo novij-monitoring-agent init --wizard
sudo novij-monitoring-agent config validate
sudo systemctl enable --now novij-monitoring-agent.service
systemctl status novij-monitoring-agent.service
2. Базовый мониторинг сервера2. Basic server monitoring

Включите системные проверки CPU, RAM, disk, load и доступность сетевых endpoint. После изменения конфига запускайте validate и один dry-run цикл.

Enable system checks for CPU, RAM, disk, load, and endpoint availability. After config changes run validate and one dry-run cycle.

sudo novij-monitoring-agent config validate
sudo novij-monitoring-agent run --once
novij-monitoring-agent status current
3. Алерты в Telegram3. Telegram alerts

Для прямой отправки используйте Bot API. Для централизованной доставки и действий по кнопкам подключайте Novij Telegram Service.

Use Bot API for direct delivery. Use Novij Telegram Service for centralized delivery and button actions.

novij-monitoring-agent telegram setup-bot
novij-monitoring-agent telegram connect
novij-monitoring-agent telegram report
novij-monitoring-agent telegram poll-actions
4. Инциденты и текущий статус4. Incidents and current state
novij-monitoring-agent status
novij-monitoring-agent incidents list
novij-monitoring-agent checks list
novij-monitoring-agent overview
5. История мониторинга в NTP5. Monitoring history in NTP

Перед записью истории проверьте wallet-файл и очередь отправки в NTP.

Before writing history, check the wallet file and NTP delivery queue.

novij-monitoring-agent ntp key status
novij-monitoring-agent ntp status
6. Обновление агента6. Agent updates
novij-monitoring-agent update --check
sudo novij-monitoring-agent update
sudo novij-monitoring-agent update --channel stable