Skip to content

Conversation

@delavet
Copy link
Contributor

@delavet delavet commented Nov 30, 2024

What type of PR is this?

/kind documentation

What this PR does / why we need it:

This PR supplies a new Prometheus configuration file in Kmesh samples. Compared with the origin one in samples/addons/prometheus.yaml, this new Prometheus configuration file adds some modifications to help Kiali drawing Traffic Graph based on metrics generated by Kmesh.

  • Add some recording rules which rename the Kmesh service tcp metrics to Istio standard tcp metrics. This makes Kiali recognize these tcp metrics and draw tcp-based Traffic Graph.
  • Besides, a metrics relabel config is added to the scrap_configs, in order to rename the reporter=waypoint label to reporter=destination. Through this relabel config, Kiali can read http metrics exposed by waypoint without having to recognize that the data plane is in Ambient Mode. In this way, Kiali can draw http Traffic Graph when data plane mode is Kmesh.

A document utilizing this prometheus configuration file to visualize Traffic Graph in Kiali under Kmesh will be given later.

Which issue(s) this PR fixes:
Fixes #1033

Special notes for your reviewer:

Does this PR introduce a user-facing change?:
No, this just supplies a sample prometheus configuration which will be used in documentations.

@kmesh-bot
Copy link
Collaborator

@delavet: The label(s) kind/documentation cannot be applied, because the repository doesn't have them.

In response to this:

What type of PR is this?

/kind documentation

What this PR does / why we need it:

This PR supplies a new Prometheus configuration file in Kmesh samples. Compared with the origin one in samples/addons/prometheus.yaml, this new Prometheus configuration file adds some modifications to help Kiali drawing Traffic Graph based on metrics generated by Kmesh.

  • Add some recording rules which rename the Kmesh service tcp metrics to Istio standard tcp metrics. This makes Kiali recognize these tcp metrics and draw tcp-based Traffic Graph.
  • Besides, a metrics relabel config is added to the scrap_configs, in order to rename the reporter=waypoint label to reporter=destination. Through this relabel config, Kiali can read http metrics exposed by waypoint without having to recognize that the data plane is in Ambient Mode. In this way, Kiali can draw http Traffic Graph when data plane mode is Kmesh.

A document utilizing this prometheus configuration file to visualize Traffic Graph in Kiali under Kmesh will be given later.

Which issue(s) this PR fixes:
Fixes #1033

Special notes for your reviewer:

Does this PR introduce a user-facing change?:
No, this just supplies a sample prometheus configuration which will be used in documentations.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kmesh-bot
Copy link
Collaborator

Welcome @delavet! It looks like this is your first PR to kmesh-net/kmesh 🎉

@delavet delavet force-pushed the support-prometheus-recording-rules branch from 420670f to 16a135c Compare November 30, 2024 14:09
@codecov
Copy link

codecov bot commented Nov 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.71%. Comparing base (43f8129) to head (9a83ef7).
Report is 38 commits behind head on main.

see 11 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 071bfd8...9a83ef7. Read the comment docs.

@LiZhenCheng9527
Copy link
Contributor

/lgtm

@hzxuzhonghu
Copy link
Member

hzxuzhonghu commented Dec 2, 2024

@delavet What does the graph drawn by kiali look like now with the config

@kmesh-bot kmesh-bot removed the lgtm label Dec 2, 2024
…name them into a format that Kiali can read.

Signed-off-by: 露营 <luying.yh@alibaba-inc.com>
Signed-off-by: 露营 <luying.yh@alibaba-inc.com>
@delavet delavet force-pushed the support-prometheus-recording-rules branch from 87cf7a5 to 9a83ef7 Compare December 2, 2024 11:47
@delavet
Copy link
Contributor Author

delavet commented Dec 2, 2024

@delavet What does the graph drawn by kiali look like now with the config

I just got some update here. The Prometheus configuration file is updated and with this configuration we can get a pretty decent traffic graph like this.

image

We can see there are blue edges (tcp traffics) between services whose traffics are proxied by Kmesh, and green edges (http traffics) between services whose traffics are proxied by Waypoint.

The service node name seems not behavior the same as Istio standard metrics. I have just submitted a new issue to track this here: #1089

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

Cool

/lgtm

@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kmesh-bot kmesh-bot merged commit 0fdf768 into kmesh-net:main Dec 3, 2024
12 checks passed
@LiZhenCheng9527
Copy link
Contributor

so, is the kiali configuration consistent with samples/addons/kiali.yaml in istio repo?

@delavet
Copy link
Contributor Author

delavet commented Dec 3, 2024

so, is the kiali configuration consistent with samples/addons/kiali.yaml in istio repo?

not exactly the same. Actually, I use helm to install kiali following https://kiali.io/docs/installation/installation-guide/install-with-helm/.

However, I believe the only difference is the external_service config in the kiali ConfigMap. This is because we should make kiali read Prometheus deployed in kmesh-system.

I prefer to use helm and adjust some values in the later documentation.

@delavet delavet mentioned this pull request Jan 15, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the compatibility of Kmesh observability with the Istio ecosystem

4 participants