
- Tanga
- Monitoring
- Admin
- AI
The bot reports on itself
82
I wanted to see the whole Tanga system from the admin panel: is the bot alive, which scheduled jobs ran, what failed. One rule stayed in place — users' financial records live in a separately encrypted database that the panel can't open.
So the panel doesn't inspect the bot; the bot reports. Every 60 seconds it writes a heartbeat: when it started, which commit is running, library versions and when each scheduled job runs next. A scheduler listener records every job run with its duration and result, and the error handler records failures. Only the latest 2,000 runs and 500 errors are kept.
The panel only reads. If the last heartbeat is older than three minutes, the bot is shown as down. The heartbeat itself is kept out of the journal, otherwise it would add a line every minute.
The same day the finance page got an AI cost chart: day, week, month and year, with exact values under every bar. The current period is marked as unfinished — otherwise this month always looks cheaper than the last one.
Takeaway: let a service describe its own state, and let the dashboard only read it.