Unattended cross-platform anomaly monitoring for the Measure ecosystem: fetch metric observations, detect irregular drops/spikes, deliver alerts.
Project description
Measure Monitor
Unattended cross-platform anomaly monitoring for the Measure ecosystem.
measure-monitor is the ecosystem's orchestrator, not an MCP product. It sits
one level above the products — which never import one another — and wires them
together: it fetches metric Observations from a source product (paid media
today), runs the SDK's shared anomaly detector, and delivers alerts to your
channels. Run it on a schedule for hands-off monitoring of irregular drops and
spikes.
┌── cron / /schedule ──────────────────────────────────────────────┐
│ measure-monitor run --config monitors.toml │
│ │
│ paid-media.get_metric_observations(metric) ← fetch + history │
│ │ │
│ ▼ detect_anomaly (SDK) ← shared brain │
│ irregular drop/spike? │
│ │ │
│ ▼ │
│ Slack / Teams / email ← centralized │
└───────────────────────────────────────────────────────────────────┘
Install
pip install measure-monitor # pulls in measure-paid-media-mcp + measure-sdk
measure login # one-time Google sign-in (from the SDK)
Configure
Describe what to watch in a JSON or TOML file — see examples/monitors.toml:
[[monitors]]
name = "spend-anomaly"
metric = "spend" # spend | revenue | conversions | clicks | impressions | roas | cpa | ctr
days = 7 # each period is a 7-day window
periods = 4 # 4 prior windows form the baseline
method = "z_score" # z_score | mad | pct_change
sensitivity = 3.0 # stdevs (z_score/mad) or fraction (pct_change)
[[monitors.channels]]
type = "console" # console | slack | teams | discord | email
Run
measure-monitor run --config monitors.toml # detect + deliver
measure-monitor run --config monitors.toml --dry-run # detect only, no delivery
Output is a JSON report. Exit code is 1 when any anomaly was found (0 = clean,
2 = error), so a cron wrapper can react to it.
Email delivery reads SMTP from the environment: MEASURE_SMTP_HOST,
MEASURE_SMTP_PORT, MEASURE_SMTP_USER, MEASURE_SMTP_PASSWORD, MEASURE_SMTP_FROM.
Schedule it
System cron — every hour:
0 * * * * cd /path/to/work && measure-monitor run --config monitors.toml >> monitor.log 2>&1
Claude Code /schedule — a cloud routine that runs the check and reacts to the
result in natural language (no config file needed; the agent has both MCPs
connected). Example prompt to schedule:
Every hour: use paid-media
get_metric_observationsfor spend and roas across all platforms; for any anomaly, deliver a summary with the alerts engine.
Both modes respect the ecosystem rule: products never import each other — only this orchestrator depends on more than one.
How it fits the ecosystem
- Source of truth for detection:
measure_sdk.detect_anomaly— the same brain every product uses, so results are comparable across platforms. - Extensible: as GA4 / SEO products expose
get_metric_observations, point a monitor at them; the runner is source-agnostic (it depends only on theObservationcontract).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file measure_monitor-0.1.0.tar.gz.
File metadata
- Download URL: measure_monitor-0.1.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
411051ab36203e53749deef3b3923149f368acc12327af8495f2babec57c049a
|
|
| MD5 |
cef785d2f30f0175d91de596a2eee204
|
|
| BLAKE2b-256 |
19731f0f660b7df4f46cea983d06778393fec659fb79ccdc51b87293ee292d2c
|
Provenance
The following attestation bundles were made for measure_monitor-0.1.0.tar.gz:
Publisher:
release.yml on measure-mcp/measure-monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
measure_monitor-0.1.0.tar.gz -
Subject digest:
411051ab36203e53749deef3b3923149f368acc12327af8495f2babec57c049a - Sigstore transparency entry: 2124182345
- Sigstore integration time:
-
Permalink:
measure-mcp/measure-monitor@90d4229c870e4b5258dacff575f5775091ba3053 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/measure-mcp
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@90d4229c870e4b5258dacff575f5775091ba3053 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file measure_monitor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: measure_monitor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96bd4da9127684a488f17c4b7494c864859312dad52be094b72bdd93cbae7bfe
|
|
| MD5 |
6e0e3b744fdd4e8394c57219a1fbdae4
|
|
| BLAKE2b-256 |
4337b4a840e5344d5f504dcd54a7389ac176c1840be107e373f892719d9e6b7a
|
Provenance
The following attestation bundles were made for measure_monitor-0.1.0-py3-none-any.whl:
Publisher:
release.yml on measure-mcp/measure-monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
measure_monitor-0.1.0-py3-none-any.whl -
Subject digest:
96bd4da9127684a488f17c4b7494c864859312dad52be094b72bdd93cbae7bfe - Sigstore transparency entry: 2124182370
- Sigstore integration time:
-
Permalink:
measure-mcp/measure-monitor@90d4229c870e4b5258dacff575f5775091ba3053 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/measure-mcp
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@90d4229c870e4b5258dacff575f5775091ba3053 -
Trigger Event:
workflow_dispatch
-
Statement type: