Configure Prometheus Metrics Server #43

Open
opened 2025-09-14 08:10:49 +00:00 by tonym · 0 comments
Owner

Prometheus Metrics Server Configuration Guide

Overview

Prometheus is a powerful open-source monitoring and alerting toolkit designed for reliability and scalability. It collects and stores metrics as time series data with dimensional data model.


Container Installation

Docker Run Command

docker run -d \
  --name=prometheus \
  --restart=unless-stopped \
  -p 9090:9090 \
  -v /mnt/user/appdata/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \
  -v /mnt/user/appdata/prometheus/data:/prometheus \
  -u 99:100 \
  prom/prometheus:latest \
  --config.file=/etc/prometheus/prometheus.yml \
  --storage.tsdb.path=/prometheus \
  --web.console.libraries=/etc/prometheus/console_libraries \
  --web.console.templates=/etc/prometheus/consoles \
  --web.enable-lifecycle \
  --storage.tsdb.retention.time=30d

Docker Compose

version: "3.8"
services:
  prometheus:
    image: prom/prometheus:latest
    container_name: prometheus
    restart: unless-stopped
    ports:
      - "9090:9090"
    volumes:
      - /mnt/user/appdata/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
      - /mnt/user/appdata/prometheus/data:/prometheus
      - /mnt/user/appdata/prometheus/rules:/etc/prometheus/rules
    user: "99:100"
    command:
      - "--config.file=/etc/prometheus/prometheus.yml"
      - "--storage.tsdb.path=/prometheus"
      - "--web.console.libraries=/etc/prometheus/console_libraries"
      - "--web.console.templates=/etc/prometheus/consoles"
      - "--web.enable-lifecycle"
      - "--storage.tsdb.retention.time=30d"
      - "--web.enable-admin-api"

Container Configuration

Port Configuration

  • 9090: Web interface and API (HTTP)

Volume Mounts

  • /mnt/user/appdata/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml: Main configuration
  • /mnt/user/appdata/prometheus/data:/prometheus: Time series database
  • /mnt/user/appdata/prometheus/rules:/etc/prometheus/rules: Alert rules

Environment Variables

  • TZ: Timezone setting
  • PUID=99: User ID (nobody)
  • PGID=100: Group ID (users)

Initial Configuration

Create Directory Structure

mkdir -p /mnt/user/appdata/prometheus/{data,rules}
chown -R 99:100 /mnt/user/appdata/prometheus/

Main Configuration File

Create /mnt/user/appdata/prometheus/prometheus.yml:

global:
  scrape_interval: 15s
  evaluation_interval: 15s

rule_files:
  - "/etc/prometheus/rules/*.yml"

alerting:
  alertmanagers:
    - static_configs:
        - targets:
          - alertmanager:9093

scrape_configs:
  - job_name: "prometheus"
    static_configs:
      - targets: ["localhost:9090"]

  - job_name: "node-exporter"
    static_configs:
      - targets: ["192.168.0.5:9100"]
    scrape_interval: 5s

  - job_name: "cadvisor"
    static_configs:
      - targets: ["192.168.0.5:8080"]
    scrape_interval: 5s

  - job_name: "glances"
    static_configs:
      - targets: ["192.168.0.5:9091"]
    scrape_interval: 10s

  - job_name: "docker"
    static_configs:
      - targets: ["192.168.0.5:9323"]
    scrape_interval: 5s

  - job_name: "unraid"
    static_configs:
      - targets: ["192.168.0.5:9090"]
    scrape_interval: 30s
    metrics_path: /metrics

  - job_name: "blackbox"
    metrics_path: /probe
    params:
      module: [http_2xx]
    static_configs:
      - targets:
        - http://192.168.0.5:8096  # Jellyfin
        - http://192.168.0.5:7878  # Radarr
        - http://192.168.0.5:8989  # Sonarr
        - http://192.168.0.5:6767  # Bazarr
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: blackbox-exporter:9115

Service Configuration

Alert Rules

Create /mnt/user/appdata/prometheus/rules/alerts.yml:

groups:
  - name: system.rules
    rules:
      - alert: HighCPUUsage
        expr: 100 - (avg(rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 80
        for: 5m
        labels:
          severity: warning
        annotations:
          summary: "High CPU usage detected"
          description: "CPU usage is above 80% for more than 5 minutes"

      - alert: HighMemoryUsage
        expr: (node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / node_memory_MemTotal_bytes * 100 > 90
        for: 5m
        labels:
          severity: critical
        annotations:
          summary: "High memory usage detected"
          description: "Memory usage is above 90% for more than 5 minutes"

      - alert: DiskSpaceLow
        expr: (node_filesystem_avail_bytes / node_filesystem_size_bytes) * 100 < 10
        for: 10m
        labels:
          severity: warning
        annotations:
          summary: "Disk space low"
          description: "Disk space is below 10% on {{ $labels.mountpoint }}"

      - alert: ContainerDown
        expr: up == 0
        for: 1m
        labels:
          severity: critical
        annotations:
          summary: "Container is down"
          description: "{{ $labels.job }} container has been down for more than 1 minute"

  - name: media.rules
    rules:
      - alert: MediaServerDown
        expr: probe_success{job="blackbox"} == 0
        for: 2m
        labels:
          severity: warning
        annotations:
          summary: "Media server unreachable"
          description: "{{ $labels.instance }} is not responding"

      - alert: DownloadStalled
        expr: rate(download_queue_size[10m]) == 0 and download_queue_size > 0
        for: 30m
        labels:
          severity: warning
        annotations:
          summary: "Downloads appear stalled"
          description: "Download queue has not changed in 30 minutes"

Recording Rules

Create /mnt/user/appdata/prometheus/rules/recording.yml:

groups:
  - name: recording.rules
    rules:
      - record: instance:cpu_usage:rate5m
        expr: 100 - (avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)
      
      - record: instance:memory_usage:ratio
        expr: (node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / node_memory_MemTotal_bytes
      
      - record: instance:disk_usage:ratio
        expr: (node_filesystem_size_bytes - node_filesystem_avail_bytes) / node_filesystem_size_bytes

Integration Points

With Grafana

  1. Add Prometheus Data Source:

    • URL: http://prometheus:9090
    • Access: Server (default)
    • HTTP Method: GET
  2. Import Dashboards:

    • Node Exporter: Dashboard ID 1860
    • Docker: Dashboard ID 193
    • Prometheus: Dashboard ID 3662

With Alertmanager

# alertmanager.yml
global:
  smtp_smarthost: "localhost:587"
  smtp_from: "alerts@yourdomain.com"

route:
  group_by: ["alertname"]
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 1h
  receiver: "web.hook"

receivers:
  - name: "web.hook"
    email_configs:
      - to: "admin@yourdomain.com"
        subject: "Prometheus Alert"
        body: |
          {{ range .Alerts }}
          Alert: {{ .Annotations.summary }}
          Description: {{ .Annotations.description }}
          {{ end }}

With Node Exporter

# Install node-exporter
docker run -d \
  --name=node-exporter \
  --restart=unless-stopped \
  -p 9100:9100 \
  -v "/proc:/host/proc:ro" \
  -v "/sys:/host/sys:ro" \
  -v "/:/rootfs:ro" \
  --pid="host" \
  --network="host" \
  prom/node-exporter:latest \
  --path.procfs="/host/proc" \
  --path.sysfs="/host/sys" \
  --collector.filesystem.mount-points-exclude="^/(sys|proc|dev|host|etc)($$|/)"

Monitoring & Notifications

Health Monitoring

# Check Prometheus health
curl http://localhost:9090/-/healthy

# Check configuration
curl http://localhost:9090/api/v1/status/config

# Check targets
curl http://localhost:9090/api/v1/targets

Query Examples

# CPU usage per core
rate(node_cpu_seconds_total[5m])

# Memory usage percentage
(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / node_memory_MemTotal_bytes * 100

# Disk I/O operations
rate(node_disk_io_time_seconds_total[5m])

# Container CPU usage
rate(container_cpu_usage_seconds_total[5m])

# Network traffic
rate(node_network_receive_bytes_total[5m])

Custom Metrics

# Custom application metrics
- job_name: "custom-app"
  static_configs:
    - targets: ["app:8080"]
  metrics_path: /metrics
  scrape_interval: 30s

Backup Configuration

Database Backup

#!/bin/bash
# Prometheus backup script
DATE=$(date +%Y%m%d_%H%M%S)
BACKUP_DIR="/mnt/user/backups/prometheus"

# Create snapshot
curl -XPOST http://localhost:9090/api/v1/admin/tsdb/snapshot

# Copy data
cp -r /mnt/user/appdata/prometheus/data $BACKUP_DIR/prometheus_$DATE

# Compress backup
tar -czf $BACKUP_DIR/prometheus_$DATE.tar.gz -C $BACKUP_DIR prometheus_$DATE
rm -rf $BACKUP_DIR/prometheus_$DATE

# Retain last 7 days
find $BACKUP_DIR -name "prometheus_*.tar.gz" -mtime +7 -delete

Configuration Backup

#!/bin/bash
# Backup configuration files
cp -r /mnt/user/appdata/prometheus/*.yml /mnt/user/backups/prometheus/config/
cp -r /mnt/user/appdata/prometheus/rules/ /mnt/user/backups/prometheus/config/

Testing Procedures

Connectivity Tests

# Test web interface
curl -I http://localhost:9090

# Test API
curl "http://localhost:9090/api/v1/query?query=up"

# Test configuration reload
curl -X POST http://localhost:9090/-/reload

Query Performance Tests

# Test query response time
prometheus_rule_evaluation_duration_seconds

# Check ingestion rate
rate(prometheus_tsdb_symbol_table_size_bytes[5m])

Alert Testing

# Trigger test alert
curl -X POST http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]=up{job="test"}

Troubleshooting

Common Issues

  1. Configuration Errors:

    # Validate configuration
    docker exec prometheus promtool check config /etc/prometheus/prometheus.yml
    
  2. Target Down:

    # Check target status
    curl http://localhost:9090/api/v1/targets | jq
    
  3. Storage Issues:

    # Check disk usage
    docker exec prometheus du -sh /prometheus
    

Performance Issues

# Check memory usage
docker stats prometheus

# Monitor query performance
curl "http://localhost:9090/api/v1/query?query=prometheus_engine_query_duration_seconds"

Log Analysis

# View logs
docker logs prometheus

# Monitor for errors
docker logs -f prometheus | grep -i error

Maintenance

Regular Updates

# Update Prometheus
docker pull prom/prometheus:latest
docker stop prometheus
docker rm prometheus
# Recreate with docker-compose up -d

Data Retention

# Configure retention policy
--storage.tsdb.retention.time=30d
--storage.tsdb.retention.size=10GB

Cleanup Old Data

# Manual cleanup
curl -X POST \
  "http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]=up{job=\"old-job\"}"

# Clean tombstones
curl -X POST http://localhost:9090/api/v1/admin/tsdb/clean_tombstones

Security Considerations

Authentication

# Basic auth (external proxy)
basic_auth_users:
  admin: $2b$12$hNf2lSsxfm0.i4a.1kVpSOVyBCfIB51VRjgBUyv6kdnyTlgWj81Ay

TLS Configuration

tls_server_config:
  cert_file: /etc/prometheus/prometheus.crt
  key_file: /etc/prometheus/prometheus.key

Network Security

  • Use firewall rules to restrict access
  • Implement reverse proxy with authentication
  • Regular security updates

Advanced Configuration

Federation

# Federation setup
- job_name: "federate"
  scrape_interval: 15s
  honor_labels: true
  metrics_path: "/federate"
  params:
    "match[]":
      - "{job=~\"prometheus|node|cadvisor\"}"
  static_configs:
    - targets:
      - "prometheus-child:9090"

Remote Storage

# Remote write configuration
remote_write:
  - url: "http://remote-storage:9201/write"
    queue_config:
      max_samples_per_send: 1000
      max_shards: 200
      capacity: 2500

Service Discovery

# Docker service discovery
- job_name: "docker"
  docker_sd_configs:
    - host: unix:///var/run/docker.sock
  relabel_configs:
    - source_labels: [__meta_docker_container_name]
      target_label: container

This guide provides comprehensive coverage of Prometheus monitoring server setup and configuration.

# Prometheus Metrics Server Configuration Guide ## Overview Prometheus is a powerful open-source monitoring and alerting toolkit designed for reliability and scalability. It collects and stores metrics as time series data with dimensional data model. --- ## Container Installation ### Docker Run Command ```bash docker run -d \ --name=prometheus \ --restart=unless-stopped \ -p 9090:9090 \ -v /mnt/user/appdata/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \ -v /mnt/user/appdata/prometheus/data:/prometheus \ -u 99:100 \ prom/prometheus:latest \ --config.file=/etc/prometheus/prometheus.yml \ --storage.tsdb.path=/prometheus \ --web.console.libraries=/etc/prometheus/console_libraries \ --web.console.templates=/etc/prometheus/consoles \ --web.enable-lifecycle \ --storage.tsdb.retention.time=30d ``` ### Docker Compose ```yaml version: "3.8" services: prometheus: image: prom/prometheus:latest container_name: prometheus restart: unless-stopped ports: - "9090:9090" volumes: - /mnt/user/appdata/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml - /mnt/user/appdata/prometheus/data:/prometheus - /mnt/user/appdata/prometheus/rules:/etc/prometheus/rules user: "99:100" command: - "--config.file=/etc/prometheus/prometheus.yml" - "--storage.tsdb.path=/prometheus" - "--web.console.libraries=/etc/prometheus/console_libraries" - "--web.console.templates=/etc/prometheus/consoles" - "--web.enable-lifecycle" - "--storage.tsdb.retention.time=30d" - "--web.enable-admin-api" ``` --- ## Container Configuration ### Port Configuration - **9090**: Web interface and API (HTTP) ### Volume Mounts - `/mnt/user/appdata/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml`: Main configuration - `/mnt/user/appdata/prometheus/data:/prometheus`: Time series database - `/mnt/user/appdata/prometheus/rules:/etc/prometheus/rules`: Alert rules ### Environment Variables - `TZ`: Timezone setting - `PUID=99`: User ID (nobody) - `PGID=100`: Group ID (users) --- ## Initial Configuration ### Create Directory Structure ```bash mkdir -p /mnt/user/appdata/prometheus/{data,rules} chown -R 99:100 /mnt/user/appdata/prometheus/ ``` ### Main Configuration File Create `/mnt/user/appdata/prometheus/prometheus.yml`: ```yaml global: scrape_interval: 15s evaluation_interval: 15s rule_files: - "/etc/prometheus/rules/*.yml" alerting: alertmanagers: - static_configs: - targets: - alertmanager:9093 scrape_configs: - job_name: "prometheus" static_configs: - targets: ["localhost:9090"] - job_name: "node-exporter" static_configs: - targets: ["192.168.0.5:9100"] scrape_interval: 5s - job_name: "cadvisor" static_configs: - targets: ["192.168.0.5:8080"] scrape_interval: 5s - job_name: "glances" static_configs: - targets: ["192.168.0.5:9091"] scrape_interval: 10s - job_name: "docker" static_configs: - targets: ["192.168.0.5:9323"] scrape_interval: 5s - job_name: "unraid" static_configs: - targets: ["192.168.0.5:9090"] scrape_interval: 30s metrics_path: /metrics - job_name: "blackbox" metrics_path: /probe params: module: [http_2xx] static_configs: - targets: - http://192.168.0.5:8096 # Jellyfin - http://192.168.0.5:7878 # Radarr - http://192.168.0.5:8989 # Sonarr - http://192.168.0.5:6767 # Bazarr relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: blackbox-exporter:9115 ``` --- ## Service Configuration ### Alert Rules Create `/mnt/user/appdata/prometheus/rules/alerts.yml`: ```yaml groups: - name: system.rules rules: - alert: HighCPUUsage expr: 100 - (avg(rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 80 for: 5m labels: severity: warning annotations: summary: "High CPU usage detected" description: "CPU usage is above 80% for more than 5 minutes" - alert: HighMemoryUsage expr: (node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / node_memory_MemTotal_bytes * 100 > 90 for: 5m labels: severity: critical annotations: summary: "High memory usage detected" description: "Memory usage is above 90% for more than 5 minutes" - alert: DiskSpaceLow expr: (node_filesystem_avail_bytes / node_filesystem_size_bytes) * 100 < 10 for: 10m labels: severity: warning annotations: summary: "Disk space low" description: "Disk space is below 10% on {{ $labels.mountpoint }}" - alert: ContainerDown expr: up == 0 for: 1m labels: severity: critical annotations: summary: "Container is down" description: "{{ $labels.job }} container has been down for more than 1 minute" - name: media.rules rules: - alert: MediaServerDown expr: probe_success{job="blackbox"} == 0 for: 2m labels: severity: warning annotations: summary: "Media server unreachable" description: "{{ $labels.instance }} is not responding" - alert: DownloadStalled expr: rate(download_queue_size[10m]) == 0 and download_queue_size > 0 for: 30m labels: severity: warning annotations: summary: "Downloads appear stalled" description: "Download queue has not changed in 30 minutes" ``` ### Recording Rules Create `/mnt/user/appdata/prometheus/rules/recording.yml`: ```yaml groups: - name: recording.rules rules: - record: instance:cpu_usage:rate5m expr: 100 - (avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) - record: instance:memory_usage:ratio expr: (node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / node_memory_MemTotal_bytes - record: instance:disk_usage:ratio expr: (node_filesystem_size_bytes - node_filesystem_avail_bytes) / node_filesystem_size_bytes ``` --- ## Integration Points ### With Grafana 1. **Add Prometheus Data Source**: - URL: `http://prometheus:9090` - Access: Server (default) - HTTP Method: GET 2. **Import Dashboards**: - Node Exporter: Dashboard ID 1860 - Docker: Dashboard ID 193 - Prometheus: Dashboard ID 3662 ### With Alertmanager ```yaml # alertmanager.yml global: smtp_smarthost: "localhost:587" smtp_from: "alerts@yourdomain.com" route: group_by: ["alertname"] group_wait: 10s group_interval: 10s repeat_interval: 1h receiver: "web.hook" receivers: - name: "web.hook" email_configs: - to: "admin@yourdomain.com" subject: "Prometheus Alert" body: | {{ range .Alerts }} Alert: {{ .Annotations.summary }} Description: {{ .Annotations.description }} {{ end }} ``` ### With Node Exporter ```bash # Install node-exporter docker run -d \ --name=node-exporter \ --restart=unless-stopped \ -p 9100:9100 \ -v "/proc:/host/proc:ro" \ -v "/sys:/host/sys:ro" \ -v "/:/rootfs:ro" \ --pid="host" \ --network="host" \ prom/node-exporter:latest \ --path.procfs="/host/proc" \ --path.sysfs="/host/sys" \ --collector.filesystem.mount-points-exclude="^/(sys|proc|dev|host|etc)($$|/)" ``` --- ## Monitoring & Notifications ### Health Monitoring ```bash # Check Prometheus health curl http://localhost:9090/-/healthy # Check configuration curl http://localhost:9090/api/v1/status/config # Check targets curl http://localhost:9090/api/v1/targets ``` ### Query Examples ```promql # CPU usage per core rate(node_cpu_seconds_total[5m]) # Memory usage percentage (node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / node_memory_MemTotal_bytes * 100 # Disk I/O operations rate(node_disk_io_time_seconds_total[5m]) # Container CPU usage rate(container_cpu_usage_seconds_total[5m]) # Network traffic rate(node_network_receive_bytes_total[5m]) ``` ### Custom Metrics ```yaml # Custom application metrics - job_name: "custom-app" static_configs: - targets: ["app:8080"] metrics_path: /metrics scrape_interval: 30s ``` --- ## Backup Configuration ### Database Backup ```bash #!/bin/bash # Prometheus backup script DATE=$(date +%Y%m%d_%H%M%S) BACKUP_DIR="/mnt/user/backups/prometheus" # Create snapshot curl -XPOST http://localhost:9090/api/v1/admin/tsdb/snapshot # Copy data cp -r /mnt/user/appdata/prometheus/data $BACKUP_DIR/prometheus_$DATE # Compress backup tar -czf $BACKUP_DIR/prometheus_$DATE.tar.gz -C $BACKUP_DIR prometheus_$DATE rm -rf $BACKUP_DIR/prometheus_$DATE # Retain last 7 days find $BACKUP_DIR -name "prometheus_*.tar.gz" -mtime +7 -delete ``` ### Configuration Backup ```bash #!/bin/bash # Backup configuration files cp -r /mnt/user/appdata/prometheus/*.yml /mnt/user/backups/prometheus/config/ cp -r /mnt/user/appdata/prometheus/rules/ /mnt/user/backups/prometheus/config/ ``` --- ## Testing Procedures ### Connectivity Tests ```bash # Test web interface curl -I http://localhost:9090 # Test API curl "http://localhost:9090/api/v1/query?query=up" # Test configuration reload curl -X POST http://localhost:9090/-/reload ``` ### Query Performance Tests ```promql # Test query response time prometheus_rule_evaluation_duration_seconds # Check ingestion rate rate(prometheus_tsdb_symbol_table_size_bytes[5m]) ``` ### Alert Testing ```bash # Trigger test alert curl -X POST http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]=up{job="test"} ``` --- ## Troubleshooting ### Common Issues 1. **Configuration Errors**: ```bash # Validate configuration docker exec prometheus promtool check config /etc/prometheus/prometheus.yml ``` 2. **Target Down**: ```bash # Check target status curl http://localhost:9090/api/v1/targets | jq ``` 3. **Storage Issues**: ```bash # Check disk usage docker exec prometheus du -sh /prometheus ``` ### Performance Issues ```bash # Check memory usage docker stats prometheus # Monitor query performance curl "http://localhost:9090/api/v1/query?query=prometheus_engine_query_duration_seconds" ``` ### Log Analysis ```bash # View logs docker logs prometheus # Monitor for errors docker logs -f prometheus | grep -i error ``` --- ## Maintenance ### Regular Updates ```bash # Update Prometheus docker pull prom/prometheus:latest docker stop prometheus docker rm prometheus # Recreate with docker-compose up -d ``` ### Data Retention ```bash # Configure retention policy --storage.tsdb.retention.time=30d --storage.tsdb.retention.size=10GB ``` ### Cleanup Old Data ```bash # Manual cleanup curl -X POST \ "http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]=up{job=\"old-job\"}" # Clean tombstones curl -X POST http://localhost:9090/api/v1/admin/tsdb/clean_tombstones ``` --- ## Security Considerations ### Authentication ```yaml # Basic auth (external proxy) basic_auth_users: admin: $2b$12$hNf2lSsxfm0.i4a.1kVpSOVyBCfIB51VRjgBUyv6kdnyTlgWj81Ay ``` ### TLS Configuration ```yaml tls_server_config: cert_file: /etc/prometheus/prometheus.crt key_file: /etc/prometheus/prometheus.key ``` ### Network Security - Use firewall rules to restrict access - Implement reverse proxy with authentication - Regular security updates --- ## Advanced Configuration ### Federation ```yaml # Federation setup - job_name: "federate" scrape_interval: 15s honor_labels: true metrics_path: "/federate" params: "match[]": - "{job=~\"prometheus|node|cadvisor\"}" static_configs: - targets: - "prometheus-child:9090" ``` ### Remote Storage ```yaml # Remote write configuration remote_write: - url: "http://remote-storage:9201/write" queue_config: max_samples_per_send: 1000 max_shards: 200 capacity: 2500 ``` ### Service Discovery ```yaml # Docker service discovery - job_name: "docker" docker_sd_configs: - host: unix:///var/run/docker.sock relabel_configs: - source_labels: [__meta_docker_container_name] target_label: container ``` This guide provides comprehensive coverage of Prometheus monitoring server setup and configuration.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tonym/NastyNAS#43
No description provided.