# Monitoring Configuration Fragment
# Optional for all services

[[elements]]
border_top = true
border_bottom = false
name = "monitoring_section_header"
title = "📊 Monitoring Configuration"
type = "section_header"

[[elements]]
default = false
help = "Enable monitoring and metrics collection"
name = "monitoring_enabled"
nickel_path = ["monitoring", "enabled"]
prompt = "Enable Monitoring"
type = "confirm"

[[elements]]
condition = "monitoring_enabled == true"
default = true
help = "Enable metrics collection from this service"
name = "monitoring_metrics_enabled"
nickel_path = ["monitoring", "metrics", "enabled"]
prompt = "Enable Metrics Collection"
type = "confirm"

[[elements]]
condition = "monitoring_enabled == true && monitoring_metrics_enabled == true"
default = 60
help = "Metrics collection interval in seconds (range: ${constraint.common.monitoring.metrics_interval.min}-${constraint.common.monitoring.metrics_interval.max})"
min = "${constraint.common.monitoring.metrics_interval.min}"
max = "${constraint.common.monitoring.metrics_interval.max}"
name = "monitoring_metrics_interval"
nickel_path = ["monitoring", "metrics", "interval"]
prompt = "Metrics Collection Interval (seconds)"
type = "number"
