乐闻世界logo
搜索文章和话题

What are the common Prometheus Exporters and how to choose and use them?

2月21日 15:39

Common Prometheus Exporters and their use cases:

System Monitoring Exporters:

  1. Node Exporter:

    • Monitors Linux/Unix system metrics
    • Metrics: CPU, memory, disk, network, filesystem
    • Deployment: Run on each node
    • Example metrics: node_cpu_seconds_total, node_memory_MemAvailable_bytes
  2. Windows Exporter:

    • Monitors Windows systems
    • Supports WMI performance counters
    • Metrics: CPU, memory, processes, services

Database Exporters:

  1. MySQL Exporter:

    • Monitors MySQL/MariaDB
    • Metrics: connections, query performance, replication status
    • Configuration: DSN connection string
    • Example: mysql_global_status_threads_connected
  2. PostgreSQL Exporter:

    • Monitors PostgreSQL
    • Metrics: connections, queries, locks, replication
    • Supports extended metrics
  3. Redis Exporter:

    • Monitors Redis
    • Metrics: memory usage, connections, command statistics
    • Supports cluster mode

Application Exporters:

  1. Blackbox Exporter:

    • HTTP/HTTPS, TCP, ICMP probing
    • Used for availability monitoring
    • Configure modules to define probe parameters
  2. JMX Exporter:

    • Monitors Java applications
    • Gets metrics via JMX
    • Supports Kafka, Tomcat, etc.
  3. StatsD Exporter:

    • Compatible with StatsD protocol
    • Suitable for application instrumentation

Container and Cloud Platform Exporters:

  1. cAdvisor:

    • Container resource usage
    • Integrated in Kubelet
  2. Kube-State-Metrics:

    • Kubernetes object status
    • Pod, Deployment, Service, etc.

Deployment Example:

yaml
scrape_configs: - job_name: 'node' static_configs: - targets: ['node1:9100', 'node2:9100'] - job_name: 'mysql' static_configs: - targets: ['mysql-exporter:9104']

Best Practices:

  • Choose appropriate Exporter versions
  • Configure authentication and security
  • Monitor Exporter health
  • Use labels to distinguish different instances
标签:Prometheus