Open misteryiz opened 5 years ago
metric name must match /[a-zA-Z:][a-zA-Z0-9:]*/
Please read the log. the name name "$['details']['metrics'][0]['metric_name']"
is invalid. can you try to use other name?
I understand the log, But I would like to use the name that exists in the log already and I'm trying to assign the value of the key (which is $['details']['metrics'][0]['metric_name'] = 'http_responses_receivedtotal'. And, it matches with the "match /[a-zA-Z:][a-zA-Z0-9_:]*/". My question is can I use ruby-like expressions for accessing the values and then assigns them here?
My question is can I use ruby-like expressions for accessing the values and then assigns them here?
I think there is no way to do it now.
Which metrics this plugin collects are determined at start time( and name
is passed at the same time). it means this plugin must know specific metrics name at start time.
Yeah, that's where I stumbled. Would you really useful if (at all possible like record accessor) I can access the metric and it's value in from the logs using the filter plugin. I'm trying to avoid the unnecessary calculation of metrics where the metrics already available. @ganmacs Can you clarify one thing here, (https://github.com/fluent/fluent-plugin-prometheus#prometheus-outputfilter-plugin) - it says
Both output/filter plugins instrument metrics from records. Both plugins have no impact against values of each records, just read.
Does the plugin calculates the counter/guage/sumaary values from the provided key?
I am trying to generate metrics using fluend-prometheus plugin from the log files of the containers i.e, my containers are generaing metrics at regular inervals along with the application logs. I would like to use the filter prometheus plug in to generate the metricname, type and value of the metric from the logs (because I already have that info in the logs, don't want fluentd/prometheus instument seperately, rather than just populate the values of prometheus type from the container generated log metric values). Using this, https://github.com/fluent/fluent-plugin-prometheus/blob/master/README.md#prometheus-outputfilter-plugin.
It says,
Does it mean, I won't be able to use the values of the keys that I would like to use? If so, is there any way to solve my problem of populating the values dynamically using the keys/values from the existing record?
I have the following configuration for my fluentd-prometheus plugin
Sample Record
I get the following messages when run the above config:
When I set type to gauge (as a tmp value), I get