telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

Telegraf-Haproxy Not working

Open SigbertUCE opened this issue 10 years ago • 1 comments

I am trying to use Haproxy as a input plugin and trying to send Output to InfluxDB.

Please let me know the fix for the below.

# # Read metrics of haproxy, via socket or csv stats page 

 [[inputs.haproxy]]
#   ## An array of address to gather stats about. Specify an ip on hostname
#   ## with optional port. ie localhost, 10.10.3.33:1936, etc.
# #   ## If no servers are specified, then default to 127.0.0.1:1936
servers = ["http://ccrc-hapxy-stg-01:1936"]
#   ## Or you can also use local socket
#   servers = ["socket:/var/lib/haproxy/stats"]
Below is the error stack trace i am getting.
 telegraf-0.13.1-1]$ 2016/06/20 02:55:00 Database creation failed: json: cannot unmarshal number into Go value of type client.Response
2016/06/20 02:55:00 Starting Telegraf (version 0.13.1)
2016/06/20 02:55:00 Loaded outputs: influxdb
2016/06/20 02:55:00 Loaded inputs: diskio mem system haproxy cpu disk kernel processes swap
2016/06/20 02:55:00 Tags enabled: host=ccrc-metrics-stg-01.cisco.com
2016/06/20 02:55:00 Agent Config: Interval:10s, Debug:false, Quiet:false, Hostname:"ccrc-metrics-stg-01.cisco.com", Flush Interval:10s 
2016/06/20 02:55:10 ERROR in input [kernel]: strconv.ParseInt: parsing "5424508880": value out of range
2016/06/20 02:55:10 ERROR in input [haproxy]: Unable to get valid stat result from 'http://ccrc-hapxy-stg-01:1936': %!s(<nil>)
2016/06/20 02:55:20 ERROR in input [kernel]: strconv.ParseInt: parsing "5424514567": value out of range
2016/06/20 02:55:20 ERROR in input [haproxy]: Unable to get valid stat result from 'http://ccrc-hapxy-stg-01:1936': %!s(<nil>)
2016/06/20 02:55:20 Output [influxdb] buffer fullness: 61 / 10000 metrics. Total gathered metrics: 61. Total dropped metrics: 0.
2016/06/20 02:55:20 Database creation failed: json: cannot unmarshal number into Go value of type client.Response
2016/06/20 02:55:20 Error writing to output [influxdb]: Could not write to any InfluxDB server in cluster
2016/06/20 02:55:30 ERROR in input [kernel]: strconv.ParseInt: parsing "5424519176": value out of range
2016/06/20 02:55:30 ERROR in input [haproxy]: Unable to get valid stat result from 'http://ccrc-hapxy-stg-01:1936': %!s(<nil>)
2016/06/20 02:55:30 Output [influxdb] buffer fullness: 94 / 10000 metrics. Total gathered metrics: 94. Total dropped metrics: 0.
2016/06/20 02:55:30 Database creation failed: json: cannot unmarshal number into Go value of type client.Response
2016/06/20 02:55:30 Error writing to output [influxdb]: Could not write to any InfluxDB server in cluster

Thanks, Sigbert

SigbertUCE avatar Jun 20 '16 17:06 SigbertUCE

dupe of #1019

sparrc avatar Jun 20 '16 17:06 sparrc