Skip to main content

kontiki-monitor

Part of the Kontiki suite — a compact open-source stack for startups and small teams that need ops without the heavy stack.

Full ops demo → Quickstart below.

Kontiki-monitor is a small, practical ops suite for Kontiki platforms — complete enough to run, simple enough to own.

Boomerang is the Kontiki alerting engine: YAML subscriptions match normalized alerts and route them to notifiers (email, Telegram, …). This repository ships two Kontiki services that plug into it: they judge Registry fleet state, registry lifecycle events (including recorded exceptions), and local disk occupation, then publish alert.normalized for those subscriptions and notifiers.

Service CLI Config Role
kontiki-monitor kontiki-monitor kontiki-monitor: in config/default.yaml (+ config/embedded.yaml) Fleet expectations, Registry state changes, and recorded exceptions → alerts
host-check-service host-check-service host-check: in config/host-check.yaml Local disk occupation (warning/critical %, paths); one instance per host

Quickstart — demo-app → Telegram

The quickstart runs

  • a demo Kontiki service (demo-app) as the business workload under watch
  • the ops stack that watches it: Registry, kontiki-monitor, Boomerang (subscription / alert-engine / notifiers), and MailHog (local SMTP sink so you can inspect email alerts without a real mailbox). Degrade the demo app; ops get a Telegram (and email) alert.

1. Telegram bot token (optional but needed for Telegram) — see NB — Telegram bot token and chat id:

cp stack/telegram_notifier_bot_token.yaml.example \
   stack/telegram_notifier_bot_token.yaml
# set app.telegram.bot_token from BotFather

2. Start the stack:

make stack-up

Optional — observe with kontiki-tui (dev dep via poetry install):

make tui

3. Target a chat — operator config already wired for registry degraded state changes:

# stack/subscription.yaml (excerpt)
app:
  subscriptions:
    platform-ops:          # owner_id → recipient_id at dispatch
      demo-app-degraded:   # rule_name (subscription id under that owner)
        status: active
        subscription:
          rule:
            category: kontiki.registry
            event_type: instance_state_changed
            criteria:
              all_of:
                - key: new_state
                  operator: eq
                  value: degraded
          endpoints:
            - telegram.ops_alerts   # <channel>.<endpoint_id> → telegram_notifier endpoints.ops_alerts
            - email.oncall         # <channel>.<endpoint_id> → email_notifier endpoints.oncall
# stack/telegram_notifier.yaml (excerpt)
app:
  endpoints:
    ops_alerts:
      chat_id: "YOUR_CHAT_ID"

Fleet expectation for the demo (monitor opens/recovers insufficient / missing as well):

# config/embedded.yaml (excerpt)
kontiki-monitor:
  expected_services:
    demo-app-service:
      min_active: 1

4. Trigger an alert:

make demo-app-degrade
# wait a few seconds (demo heartbeat is 5s)

Telegram looks like this:

Telegram notification when demo-app-service goes degraded

Email lands in MailHog: http://127.0.0.1:8025.

Recover and stop:

make demo-app-recover
make stack-down

Install

pip install kontiki-monitor

Entry points: kontiki-monitor and host-check-service (pass one or more --config YAML files). The Quickstart above uses Docker Compose instead of a local pip install.

(package on PyPI)

Integration tests

make run-amqp
make integration-test

NB — Telegram bot token and chat id

Needed only if you want Telegram in the quickstart (email via MailHog works without it).

Bot token

  1. Open Telegram and talk to @BotFather.
  2. Send /newbot and follow the prompts (display name + username ending in bot).
  3. BotFather replies with a token like 123456:ABC-DEF....
  4. Put it in stack/telegram_notifier_bot_token.yaml (from the .example file):
app:
  telegram:
    bot_token: "YOUR_BOT_TOKEN"

Keep that file local (it is gitignored).

Chat id (where alerts are sent)

  1. Start a chat with your new bot (press Start), or add it to a group.

  2. Send any message in that chat.

  3. Open in a browser (replace with your token):

    https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates

  4. In the JSON, find "chat":{"id": ...} — that number is your chat_id (for groups it is often negative).

  5. Set it in stack/telegram_notifier.yaml:

app:
  endpoints:
    ops_alerts:
      chat_id: "YOUR_CHAT_ID"

Use a string in YAML even though the value is numeric.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kontiki_monitor-0.1.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kontiki_monitor-0.1.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file kontiki_monitor-0.1.0.tar.gz.

File metadata

  • Download URL: kontiki_monitor-0.1.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.7 Linux/6.8.0-124-generic

File hashes

Hashes for kontiki_monitor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c87874b300c19825b8947471795aa18cf709fde82eb17eec8180b8b92b7c0f95
MD5 743a31d3f2caf508089002e05e5b79c1
BLAKE2b-256 668217a14ad94ef27de18e67b2a556aaa72e940148565704be911fd5046633ad

See more details on using hashes here.

File details

Details for the file kontiki_monitor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kontiki_monitor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.7 Linux/6.8.0-124-generic

File hashes

Hashes for kontiki_monitor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a91ac42cee9ac557b4b6a2b48420262336c987f6608d6f8d5fa8ecae8f5d1042
MD5 98597d693bd6b8f9d1b200f5d81bf37c
BLAKE2b-256 19d03fcc5b26264054be4fa69e13814ecc93d0c5ba52fec57f2e9533f073d34c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.0

2 files

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page