root@syslogserver:/usr/share/snmp/mibs# cat /etc/prometheus/prometheus.yml
# Sample config for Prometheus.

global:
  scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).

  # Attach these labels to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
  external_labels:
      monitor: 'example'

# Alertmanager configuration
alerting:
  alertmanagers:
  - static_configs:
    - targets: ['192.168.000.000:9093'] # prometheus Server IP

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s
    scrape_timeout: 5s

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
      - targets: ['192.168.000.000:9090'] # prometheus Server IP

  - job_name: 'snmp'
    static_configs:
      - targets: ['192.168.000.000'] # AXGATE UTM IP
        labels:
         device: axgate
    metrics_path: /snmp
    params:
      module: [if_mib]
      community: [00000]
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 192.168.000.000:9116  # The SNMP exporter's real hostname:port.
  - job_name: 'grafana_metrics'
    scrape_interval: 5s
    scrape_timeout: 5s

    static_configs:
      - targets: ['192.168.000.000:3000'] # prometheus Server IP

'기술 노트 > ubuntu' 카테고리의 다른 글

snmp-exporter-0.25 설치하기  (0) 2023.12.21
snmp-mibs-downloader snmp snmpd 다운로드  (0) 2023.12.21
Prometheus 설치  (1) 2023.12.21
kibana 설정하기  (1) 2023.12.05
logstash 설정하기  (1) 2023.12.04

+ Recent posts