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

feat(kuma-cp) Reformat some Envoy metrics available in prometheus #558

Merged
merged 3 commits into from
Jan 24, 2020

Conversation

jakubdyszkiewicz
Copy link
Contributor

Summary

Some metrics like this

# TYPE envoy_inbound_192_168_16_2_39081rbac_shadow_denied counter
envoy_inbound_192_168_16_2_39081rbac_shadow_denied{} 0

need some tuning so it will become usable, like this

envoy_rbac_shadow_denied{listener=inbound_192_168_16_2_39081}

I attach current metrics for statsd and prometheus output with the change
example_prometheus_metrics.txt
example_statsd_metrics.txt

@jakubdyszkiewicz jakubdyszkiewicz requested review from a team and yskopets January 22, 2020 17:14
- tag_name: worker
regex: '(worker_([0-9]+)\.)'
- tag_name: listener
regex: '(.+?)rbac\.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update our Envoy config generator to include . (dot) between listener name and rbac.* suffix

E.g., right now we generate config

      filterChains:
        - filters:
            - name: envoy.filters.network.rbac
              typedConfig:
                '@type': type.googleapis.com/envoy.config.filter.network.rbac.v2.RBAC
                rules:
                  policies:
                    tp-1:
                      permissions:
                      - any: true
                      principals:
                      - authenticated:
                          principalName:
                            exact: spiffe://default/web1
                statPrefix: inbound:192.168.0.1:80

Notice statPrefix: inbound:192.168.0.1:80

It should be statPrefix: inbound:192.168.0.1:80. (notice . (dot) in the end)

@jakubdyszkiewicz jakubdyszkiewicz force-pushed the feature/metrics-prometheus-improvements branch from f221ee9 to 8d46e46 Compare January 24, 2020 09:33
@jakubdyszkiewicz jakubdyszkiewicz merged commit 2ae3763 into master Jan 24, 2020
@jakubdyszkiewicz jakubdyszkiewicz deleted the feature/metrics-prometheus-improvements branch January 24, 2020 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants