You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the ruby-style syntax to define fluentd configuration. I have a config block that looks like:
match('output.**')dotype:copystore{type:prometheusmetric{name:fluentd_output_status_num_records_totaltype:counterdesc'The total number of outgoing records'labels{tag'${tag}'}}}end
But when I try running the code, I get the error:
config error file=\"config/fluent.conf.rb\" error_class=Fluent::ConfigError error=\"type option must be 'counter', 'gauge', 'summary' or 'histogram'\"
I hunted down the line of code that was generating that error:
Right. type is one of reserved keywords in fluentd. BTW, we can't maintain Ruby DSL configuration and will make it deprecated because we don't have enough resources to maintain it. We recommend that you use the original format of fluentd.
<match output.**>
@type copy
<store>
@type prometheus
<metric>
name fluentd_output_status_num_records_total
type counter
desc "The total number of outgoing records"
<labels>
tag "${tag}"
</labels>
</metric>
</store>
</match>
I'm using the ruby-style syntax to define fluentd configuration. I have a config block that looks like:
But when I try running the code, I get the error:
config error file=\"config/fluent.conf.rb\" error_class=Fluent::ConfigError error=\"type option must be 'counter', 'gauge', 'summary' or 'histogram'\"
I hunted down the line of code that was generating that error:
fluent-plugin-prometheus/lib/fluent/plugin/prometheus.rb
Line 78 in b1421b5
I tweaked the error message that it output to write the keys of the
element
hash. I got:As far as I can tell, the
Fluent::Config::Element
class has some magic in it that turnstype
into@type
as a hash key.The text was updated successfully, but these errors were encountered: