Unable to send metrics to graphite-exporter

710 Views Asked by At

I am trying to send custom metrics to graphite exporter, using nc command, but unsuccessful. Here is the steps:

  • I wget the graphite exporter on my redhat machine using url : https://github.com/prometheus/graphite_exporter/releases/download/v0.7.1/graphite_exporter-0.7.1.linux-amd64.tar.gz

  • unzip the tar and execute in background using command :

    ./graphite_exporter & 
    
  • Now the graphite exporter listens on ports :

    netstat -ntpl

    tcp6 0 0 :::9108 :::* LISTEN 92554/./graphite_ex

    tcp6 0 0 :::9109 :::* LISTEN 92554/./graphite_ex

  • I am following this article (http://graphiteapp.org/quick-start-guides/feeding-metrics.html) to execute below commands with output mentioned:

           echo "foo.bar 1 `date +%s`" | nc -vz localhost 9108
           Ncat: Version 7.50 ( https://nmap.org/ncat )
           Ncat: Connected to 127.0.0.1:9108.
           Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.
    
  • I am able to telnet on port 9108 :

           telnet localhost 9108
           Trying 127.0.0.1...
           Connected to localhost.
           Escape character is '^]'.
           ^]
           telnet> quit
           Connection closed.
    

I am not sure what I am doing wrong to push the metrics to graphite exporter, Any help is highly appreciated.

1

There are 1 best solutions below

0
On

u use the wrong port, the webclient uses 9108 but metrics will be only accepted at 9109, like it is described in the README https://github.com/prometheus/graphite_exporter