Skip to content

[FEATURE] - Observability: Prometheus metrics and audit logging #76

Description

@patrick-hermann-sva

Summary

Add Prometheus metrics and structured audit logging to provide observability into clusterbook's operations, pool utilization, and allocation activity.

Benefits

  • Alerting on pool exhaustion before it becomes a problem
  • Visibility into allocation rates and patterns
  • Audit trail for compliance and troubleshooting
  • Integration with existing monitoring stacks (Prometheus/Grafana)

Suggested Metrics

  • clusterbook_pool_total{network} — total IPs per pool
  • clusterbook_pool_assigned{network} — assigned IPs per pool
  • clusterbook_pool_available{network} — available IPs per pool
  • clusterbook_allocations_total — counter of allocation requests
  • clusterbook_allocation_errors_total — counter of failed allocations

Suggested Approach

  • Expose /metrics endpoint using prometheus/client_golang
  • Add structured JSON logging for all allocation/deallocation events
  • Include Grafana dashboard JSON in the Helm chart
  • Add ServiceMonitor CR template for Prometheus Operator

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions