Skip to content

Conversation

@jotak
Copy link
Member

@jotak jotak commented Nov 13, 2024

Description

Allow to generate metrics from list fields (and later nested fields), such as Interfaces or NetworkEvents.

This PR includes an example:

apiVersion: flows.netobserv.io/v1alpha1
kind: FlowMetric
metadata:
  name: per-interface
  namespace: netobserv
spec:
  metricName: per_interface
  type: Counter
  labels: [Interfaces]
  flatten: [Interfaces]
  remap:
    Interfaces: interface

When deployed, using a promQL query such as:

topk(10, sum(rate(netobserv_per_interface[1m])) by (interface) )

will show flows per individual interfaces instead of an arbitrary list of interfaces.

This is also adding new predefined metrics and charts when the NetworkEvents feature is enabled:

Capture d’écran du 2024-11-19 11-54-11

Dependencies

FLP: netobserv/flowlogs-pipeline#739

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
    • If so, make sure the JIRA epic is labeled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
    • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
    • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
    • Standard QE validation, with pre-merge tests unless stated otherwise.
    • Regression tests only (e.g. refactoring with no user-facing change).
    • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Nov 13, 2024

@jotak: This pull request references NETOBSERV-1935 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Description

Allow to generate metrics from list fields (and later nested fields), such as Interfaces or NetworkEvents.

This PR includes an example:

apiVersion: flows.netobserv.io/v1alpha1
kind: FlowMetric
metadata:
 name: per-interface
 namespace: netobserv
spec:
 metricName: per_interface
 type: Counter
 labels: [Interfaces]
 flatten: [Interfaces]
 remap:
   Interfaces: interface

When deployed, using a promQL query such as:

topk(10, sum(rate(netobserv_per_interface[1m])) by (interface) )

will show flows per individual interfaces instead of an arbitrary list of interfaces.

Dependencies

FLP: netobserv/flowlogs-pipeline#739

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
  • If so, make sure the JIRA epic is labeled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
  • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
  • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
  • Standard QE validation, with pre-merge tests unless stated otherwise.
  • Regression tests only (e.g. refactoring with no user-facing change).
  • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Nov 13, 2024

@jotak: This pull request references NETOBSERV-1935 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Description

Allow to generate metrics from list fields (and later nested fields), such as Interfaces or NetworkEvents.

This PR includes an example:

apiVersion: flows.netobserv.io/v1alpha1
kind: FlowMetric
metadata:
 name: per-interface
 namespace: netobserv
spec:
 metricName: per_interface
 type: Counter
 labels: [Interfaces]
 flatten: [Interfaces]
 remap:
   Interfaces: interface

When deployed, using a promQL query such as:

topk(10, sum(rate(netobserv_per_interface[1m])) by (interface) )

will show flows per individual interfaces instead of an arbitrary list of interfaces.

Dependencies

FLP: netobserv/flowlogs-pipeline#739

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
  • If so, make sure the JIRA epic is labeled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
  • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
  • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
  • Standard QE validation, with pre-merge tests unless stated otherwise.
  • Regression tests only (e.g. refactoring with no user-facing change).
  • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Nov 13, 2024

@jotak: This pull request references NETOBSERV-1935 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Description

Allow to generate metrics from list fields (and later nested fields), such as Interfaces or NetworkEvents.

This PR includes an example:

apiVersion: flows.netobserv.io/v1alpha1
kind: FlowMetric
metadata:
 name: per-interface
 namespace: netobserv
spec:
 metricName: per_interface
 type: Counter
 labels: [Interfaces]
 flatten: [Interfaces]
 remap:
   Interfaces: interface

When deployed, using a promQL query such as:

topk(10, sum(rate(netobserv_per_interface[1m])) by (interface) )

will show flows per individual interfaces instead of an arbitrary list of interfaces.

Dependencies

FLP: netobserv/flowlogs-pipeline#739

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
  • If so, make sure the JIRA epic is labeled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
  • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
  • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
  • Standard QE validation, with pre-merge tests unless stated otherwise.
  • Regression tests only (e.g. refactoring with no user-facing change).
  • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Nov 13, 2024

@jotak: This pull request references NETOBSERV-1935 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Description

Allow to generate metrics from list fields (and later nested fields), such as Interfaces or NetworkEvents.

This PR includes an example:

apiVersion: flows.netobserv.io/v1alpha1
kind: FlowMetric
metadata:
 name: per-interface
 namespace: netobserv
