Hello,
Could someone please let me know if they have worked with pushing csv files data to prometheus using Fluentd.
here's an example of my configuration file
<source>
@type prometheus
</source>
<source>
@type tail
format csv
path /testing/ip.csv
pos_file /var/spool/td-agent/testing.pos
tag testing
keys key1,key2,key3
time_key key2
time_format %m/%d/%Y %H:%M:%S
</source>
<match **>
@type copy
format json
<store>
@type prometheus
<metric>
name key1
type gauge
desc The total Owner Array Name
key key1
</metric>
</store>
</match>
When I look at the fluentd log, this is what the output looks like
2017-06-29 14:40:37 +0000 [warn]: prometheus: failed to instrument a metric. error_class=ArgumentError error=#<ArgumentError: value must be a number> tag="testing" name="key1"
2017-06-29 14:40:37 +0000 [warn]: dump an error event: error_class=ArgumentError error="value must be a number" tag="testing" time=1498669768 record={ "key1"=>"0.000000"}.....
So based on this configuration with prometheus, it's listening to a specific port, when I go to the port, I do not see any data. I see the name and the type, but no value. Anybody have had to work with this in the past?
Thank you.