send
Use case
Report an arbitrary value produced by another script/process (e.g. a batch
job’s row count, a custom metric) through cmt’s normal output pipeline,
without writing a dedicated module for it.
Configuration
| Field | Type | Meaning |
|---|---|---|
attribute |
string | required; the item is named send_<attribute> |
unit |
string | optional; unit for the item; default "" |
comment |
string | optional; item description; default "" |
Reads one line from stdin (up to a 5s wait) and reports it as the value of a
single CheckItem. Because that only makes sense for one deliberate
invocation, this check refuses to run at all unless the run’s --check
names it exactly - any other run (a --cron/daemon sweep, an unscoped ad
hoc run) silently skips it.
Output
| Item | Type | Meaning |
|---|---|---|
send_<attribute> |
string | the line read from stdin (datapoint) |
Example
checks:
- module: send
name: mysend
conf:
attribute: token1
comment: "a comment - send_token1 will be created in metrology"
unit: no_unitecho "42" | cmt --check mysend --report