invalid_opt

Diagnostic `nanook::collectors::invalid_opt`

Summary

collector `{0}` rejected option `{1}` (value `{2}`)

Help

see the collector docs for valid values

Details

When this fires

A collector accepted the option key but rejected its value during build. The classic case is tcp with port outside 0..=65535 (see u16::try_from in crates/nanook-collectors/src/tcp.rs). Other collectors raise this through BuildError::invalid_opt(name, opt, value) when a value parses as the right primitive type but fails a domain check, like a malformed URL, an unknown enum label, or a duration that does not make sense for the probe.

What to check

Compare the rejected value against the collector's doc page for the accepted range or shape. For numeric ranges (ports, percentages), the TOML literal must be an integer, not a string. If the value came from ${...} expansion, print the resolved string.

[[collectors]]
name = "ssh"
kind = "tcp"
opts = { host = "10.0.0.5", port = 22, timeout = "3s" }