This guide explains how to install and manage Prometheus and Grafana monitoring stack with authentication for the OpenTelemetry Audit Log PoC project.
The monitoring stack includes:
- Prometheus: Metrics collection and storage with AlertManager
- Grafana: Visualization and dashboarding with authentication
- Node Exporter: System metrics collection
- Kube State Metrics: Kubernetes cluster metrics
- Prometheus Operator: Kubernetes-native Prometheus management
- A running Kubernetes cluster (k3d or kind)
- Helm 3.x installed
- kubectl configured to access the cluster
# Install both Prometheus and Grafana
task monitoring:installThis will:
- Create a
monitoringnamespace - Install Prometheus
- Install Grafana with anonymous access
- Configure Grafana to use Prometheus as a data source
# Port-forward Grafana to localhost:3000
task monitoring:port-forward-grafanaDefault credentials:
- Username:
admin - Password: Check
.tools/grafana-passwordor runtask monitoring:get-grafana-password
# Port-forward Prometheus to localhost:9090
task monitoring:port-forward-prometheus# Install complete monitoring stack
task monitoring:install
# Install only Prometheus
task monitoring:install-prometheus
# Install only Grafana
task monitoring:install-grafana
# Check status of monitoring components
task monitoring:status
# Upgrade the monitoring stack
task monitoring:upgrade
# Uninstall the monitoring stack
task monitoring:uninstall