l24 monitor
l24 monitor
builds a monitor chain of source, matcher, and notifier. This page documents the current CLI model from
l24 monitor --help
.
Usage
l24 monitor [options]
Top-level options
--title
|
Notification title. Default:
l24 monitor notification
.
|
--schedule
|
Cron-style schedule. Default:
*/15 * * * *
.
|
--jitter
|
Add uniform sampled delay in milliseconds. |
-r
,
--repeat
|
Number of monitor runs.
0
means infinite.
|
Chain model
A monitor is defined as:
Source -> Matcher -> Notifier
Source types
http
http [--timeout ] [--header ] [--method ] [--split-lines]
Use this to query HTTP or HTTPS endpoints.
query
query [--from ] [--to ] [--prefix ] [--api ]
Use this to monitor results from logging24 itself. The
--prefix
option takes an index from
0
to
3
followed by the prefix value.
Matchers
count
count
is
lines
or
bytes
.
is one of
<
,
>
,
=
,
>=
,
<=
, or
!=
.
changed
changed [--show-diff] [--show-content] [--state-file ]
Detect changes between runs.
Notifiers
Notifiers are activated on the matcher outcome. The help text distinguishes
on-true
and
on-false
behavior conceptually; notifier actions themselves are:
notify console [--json]
|
Print to stdout on matcher success. |
notify webhook [--header]
|
POST to a URL on matcher failure.
may be
file://
.
|
notify pushover [--po-api-token
|
Send a Pushover notification on failure. |
Examples
l24 monitor query ".*ERROR.*" env://L24_READ_TOKEN --from "now - 15m" count lines > 0 notify console
l24 monitor http https://example.com/health --split-lines changed --show-diff notify console --json