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

NETOBSERV-712 Add metric to measure number of flows per namespace #196

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

jotak
Copy link
Member

@jotak jotak commented Nov 17, 2022

E.g. to get netobserv flows in percentage of total:

100 * (sum (rate(netobserv_namespace_flows_total{SrcK8S_Namespace="netobserv"}[1m])) + sum (rate(netobserv_namespace_flows_total{SrcK8S_Namespace!="netobserv", DstK8S_Namespace="netobserv"}[1m]))) / sum (rate(netobserv_namespace_flows_total[1m]))

image

@memodi
Copy link
Contributor

memodi commented Nov 17, 2022

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Nov 17, 2022
@github-actions
Copy link

New image: ["quay.io/netobserv/network-observability-operator:ab2cd97"]. It will expire after two weeks.

@memodi
Copy link
Contributor

memodi commented Nov 17, 2022

thanks @jotak - what would be correct query for non-internal netobserv traffic? I am using below which probably is not correct, since I am getting more value than total.

(sum (rate(netobserv_namespace_flows_total{SrcK8S_Namespace!="netobserv"}[1m])) + sum (rate(netobserv_namespace_flows_total{DstK8S_Namespace!="netobserv"}[1m]))

@jotak
Copy link
Member Author

jotak commented Nov 18, 2022

@memodi if I'm correct it's simpler than that, it's just:

sum (rate(netobserv_namespace_flows_total{SrcK8S_Namespace!="netobserv",DstK8S_Namespace!="netobserv"}[1m]))

= all flows where neither source nor dest are from netobserv namespace

Copy link
Contributor

@OlivierCazade OlivierCazade left a comment

Choose a reason for hiding this comment

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

LGTM

@jotak
Copy link
Member Author

jotak commented Nov 21, 2022

thanks @memodi @OlivierCazade
/approve

@openshift-ci
Copy link

openshift-ci bot commented Nov 21, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jotak

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

@openshift-merge-robot openshift-merge-robot merged commit 27e8f7c into netobserv:main Nov 21, 2022
KalmanMeth pushed a commit to KalmanMeth/network-observability-operator that referenced this pull request Feb 13, 2023
NETOBSERV-253 Enrich Host informations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test To set manually when a PR is safe to test. Triggers image build on PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants