Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User/System Metadata labels filters in stackdriver #11547

Closed
lpankaz opened this issue Jul 26, 2022 · 3 comments · Fixed by #12377
Closed

User/System Metadata labels filters in stackdriver #11547

lpankaz opened this issue Jul 26, 2022 · 3 comments · Fixed by #12377
Labels
feature request Requests for new plugin and for new features to existing plugins

Comments

@lpankaz
Copy link

lpankaz commented Jul 26, 2022

Feature Request

I would like to be able to filter metrics from google with information about user/system metadata labels.

Current behavior:

I cannot download data regarding metadata labels using stackdriver plugin. Nor can I filter by them, nor have these data, to filter later.

Desired behavior:

I would like either to be able to filter downloaded metrics based on metadata labels or do not lose these information.

Use case:

In Cloud Monitoring API I can see some examples with
metadata.system_labels.[KEY]
metadata.user_labels.[KEYSTRING]
whereas I am unable to use it together with Stackdriver plugin. I also lose information of them after putting data to influx db.
Do you think it would be possible to add this feature?

@lpankaz lpankaz added the feature request Requests for new plugin and for new features to existing plugins label Jul 26, 2022
@powersj
Copy link
Contributor

powersj commented Jul 26, 2022

Hi,

Have you seen the stackdriver README? At the end of the example configuration, there is a section on filtering based on labels, which sounds like what you are interested in doing? Is your request different than what already exists?

  ## Filters can be added to reduce the number of time series matched.  All
  ## functions are supported: starts_with, ends_with, has_substring, and
  ## one_of.  Only the '=' operator is supported.
  ##
  ## The logical operators when combining filters are defined statically using
  ## the following values:
  ##   filter ::= <resource_labels> {AND <metric_labels>}
  ##   resource_labels ::= <resource_labels> {OR <resource_label>}
  ##   metric_labels ::= <metric_labels> {OR <metric_label>}
  ##
  ## For more details, see https://cloud.google.com/monitoring/api/v3/filters
  #
  ## Resource labels refine the time series selection with the following expression:
  ##   resource.labels.<key> = <value>
  # [[inputs.stackdriver.filter.resource_labels]]
  #   key = "instance_name"
  #   value = 'starts_with("localhost")'
  #
  ## Metric labels refine the time series selection with the following expression:
  ##   metric.labels.<key> = <value>
  #  [[inputs.stackdriver.filter.metric_labels]]
  #    key = "device_name"
  #    value = 'one_of("sda", "sdb")'

Thanks!

@powersj powersj added the waiting for response waiting for response from contributor label Jul 26, 2022
@lpankaz
Copy link
Author

lpankaz commented Jul 27, 2022

Hi,
of course I've read README. And what is more - I'm heavily using these filters - resource.labels and metric.labels. Unfortunatelly mentioned metadata.user_labels and metadata.system_labels are something different. Could you please look into that more carefully? Even in my metrics explorer they are shown as different type of filter.
https://cloud.google.com/monitoring/api/v3/filters#group-filter

filters1
filter2
filter3

If there is a possibility right now to use metadata filters, could you please show me an example? As one mentioned in README is not enough.

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Jul 27, 2022
@Mariushrek
Copy link

Hello, any news? I am also looking for this feature ;)

Thanks,
Mariusz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants