grafana-tempo is a free and open-source high-scale distributed tracing backend. Grafana Tempo provides cost-effective, high-scale distributed tracing storage, integrating seamlessly with Grafana for trace visualization, serving as an alternative to Jaeger or AWS X-Ray
1. Prerequisites
2. Supported Operating Systems
This guide supports installation on:
3. Installation
RHEL/CentOS/Rocky Linux/AlmaLinux
# Install EPEL repository if needed
sudo dnf install -y epel-release
# Install grafana-tempo
sudo dnf install -y tempo
# Enable and start service
sudo systemctl enable --now tempo
# Configure firewall
sudo firewall-cmd --permanent --add-port=3200/tcp
sudo firewall-cmd --reload
# Verify installation
tempo --version
Debian/Ubuntu
# Update package index
sudo apt update
# Install grafana-tempo
sudo apt install -y tempo
# Enable and start service
sudo systemctl enable --now tempo
# Configure firewall
sudo ufw allow 3200
# Verify installation
tempo --version
Arch Linux
# Install grafana-tempo
sudo pacman -S tempo
# Enable and start service
sudo systemctl enable --now tempo
# Verify installation
tempo --version
Alpine Linux
# Install grafana-tempo
apk add --no-cache tempo
# Enable and start service
rc-update add tempo default
rc-service tempo start
# Verify installation
tempo --version
openSUSE/SLES
# Install grafana-tempo
sudo zypper install -y tempo
# Enable and start service
sudo systemctl enable --now tempo
# Configure firewall
sudo firewall-cmd --permanent --add-port=3200/tcp
sudo firewall-cmd --reload
# Verify installation
tempo --version
macOS
# Using Homebrew
brew install tempo
# Start service
brew services start tempo
# Verify installation
tempo --version
FreeBSD
# Using pkg
pkg install tempo
# Enable in rc.conf
echo 'tempo_enable="YES"' >> /etc/rc.conf
# Start service
service tempo start
# Verify installation
tempo --version
Windows
# Using Chocolatey
choco install tempo
# Or using Scoop
scoop install tempo
# Verify installation
tempo --version
Initial Configuration
Basic Configuration
# Create configuration directory
sudo mkdir -p /etc/tempo
# Set up basic configuration
# See official documentation for detailed configuration options
# Test configuration
tempo --version
5. Service Management
systemd (RHEL, Debian, Ubuntu, Arch, openSUSE)
# Enable service
sudo systemctl enable tempo
# Start service
sudo systemctl start tempo
# Stop service
sudo systemctl stop tempo
# Restart service
sudo systemctl restart tempo
# Check status
sudo systemctl status tempo
# View logs
sudo journalctl -u tempo -f
OpenRC (Alpine Linux)
# Enable service
rc-update add tempo default
# Start service
rc-service tempo start
# Stop service
rc-service tempo stop
# Restart service
rc-service tempo restart
# Check status
rc-service tempo status
rc.d (FreeBSD)
# Enable in /etc/rc.conf
echo 'tempo_enable="YES"' >> /etc/rc.conf
# Start service
service tempo start
# Stop service
service tempo stop
# Restart service
service tempo restart
# Check status
service tempo status
launchd (macOS)
# Using Homebrew services
brew services start tempo
brew services stop tempo
brew services restart tempo
# Check status
brew services list | grep tempo
Windows Service Manager
# Start service
net start tempo
# Stop service
net stop tempo
# Using PowerShell
Start-Service tempo
Stop-Service tempo
Restart-Service tempo
# Check status
Get-Service tempo
Advanced Configuration
See the official documentation for advanced configuration options.
Reverse Proxy Setup
nginx Configuration
upstream tempo_backend {
server 127.0.0.1:3200;
}
server {
listen 80;
server_name tempo.example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name tempo.example.com;
ssl_certificate /etc/ssl/certs/tempo.example.com.crt;
ssl_certificate_key /etc/ssl/private/tempo.example.com.key;
location / {
proxy_pass http://tempo_backend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Apache Configuration
<VirtualHost *:80>
ServerName tempo.example.com
Redirect permanent / https://tempo.example.com/
</VirtualHost>
<VirtualHost *:443>
ServerName tempo.example.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/tempo.example.com.crt
SSLCertificateKeyFile /etc/ssl/private/tempo.example.com.key
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:3200/
ProxyPassReverse / http://127.0.0.1:3200/
</VirtualHost>
HAProxy Configuration
frontend tempo_frontend
bind *:80
bind *:443 ssl crt /etc/ssl/certs/tempo.pem
redirect scheme https if !{ ssl_fc }
default_backend tempo_backend
backend tempo_backend
balance roundrobin
server tempo1 127.0.0.1:3200 check
Security Configuration
Basic Security Setup
# Set appropriate permissions
sudo chown -R tempo:tempo /etc/tempo
sudo chmod 750 /etc/tempo
# Configure firewall
sudo firewall-cmd --permanent --add-port=3200/tcp
sudo firewall-cmd --reload
# Enable SELinux policies (if applicable)
sudo setsebool -P httpd_can_network_connect on
Database Setup
See official documentation for database configuration requirements.
Performance Optimization
System Tuning
# Basic system tuning
echo 'net.core.somaxconn = 65535' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv4.tcp_max_syn_backlog = 65535' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Monitoring
Basic Monitoring
# Check service status
sudo systemctl status tempo
# View logs
sudo journalctl -u tempo -f
# Monitor resource usage
top -p $(pgrep tempo)
9. Backup and Restore
Backup Script
#!/bin/bash
# Basic backup script
BACKUP_DIR="/backup/tempo"
DATE=$(date +%Y%m%d_%H%M%S)
mkdir -p "$BACKUP_DIR"
tar -czf "$BACKUP_DIR/tempo-backup-$DATE.tar.gz" /etc/tempo /var/lib/tempo
echo "Backup completed: $BACKUP_DIR/tempo-backup-$DATE.tar.gz"
Restore Procedure
# Stop service
sudo systemctl stop tempo
# Restore from backup
tar -xzf /backup/tempo/tempo-backup-*.tar.gz -C /
# Start service
sudo systemctl start tempo
6. Troubleshooting
Common Issues
1. Service won't start:
# Check logs
sudo journalctl -u tempo -n 100
sudo tail -f /var/log/tempo/tempo.log
# Check configuration
tempo --version
# Check permissions
ls -la /etc/tempo
2. Connection issues:
# Check if service is listening
sudo ss -tlnp | grep 3200
# Test connectivity
telnet localhost 3200
# Check firewall
sudo firewall-cmd --list-all
3. Performance issues:
# Check resource usage
top -p $(pgrep tempo)
# Check disk I/O
iotop -p $(pgrep tempo)
# Check connections
ss -an | grep 3200
Integration Examples
Docker Compose Example
version: '3.8'
services:
tempo:
image: tempo:latest
ports:
- "3200:3200"
volumes:
- ./config:/etc/tempo
- ./data:/var/lib/tempo
restart: unless-stopped
Maintenance
Update Procedures
# RHEL/CentOS/Rocky/AlmaLinux
sudo dnf update tempo
# Debian/Ubuntu
sudo apt update && sudo apt upgrade tempo
# Arch Linux
sudo pacman -Syu tempo
# Alpine Linux
apk update && apk upgrade tempo
# openSUSE
sudo zypper update tempo
# FreeBSD
pkg update && pkg upgrade tempo
# Always backup before updates
tar -czf /backup/tempo-pre-update-$(date +%Y%m%d).tar.gz /etc/tempo
# Restart after updates
sudo systemctl restart tempo
Regular Maintenance
# Log rotation
sudo logrotate -f /etc/logrotate.d/tempo
# Clean old logs
find /var/log/tempo -name "*.log" -mtime +30 -delete
# Check disk usage
du -sh /var/lib/tempo
Additional Resources
---
Note: This guide is part of the HowToMgr collection. Always refer to official documentation for the most up-to-date information.