Files
homelab-optimized/docs/services/individual/grafana.md
Gitea Mirror Bot 17c65dcd3c
Some checks failed
Documentation / Build Docusaurus (push) Failing after 8s
Documentation / Deploy to GitHub Pages (push) Has been skipped
Sanitized mirror from private repository - 2026-03-07 09:20:44 UTC
2026-03-07 09:20:44 +00:00

4.6 KiB

Grafana

🟡 Monitoring Service

📋 Service Overview

Property Value
Service Name grafana
Host homelab_vm
Category Monitoring
Difficulty 🟡
Docker Image grafana/grafana-oss:latest
Compose File homelab_vm/prometheus_grafana_hub/docker-compose.yml
Directory homelab_vm/prometheus_grafana_hub

🎯 Purpose

Grafana is the open source analytics & monitoring solution for every database.

🚀 Quick Start

Prerequisites

  • Docker and Docker Compose installed
  • Basic understanding of REDACTED_APP_PASSWORD
  • Access to the host system (homelab_vm)

Deployment

# Navigate to service directory
cd homelab_vm/prometheus_grafana_hub

# Start the service
docker-compose up -d

# Check service status
docker-compose ps

# View logs
docker-compose logs -f grafana

🔧 Configuration

Docker Compose Configuration

container_name: grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD="REDACTED_PASSWORD"
image: grafana/grafana-oss:latest
ports:
- 3300:3000
restart: unless-stopped
volumes:
- grafana-data:/var/lib/grafana

Environment Variables

Variable Value Description
GF_SECURITY_ADMIN_USER admin Configuration variable
GF_SECURITY_ADMIN_PASSWORD ***MASKED*** Administrator password

Port Mappings

Host Port Container Port Protocol Purpose
3300 3000 TCP Web interface

Volume Mappings

Host Path Container Path Type Purpose
grafana-data /var/lib/grafana volume Service data

🌐 Access Information

Web Interface

  • HTTP: http://homelab_vm:3300

Default Credentials

Username: admin, Password: "REDACTED_PASSWORD" (change on first login)

🔒 Security Considerations

  • ⚠️ Consider adding security options (no-new-privileges)
  • ⚠️ Consider running as non-root user

📊 Resource Requirements

No resource limits configured

  • Minimum RAM: 512MB
  • Recommended RAM: 1GB+
  • CPU: 1 core minimum
  • Storage: Varies by usage

Resource Monitoring

Monitor resource usage with:

docker stats

🔍 Health Monitoring

⚠️ No health check configured Consider adding a health check:

healthcheck:
  test: ["CMD", "curl", "-f", "http://localhost:PORT/health"]
  interval: 30s
  timeout: 10s
  retries: 3

Manual Health Checks

# Check container health
docker inspect --format='{{.State.Health.Status}}' CONTAINER_NAME

# View health check logs
docker inspect --format='{{range .State.Health.Log}}{{.Output}}{{end}}' CONTAINER_NAME

🚨 Troubleshooting

Common Issues

Service won't start

  • Check Docker logs: docker-compose logs service-name
  • Verify port availability: netstat -tulpn | grep PORT
  • Check file permissions on mounted volumes

Can't access web interface

  • Verify service is running: docker-compose ps
  • Check firewall settings
  • Confirm correct port mapping

Performance issues

  • Monitor resource usage: docker stats
  • Check available disk space: df -h
  • Review service logs for errors

Metrics not collecting

  • Check target endpoints are accessible
  • Verify configuration syntax
  • Check network connectivity

Useful Commands

# Check service status
docker-compose ps

# View real-time logs
docker-compose logs -f grafana

# Restart service
docker-compose restart grafana

# Update service
docker-compose pull grafana
docker-compose up -d grafana

# Access service shell
docker-compose exec grafana /bin/bash
# or
docker-compose exec grafana /bin/sh

📚 Additional Resources

Services REDACTED_APP_PASSWORD grafana:

  • Grafana
  • Prometheus
  • Uptime Kuma
  • Node Exporter

This documentation is auto-generated from the Docker Compose configuration. For the most up-to-date information, refer to the official documentation and the actual compose file.

Last Updated: 2025-11-17
Configuration Source: homelab_vm/prometheus_grafana_hub/docker-compose.yml