This page is a systematic reference, one section per top-level CUE
definition in config/schema.cue. For a guided, example-driven walkthrough
of building a config against this schema, see CUE in
practice instead.
| Field |
Type |
Default |
Constraint |
address |
string |
— |
required, non-empty |
parents |
[...string] |
[] |
— |
vars |
#Vars |
{} |
see #Vars |
check |
#Check |
— |
required |
services |
{[Name=string]: #Service} |
{} |
— |
notification |
string |
"" |
empty means the host never notifies |
zone |
string |
"default" |
non-empty |
labels |
#Labels |
{} |
see #Labels |
| Field |
Type |
Default |
Constraint |
vars |
#Vars |
{} |
see #Vars |
check |
#Check |
— |
required |
notification |
string |
"" |
empty means the service never notifies |
zone |
string |
"" |
empty inherits the host’s zone |
labels |
#Labels |
{} |
see #Labels |
Embedded by every branch of #Checks.
| Field |
Type |
Default |
Constraint |
check_interval |
time.Duration |
"60s" |
— |
retry_interval |
time.Duration |
"15s" |
— |
timeout |
time.Duration |
"10s" |
— |
max_attempts |
int |
3 |
>=1 |
flap |
#Flap |
— |
required, see #Flap |
| Field |
Type |
Default |
Constraint |
enabled |
bool |
true |
— |
alpha |
number |
0.1 |
>0 & <=1 |
high_threshold |
number |
0.3 |
>=0 & <=1 |
low_threshold |
number |
0.15 |
>=0 & <=high_threshold |
Every branch unifies #Schedule with its own type-specific fields;
type is the discriminator and matches the branch’s key in #Checks.
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "tcp" |
address |
string |
— |
required, non-empty ("host:port") |
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "http" |
url |
string |
— |
required, non-empty |
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "dns" |
server |
string |
— |
required, non-empty ("host:port") |
name |
string |
— |
required, non-empty (record to resolve) |
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "icmp" |
host |
string |
— |
required, non-empty |
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "tls" |
address |
string |
— |
required, non-empty |
warn_within |
time.Duration |
"336h" |
— |
crit_within |
time.Duration |
"72h" |
— |
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "snmp" |
address |
string |
— |
required, non-empty |
oid |
string |
— |
required, non-empty |
community |
string |
— |
v2c; required, non-empty when set |
user |
string |
— |
v3 USM; required, non-empty when set |
auth_proto |
string |
"" |
"", "MD5", "SHA", "SHA224", "SHA256", "SHA384", "SHA512" |
auth_pass |
string |
"" |
— |
priv_proto |
string |
"" |
"", "DES", "AES", "AES192", "AES256", "AES192C", "AES256C" |
priv_pass |
string |
"" |
— |
warn |
string |
"" |
Nagios threshold range; mutually exclusive with expect |
crit |
string |
"" |
Nagios threshold range; mutually exclusive with expect |
expect |
string |
"" |
exact-match string; mutually exclusive with warn/crit |
Exactly one of community or user must be set — the schema enforces
this as a disjunction. auth_proto/auth_pass/priv_proto/priv_pass
are only meaningful alongside user.
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "legacy" |
path |
string |
— |
required, non-empty |
args |
[...string] |
[] |
— |
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "wasm" |
module |
string |
— |
required, non-empty (path to a .wasm file) |
args |
[...string] |
[] |
— |
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "command" |
command |
string |
— |
required, non-empty; key into the top-level commands map |
args |
[...string] |
[] |
— |
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "passive" |
freshness_threshold |
time.Duration |
— |
required, no default |
stale_status |
string |
"UNKNOWN" |
"UNKNOWN", "WARNING", "CRITICAL" |
timeout (from #Schedule) has no meaning for passive.
| Field |
Type |
Default |
Constraint |
weekday |
string |
— |
"sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" |
start |
string |
— |
=~"^([01][0-9]|2[0-3]):[0-5][0-9]$" |
end |
string |
— |
=~"^([01][0-9]|2[0-3]|24):[0-5][0-9]$" |
A window does not wrap past midnight; an overnight period is two windows.
end may be "24:00"; start may not.
| Field |
Type |
Default |
Constraint |
selector |
string |
— |
required; parsed with labels.NewSelector at decode time |
description |
string |
"" |
free text, not parsed |
The map key under views: is the display name and is deliberately
unconstrained — no pattern, unlike #Labels’ keys — because it is never
parsed.
| Position |
Pattern |
| key |
=~"^[a-z][a-z0-9_.-]*$" |
| value |
=~"^[a-zA-Z0-9][a-zA-Z0-9_.:/-]*$" |
Duplicated from labels.KeyPattern/labels.ValuePattern in
labels/pattern.go, the single source of truth; a test pins the two
copies together so drift fails the build.
| Position |
Pattern |
| key |
=~"^[A-Z][A-Z0-9_]*$" |
| value |
string |
A key PASSWORD on a host is referenced as $_HOSTPASSWORD$; on a
service, as $_SERVICEPASSWORD$.
| Position |
Pattern |
| key |
=~"^USER[0-9]+$" |
| value |
string |
A key that is not USER<digits> is a config error, not a silently
unreachable value.
Four discriminated variants of #Contact, each also carrying labels
(#Labels, default {}).
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "email" |
address |
string |
— |
required, non-empty |
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "webhook" |
url |
string |
— |
required, non-empty |
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "command" |
command |
string |
— |
required, non-empty; key into the top-level commands map |
args |
[...string] |
[] |
— |
address |
string |
"" |
what $CONTACTEMAIL$ expands to for this contact |
| Field |
Type |
Default |
Constraint |
type |
string |
— |
fixed "telegram" |
chat_id |
string |
— |
required, non-empty |
| Field |
Type |
Default |
Constraint |
period |
[...#Window] |
[] |
empty means “always notify” |
levels |
[...#EscalationLevel] |
— |
required, non-empty |
| Field |
Type |
Default |
Constraint |
contacts |
[...string] |
— |
required, non-empty |
threshold |
int |
0 |
>=0; 0 means never escalate past this level |
renotify_interval |
time.Duration |
"1h" |
— |
disabled_kinds |
[...string] |
[] |
each one of "PROBLEM", "RECOVERY", "STATUS_CHANGE", "FLAPPING_START", "FLAPPING_STOP" |
Every sink shares #SinkCommon, then adds its own type-specific fields.
The map key under sinks: matches =~"^[a-z][a-z0-9_-]*$".
| Field |
Type |
Default |
Constraint |
input |
string |
"metrics" |
"metrics" or "events" |
selector |
string |
"" |
a labels selector expression |
batch_size |
int |
1000 |
>0 |
flush_interval |
time.Duration |
"5s" |
— |
| Type |
Field |
Type |
Default |
Constraint |
clickhouse |
url |
string |
— |
required, non-empty |
clickhouse |
table |
string |
"perfdata" |
=~"^[A-Za-z_][A-Za-z0-9_]*$" |
remote_write |
url |
string |
— |
required, non-empty |
remote_write |
cursor |
string |
"" |
— |
archive |
url |
string |
— |
required, non-empty |
archive |
segment_bytes |
int |
67108864 |
>0 |
archive |
input |
string |
— |
fixed "events" |
http |
url |
string |
— |
required, non-empty |
http |
headers |
{[string]: string} |
{} |
— |
http |
cursor |
string |
"" |
— |
exec |
command |
[string, ...string] |
— |
required, non-empty |
exec |
cursor |
string |
"" |
— |
file |
path |
string |
— |
required, non-empty |
file |
rotate_bytes |
int |
67108864 |
>0 |
file |
cursor |
string |
"" |
— |
otlp |
url |
string |
— |
required, non-empty |
otlp |
headers |
{[string]: string} |
{} |
— |
otlp |
cursor |
string |
"" |
— |