'Unable to send metrics to graphite-exporter

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.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source