network_exporter icon indicating copy to clipboard operation
network_exporter copied to clipboard

no data

Open alemsas opened this issue 8 months ago • 0 comments

I want to get some netowork metrics like icmp,mtr,loss and etc from some sources to some destination,here is my configuration but with this config i dont get the values:

version: '3'
services:
  prometheus:
    image: prom/prometheus:v2.30.3
    container_name: prometheus
    volumes:
      - $PWD/prometheus:/etc/prometheus
      - prometheus_data:/prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--storage.tsdb.path=/prometheus'
    restart: unless-stopped
    ports:
      - "9091:9090"

  network-exporter:
    image: syepes/network_exporter:latest
    container_name: network-exporter
    network_mode: host
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
      - NET_RAW
    volumes:
      - ./network-exporter/network_exporter.yml:/app/cfg/network_exporter.yml:ro

volumes:
  prometheus_data:
 cat network-exporter/network_exporter.yml
log_level: info
log_format: text
telemetry:
  address: "0.0.0.0:9427"
  path: "/metrics"
ping:
  enabled: true
  privileged: true
  interfaces:
    - name: "x.x.x.x"
      description: "Ping from x"
      interval: "15s"
      timeout: "1s"
      targets:
        - "8.8.8.8"
        - "9.9.9.9"
        - "1.1.1.1"
    - name: "x.x.x.x"
      description: "x"
      interval: "15s"
      timeout: "1s"
      targets:
        - "8.8.8.8"
        - "9.9.9.9"
        - "1.1.1.1"
    - name: "x.x.x.x"
      description: "Ping from x"
      interval: "15s"
      timeout: "1s"
      targets:
        - "8.8.8.8"
        - "9.9.9.9"
        - "1.1.1.1"
cat prometheus/prometheus.yml
global:
  scrape_interval: 15s
scrape_configs:
  - job_name: 'network-exporter'
    metrics_path: '/metrics'
    static_configs:
      - targets: ['172.31.36.34:9427']

first is it possible to ping from some source to some destination and get the result seperatly for example here is my goal

ping -I x.x.x.x 8.8.8.8
ping -I y.y.y.y 8.8.8.8

and get the result for avg and other metrics seperetly from each source? second please fix my mistake,thank you!also my target is run and up on prometheus!

alemsas avatar Jun 17 '24 12:06 alemsas