spec:
 metricName: per_interface
 type: Counter
 labels: [Interfaces]
 flatten: [Interfaces]
 remap:
   Interfaces: interface

When deployed, using a promQL query such as:

topk(10, sum(rate(netobserv_per_interface[1m])) by (interface) )

will show flows per individual interfaces instead of an arbitrary list of interfaces.

Dependencies

FLP: netobserv/flowlogs-pipeline#739

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
  • If so, make sure the JIRA epic is labeled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
  • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
  • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
  • Standard QE validation, with pre-merge tests unless stated otherwise.
  • Regression tests only (e.g. refactoring with no user-facing change).
  • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

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 openshift-eng/jira-lifecycle-plugin repository.

@jotak
Copy link
Member Author

jotak commented Nov 13, 2024

/hold
go mod to be updated after netobserv/flowlogs-pipeline#739 is merged

@codecov
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 65.45%. Comparing base (b2ceea5) to head (bfbf496).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
apis/flowmetrics/v1alpha1/zz_generated.deepcopy.go 0.00% 4 Missing and 1 partial ⚠️
apis/flowmetrics/v1alpha1/flowmetric_webhook.go 73.33% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #863      +/-   ##
==========================================
+ Coverage   64.98%   65.45%   +0.47%     
==========================================
  Files          76       76              
  Lines       10757    10837      +80     
==========================================
+ Hits         6990     7093     +103     
+ Misses       3326     3311      -15     
+ Partials      441      433       -8     
Flag Coverage Δ
unittests 65.45% <90.00%> (+0.47%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
apis/flowcollector/v1beta2/flowcollector_types.go 100.00% <ø> (ø)
apis/flowmetrics/v1alpha1/flowmetric_types.go 100.00% <ø> (ø)
controllers/flp/flp_pipeline_builder.go 79.80% <100.00%> (+0.03%) ⬆️
pkg/helper/helpers.go 87.65% <100.00%> (+0.47%) ⬆️
pkg/metrics/predefined_charts.go 99.65% <100.00%> (+0.05%) ⬆️
pkg/metrics/predefined_metrics.go 100.00% <100.00%> (ø)
apis/flowmetrics/v1alpha1/flowmetric_webhook.go 52.94% <73.33%> (+10.44%) ⬆️
apis/flowmetrics/v1alpha1/zz_generated.deepcopy.go 39.13% <0.00%> (-1.48%) ⬇️

... and 9 files with indirect coverage changes

---- 🚨 Try these New Features:

@jotak
Copy link
Member Author

jotak commented Nov 14, 2024

/unhold
flp pr was merged

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

New images:

  • quay.io/netobserv/network-observability-operator:2df0a19
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-2df0a19
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-2df0a19

They will expire after two weeks.

To deploy this build:

# Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:2df0a19 make deploy

# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-2df0a19

Or as a Catalog Source:

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: netobserv-dev
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-2df0a19
  displayName: NetObserv development catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 1m

@openshift-ci openshift-ci bot removed the lgtm label Nov 18, 2024
@openshift-ci
Copy link

openshift-ci bot commented Nov 18, 2024

New changes are detected. LGTM label has been removed.

@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Nov 18, 2024
@jotak jotak added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Nov 19, 2024
@github-actions
Copy link

New images:

  • quay.io/netobserv/network-observability-operator:4119029
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-4119029
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-4119029

They will expire after two weeks.

To deploy this build:

# Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:4119029 make deploy

# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-4119029

Or as a Catalog Source:

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: netobserv-dev
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-4119029
  displayName: NetObserv development catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 1m

@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Nov 19, 2024
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Nov 19, 2024

@jotak: This pull request references NETOBSERV-1935 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Description

Allow to generate metrics from list fields (and later nested fields), such as Interfaces or NetworkEvents.

This PR includes an example:

apiVersion: flows.netobserv.io/v1alpha1
kind: FlowMetric
metadata:
 name: per-interface
 namespace: netobserv
spec:
 metricName: per_interface
 type: Counter
 labels: [Interfaces]
 flatten: [Interfaces]
 remap:
   Interfaces: interface

When deployed, using a promQL query such as:

topk(10, sum(rate(netobserv_per_interface[1m])) by (interface) )

will show flows per individual interfaces instead of an arbitrary list of interfaces.

This is also adding new predefined metrics and charts when the NetworkEvents feature is enabled:

Capture d’écran du 2024-11-19 11-54-11

Dependencies

FLP: netobserv/flowlogs-pipeline#739

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
  • If so, make sure the JIRA epic is labeled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
  • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
  • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
  • Standard QE validation, with pre-merge tests unless stated otherwise.
  • Regression tests only (e.g. refactoring with no user-facing change).
  • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Nov 19, 2024

@jotak: This pull request references NETOBSERV-1935 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Description

Allow to generate metrics from list fields (and later nested fields), such as Interfaces or NetworkEvents.

This PR includes an example:

apiVersion: flows.netobserv.io/v1alpha1
kind: FlowMetric
metadata:
 name: per-interface
 namespace: netobserv
spec:
 metricName: per_interface
 type: Counter
 labels: [Interfaces]
 flatten: [Interfaces]
 remap:
   Interfaces: interface

When deployed, using a promQL query such as:

topk(10, sum(rate(netobserv_per_interface[1m])) by (interface) )

will show flows per individual interfaces instead of an arbitrary list of interfaces.

This is also adding new predefined metrics and charts when the NetworkEvents feature is enabled:

Capture d’écran du 2024-11-19 11-54-11

Dependencies

FLP: netobserv/flowlogs-pipeline#739

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
  • If so, make sure the JIRA epic is labeled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
  • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
  • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
  • Standard QE validation, with pre-merge tests unless stated otherwise.
  • Regression tests only (e.g. refactoring with no user-facing change).
  • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

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 openshift-eng/jira-lifecycle-plugin repository.

@jotak jotak added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Nov 19, 2024
@github-actions
Copy link

New images:

  • quay.io/netobserv/network-observability-operator:d01a36a
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-d01a36a
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-d01a36a

They will expire after two weeks.

To deploy this build:

# Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:d01a36a make deploy

# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-d01a36a

Or as a Catalog Source:

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: netobserv-dev
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-d01a36a
  displayName: NetObserv development catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 1m

@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Nov 21, 2024
@jotak jotak added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Nov 21, 2024
@github-actions
Copy link

New images:

  • quay.io/netobserv/network-observability-operator:8539373
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-8539373
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-8539373

They will expire after two weeks.

To deploy this build:

# Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:8539373 make deploy

# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-8539373

Or as a Catalog Source:

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: netobserv-dev
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-8539373
  displayName: NetObserv development catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 1m

@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Nov 21, 2024
3 new metrics:
- node_network_policy_events_total
- namespace_network_policy_events_total (enabled by default)
- workload_network_policy_events_total

And their related charts
@jotak jotak added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Nov 28, 2024
@github-actions
Copy link

New images:

  • quay.io/netobserv/network-observability-operator:12b7f1f
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-12b7f1f
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-12b7f1f

They will expire after two weeks.

To deploy this build:

# Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:12b7f1f make deploy

# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-12b7f1f

Or as a Catalog Source:

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: netobserv-dev
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-12b7f1f
  displayName: NetObserv development catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 1m

@memodi
Copy link
Member

memodi commented Dec 11, 2024

@jotak I am approving this but I have some questions, I'll post on JIRA

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved QE has approved this pull request label Dec 11, 2024
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Dec 11, 2024

@jotak: This pull request references NETOBSERV-1935 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

Description

Allow to generate metrics from list fields (and later nested fields), such as Interfaces or NetworkEvents.

This PR includes an example:

apiVersion: flows.netobserv.io/v1alpha1
kind: FlowMetric
metadata:
 name: per-interface
 namespace: netobserv
spec:
 metricName: per_interface
 type: Counter
 labels: [Interfaces]
 flatten: [Interfaces]
 remap:
   Interfaces: interface

When deployed, using a promQL query such as:

topk(10, sum(rate(netobserv_per_interface[1m])) by (interface) )

will show flows per individual interfaces instead of an arbitrary list of interfaces.

This is also adding new predefined metrics and charts when the NetworkEvents feature is enabled:

Capture d’écran du 2024-11-19 11-54-11

Dependencies

FLP: netobserv/flowlogs-pipeline#739

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
  • If so, make sure the JIRA epic is labeled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
  • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
  • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
  • Standard QE validation, with pre-merge tests unless stated otherwise.
  • Regression tests only (e.g. refactoring with no user-facing change).
  • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

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 openshift-eng/jira-lifecycle-plugin repository.

@jotak
Copy link
Member Author

jotak commented Dec 12, 2024

thanks @memodi !
/approve

@openshift-ci
Copy link

openshift-ci bot commented Dec 12, 2024

[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

@jotak jotak merged commit ca8337c into netobserv:main Dec 12, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved jira/valid-reference ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. qe-approved QE has approved this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants