Forum teuk.org

🕰️ Time-Turner Dashboard: A Cleaner Hourly Grafana View for Mediabot v3

in Mediabot · started by TeuK · 4w ago

TeuK · 4w ago

This update improves the Grafana dashboard shipped with Mediabot v3.

The previous dashboard was already useful, but it was tuned for short-term, high-activity monitoring. That is not always ideal for IRC communities, where a quiet channel can still be healthy and meaningful. A per-minute view can easily look empty, noisy, or misleading when the real activity pattern makes more sense over hours.

The new dashboard is designed to be easier to import, easier to read, and better suited to real-world Mediabot deployments.

Why this update?

The goal was simple:

import the dashboard
select Prometheus
start reading useful data

No panel-by-panel editing. No manual query rewrites. No confusing short-window graphs that only look good on very busy channels.

Mediabot can now be deployed as a single instance or as multiple instances across different systems. The dashboard needs to reflect that without becoming painful to use.

Hourly graphs instead of per-minute graphs

The biggest visual change is that activity panels now use hourly windows.

Instead of showing lines per minute or commands per minute, the dashboard now focuses on:

Lines / hour
Commands / hour

This is much more useful for low-to-medium activity IRC channels.

A quiet community should not look dead just because it does not generate enough traffic to make a five-minute rate graph interesting.

Hourly views make trends easier to see:

- which channels are active today
- which bot commands are actually used
- whether activity is increasing or fading
- whether a bot instance is alive and collecting metrics

Easier Grafana import

The dashboard now includes a hidden Prometheus datasource variable.

That keeps the dashboard portable while avoiding the need to edit every panel after import.

In practice, the expected workflow is:

1. Import the JSON dashboard in Grafana.
2. Select the Prometheus datasource when Grafana asks.
3. Open the dashboard.
4. Use the Bot and Channel selectors.

That is the kind of import experience a contrib dashboard should provide.

Better multi-instance support

The dashboard now treats multi-instance setups as a normal case.

A single Mediabot deployment may expose one bot. A larger setup may expose several bot instances, each with its own labels and channels.

The dashboard uses the instance_name label so that users can filter by bot instance or view all instances together.

Channel panels also avoid hiding the bot context when multiple instances are selected. This makes it clearer which bot/channel pair is producing activity.

Cleaner panel naming

Panel names were adjusted to describe what they really show.

Examples:

Lines / hour
Lines / hour by Bot / Channel
Commands / hour by Bot / Channel
Top Commands by Channel over selected range
Top Public Commands over selected range

This avoids the old ambiguity where a graph might say “per minute” while the actual useful view was really about longer-term activity.

Metrics expected by the dashboard

The dashboard expects Mediabot Prometheus metrics to be enabled for the instances that should appear in Grafana.

Typical metrics include:

mediabot_up
mediabot_irc_connected
mediabot_db_connected
mediabot_uptime_seconds
mediabot_channels_managed
mediabot_channel_lines_in_total
mediabot_channel_commands_total
mediabot_channel_commands_by_name_total
mediabot_commands_public_total
mediabot_commands_private_total
mediabot_commands_partyline_total
mediabot_commands_by_name_total
mediabot_auth_success_total
mediabot_auth_failure_total
mediabot_partyline_logins_total
mediabot_partyline_sessions_current
mediabot_build_info

If an instance does not expose metrics, it will not appear in the dashboard. That is expected.

A dashboard for real IRC usage

This is not just a cosmetic change.

The new dashboard is more aligned with how IRC bots are actually used:

- long-running processes
- quiet but meaningful communities
- multiple channels
- multiple bot instances
- occasional command bursts
- long idle periods

A monitoring dashboard should make that reality visible instead of punishing it.

Where to find it

The new dashboard lives under:

contrib/grafana/

The recommended JSON file is the hourly community dashboard.

Import it into Grafana, select Prometheus, and it should be ready to use without manual panel tuning.

Result

Mediabot v3 now ships with a cleaner Grafana dashboard that is:

- easier to import
- better for low-activity channels
- clearer for multi-instance setups
- more readable over real time ranges
- less dependent on manual Grafana adjustments

The Time-Turner has been adjusted: Mediabot activity now makes more sense over hours, not just minutes.

You must be logged in to reply.