API authentication via environment
155-api-auth-environment.yaml
Infrastructure
What this example does
API authentication via environment.
Checks and behavior
- Never put tokens in YAML; export IPSONIC_API_TOKEN in the check process environment.
Replace example.com, documentation IPs, secrets and thresholds before production use.
YAML configuration
# Never put tokens in YAML; export IPSONIC_API_TOKEN in the check process environment.
name: API authentication via environment
url: https://api.example.com/health
auth:
type: bearer
token_env: IPSONIC_API_TOKEN
tests:
status: {allow: [200]}
monitoring: {output: nagios, on_failure: critical}