An open-source template sends Grok Bot cloud computer health metrics to Splunk
Source read in fullRead first
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
- 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.
- 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 indocs/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.pyand wrapperbin/run_emit.sh, Splunk Observability Cloud (ingest and API tokens, SignalFlow dashboard and detectors), GitHub Actions CI and gitleaks. - 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.
- 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/(directorychmod 700, fileschmod 600), or exportSPLUNK_O11Y_REALM,SPLUNK_O11Y_INGEST_TOKENandSPLUNK_O11Y_API_TOKEN. See.env.exampleand 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 printo11y 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 withpython3 bin/apply_dashboards.py --notify-email alerts@example.comafter replacing email. - Step 6: Create a 5-minute Grok Bot Routine using the
docs/setup.mdprompt.
- 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-emaildestination. - Read secrets from chmod 600 files or env and never print them.
- 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-runinbin/apply_dashboards.pybefore 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.