Skip to main content

defaults

The defaults block allows you to configure global default values that apply to all probes and exporters. These settings control logging, service identification, probe location metadata, and self-monitoring capabilities.

Arguments

NameTypeDescriptionDefaultRequired
log_levelstringLog level for the application (debug, info, warn, error).infono
jobstringDefault job label attached to all exported metrics.zookoono
service_namestringService name used for identification in metrics and traces.zookoono
probe_zonestringZone identifier for the probe (e.g., eu-west-1, us-east-1).no
probe_locationobjectGeographic location of the probe (see probe_location block below).no
self_monitoringobjectSelf-monitoring configuration (see self_monitoring block below).no
metric_prefixstringDefault prefix for all metric names across all exporters.probe_no

probe_location Block

The probe_location block allows you to specify the geographic coordinates of the probe. This is useful for geo-distributed monitoring setups.

NameTypeDescriptionDefaultRequired
latitudefloatLatitude coordinate of the probe location.yes
longitudefloatLongitude coordinate of the probe location.yes

self_monitoring Block

The self_monitoring block enables internal observability for Zookoo itself. This is useful for debugging and monitoring the health of the probe.

NameTypeDescriptionDefaultRequired
enablebooleanEnable self-monitoring.falseno
otel_endpointstringOpenTelemetry collector endpoint for traces and metrics.http://localhost:4317no
pyroscope_endpointstringPyroscope endpoint for continuous profiling.http://localhost:9999no
service_namestringService name for self-monitoring data.zookoono
envstringEnvironment label for self-monitoring data.developmentno
tls_ignorebooleanSkip TLS certificate verification for self-monitoring endpoints.falseno

Example

Basic Configuration

defaults {
log_level = "info"
job = "zookoo"
service_name = "zookoo"
}

With Probe Location and Metric Prefix

defaults {
log_level = "info"
job = "zookoo-eu"
service_name = "zookoo"
probe_zone = "eu-west-1"
metric_prefix = "zookoo_"

probe_location {
latitude = 48.8566
longitude = 2.3522
}
}

metric_prefix is an optional string that, if provided, will be prepended to all metric names exported by all exporters. This can be useful for namespacing metrics in environments where multiple applications or services are sending metrics to the same backend. If not specified, the default prefix is probe_.

With Self-Monitoring

defaults {
log_level = "debug"
job = "zookoo"
service_name = "zookoo"

self_monitoring {
enable = true
otel_endpoint = "http://otel-collector:4317"
pyroscope_endpoint = "http://pyroscope:4040"
service_name = "zookoo-probe"
env = "production"
tls_ignore = false
}
}

Full Configuration

defaults {
log_level = "info"
job = "zookoo-prod"
service_name = "zookoo"
probe_zone = "us-east-1"
metric_prefix = "probe_"

probe_location {
latitude = 40.7128
longitude = -74.0060
}

self_monitoring {
enable = true
otel_endpoint = "http://otel-collector:4317"
pyroscope_endpoint = "http://pyroscope:4040"
service_name = "zookoo"
env = "production"
tls_ignore = false
}
}

Resources