Skip to main content

An open-source template sends Grok Bot cloud computer health metrics to Splunk

GitHubGitHubpfrederiksen2026-11-24

Getting startedLimitsSource read in fullRead first
GitHubGitHubpfrederiksen2026-11-24

Open original

Overview

Monitor the Grok Bot cloud computer using a Python standard-library emitter and a 5-minute Routine that sends grokbot.* health metrics to Splunk Observability Cloud, with a Bot Health dashboard and alerts.

Workflow

  1. What it is: An unofficial guide and example code for health monitoring. Send Grok Bot box health and Routine heartbeats to Splunk Observability Cloud, formerly SignalFx. It includes a standard-library Python emitter, a wrapper loading secrets, a Bot Health dashboard and detectors. The README describes a community example unaffiliated with Splunk or xAI.
  2. Grok Bot parts used: A 5-minute Routine monitoring the Grok Bot cloud computer. The emitter sends grokbot.* gauges covering disk, memory, sync freshness and other box health. The example prompt is in docs/setup.md, which was not read during fetch. No x.ai/bot template links, skills, connectors, Pages or Vault. Not part of Grok Bot: bin/emit.py and wrapper bin/run_emit.sh, Splunk Observability Cloud (ingest and API tokens, SignalFlow dashboard and detectors), GitHub Actions CI and gitleaks.
  3. You need: Python 3.10+, a Splunk Observability Cloud organization and two org tokens. Standard library only with no pip install. Free Edition, up to 15 hosts, works. In Settings → Access Tokens create INGEST for metrics and API for the dashboard, both with 30-day default expiry and manual extension up to a year. Quickstart uses local commands and no server deployment.
  4. Install: Follow six README Quickstart steps.
    • Step 1: Create two org tokens in Settings → Access Tokens and extend their lifetime (default 30 days, up to one year).
    • Step 2: Write INGEST_TOKEN, API_TOKEN and REALM in ~/.config/grokbot-splunk-o11y/secrets/ (directory chmod 700, files chmod 600), or export SPLUNK_O11Y_REALM, SPLUNK_O11Y_INGEST_TOKEN and SPLUNK_O11Y_API_TOKEN. See .env.example and keep real files out of git.
    • Step 3: Dry run without network or tokens: python3 bin/emit.py --dry-run.
    • Step 4: Send with bin/run_emit.sh, which reads files if env is missing. Success can print o11y emit: ingest=200 points=7 mts~7 ms=42 sources_fail=none err=ok alert=no.
    • Step 5: Inspect dashboard and detector JSON with python3 bin/apply_dashboards.py --dry-run, then apply with python3 bin/apply_dashboards.py --notify-email alerts@example.com after replacing email.
    • Step 6: Create a 5-minute Grok Bot Routine using the docs/setup.md prompt.
  5. After install:
    • The 5-minute Routine triggers a combined batch of grokbot.* gauges for disk, memory and other box health.
    • Stay quiet unless two consecutive runs fail. Failure counting has a unit test in tests/test_failure_counter.py.
    • Apply Bot Health and four detectors as code: emitter silence, disk high, memory high and stale sync.
    • Alerts go to the --notify-email destination.
    • Read secrets from chmod 600 files or env and never print them.
  6. Did the author run it: The repository has no run records from the author. The README gives a sample success line (ingest=200 points=7 mts~7 ms=42 …) and no historical files, logs or screenshots. It does not identify which parts ran in Grok Bot. Unit tests cover payload, failure count and dashboard JSON. CI runs them on Python 3.10–3.13 and scans commit history with gitleaks.

Key points and results

  • Maturity: On 2026-11-24 it was under a day old (created 2026-11-23), with 1 commit, 1 star, 0 forks, 0 open issues or PRs and MIT license. README calls it an unofficial community guide and example.
  • Permissions and boundaries: Splunk O11y INGEST writes metrics and API changes dashboards and detectors and delivers alerts to the chosen email. Tokens are kept in chmod 600 files or env and never echoed. The repo includes SECURITY.md and CI gitleaks scans history. The code does not send messages, purchase or contact third parties.
  • Known limits: Basic metrics only: box health, heartbeat and emitter silence. Default 30-day token expiry needs manual extension up to one year. Free Edition caps at 15 hosts and you need an organization. README best practices call out metric cardinality and MTS budget.
  • Worth borrowing: Alert only after two consecutive failures to avoid false alarms from one blip (README and tests/test_failure_counter.py).
  • Worth borrowing: Manage dashboards and detectors as code and inspect them using --dry-run in bin/apply_dashboards.py before applying.
  • Worth borrowing: Use chmod 600 files, wrapper fallback loading, no printing and CI gitleaks scans.

Source

Platform
GitHub
Author
pfrederiksen
Published
Categories
Getting started, Limits

What this evidence label means

Source read in full

We read the source (post, article or transcript). That only means the original was read. It does not mean this site reproduced the author's results.

Read the editorial and evidence policy

Other cases in this scenario

This unofficial community project is independent of xAI. xAI has neither approved nor endorsed it. No sign-up. The methods and figures come from the original authors.