Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions modules/network-observability-configuring-custom-metrics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
:_mod-docs-content-type: PROCEDURE
[id="network-observability-configuring-custom-metrics_{context}"]
= Configuring custom metrics by using FlowMetric API

You can configure the `FlowMetric` API to create custom metrics by using flowlogs data fields as Prometheus labels. You can add multiple `FlowMetric` resources to a project to see multiple dashboard views.

.Procedure

. In the web console, navigate to *Operators* -> *Installed Operators*.
. In the *Provided APIs* heading for the *NetObserv Operator*, select *FlowMetric*.
. In the *Project:* dropdown list, select the project of the Network Observability Operator instance.
. In the *Project:* dropdown list, select the project of the Network Observability Operator instance.
. Click *Create FlowMetric*.
. Configure the `FlowMetric` resource, similar to the following sample configurations:
+
Expand All @@ -36,9 +37,9 @@ spec:
matchType: Absence
----
<1> The `FlowMetric` resources need to be created in the namespace defined in the `FlowCollector` `spec.namespace`, which is `netobserv` by default.
<2> The name of the Prometheus metric, which in the web console appears with the prefix `netobserv-<metricName>`.
<2> The name of the Prometheus metric, which in the web console appears with the prefix `netobserv-<metricName>`.
<3> The `type` specifies the type of metric. The `Counter` `type` is useful for counting bytes or packets.
<4> The direction of traffic to capture. If not specified, both ingress and egress are captured, which can lead to duplicated counts.
<4> The direction of traffic to capture. If not specified, both ingress and egress are captured, which can lead to duplicated counts.
<5> Labels define what the metrics look like and the relationship between the different entities and also define the metrics cardinality. For example, `SrcK8S_Name` is a high cardinality metric.
<6> Refines results based on the listed criteria. In this example, selecting only the cluster external traffic is done by matching only flows where `SrcSubnetLabel` is absent. This assumes the subnet labels feature is enabled (via `spec.processor.subnetLabels`), which is done by default.

Expand Down Expand Up @@ -78,7 +79,7 @@ spec:

.Verification
. Once the pods refresh, navigate to *Observe* -> *Metrics*.
. In the *Expression* field, you can type the metric name to view the corresponding result.
. In the *Expression* field, you can type the metric name to view the corresponding result.
====


Expand Down
3 changes: 2 additions & 1 deletion modules/network-observability-custom-metrics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
:_mod-docs-content-type: CONCEPT
[id="network-observability-custom-metrics_{context}"]
= Custom metrics
You can create custom metrics out of the flowlogs data using the `FlowMetric` API. In every flowlogs data that is collected, there are a number of fields labeled per log, such as source name and destination name. These fields can be leveraged as Prometheus labels to enable the customization of cluster information on your dashboard.

You can create custom metrics out of the flowlogs data using the `FlowMetric` API. In every flowlogs data that is collected, there are several fields labeled per log, such as source name and destination name. These fields can be leveraged as Prometheus labels to enable the customization of cluster information on your dashboard.
5 changes: 3 additions & 2 deletions modules/network-observability-flowmetrics-charts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
:_mod-docs-content-type: PROCEDURE
[id="network-observability-custom-charts-flowmetrics_{context}"]
= Configuring custom charts using FlowMetric API

You can generate charts for dashboards in the {product-title} web console, which you can view as an administrator in the *Dashboard* menu by defining the `charts` section of the `FlowMetric` resource.

.Procedure
. In the web console, navigate to *Operators* -> *Installed Operators*.
. In the *Provided APIs* heading for the *NetObserv Operator*, select *FlowMetric*.
. In the *Project:* dropdown list, select the project of the Network Observability Operator instance.
. In the *Project:* dropdown list, select the project of the Network Observability Operator instance.
. Click *Create FlowMetric*.
. Configure the `FlowMetric` resource, similar to the following sample configurations:
. Configure the `FlowMetric` resource, similar to the following sample configurations:

.Chart for tracking ingress bytes received from cluster external sources
[%collapsible]
Expand Down
1 change: 1 addition & 0 deletions modules/network-observability-includelist-example.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
:_mod-docs-content-type: PROCEDURE
[id="network-observability-netobserv-dashboard-high-traffic-alert_{context}"]
= Creating alerts

You can create custom alerting rules for the Netobserv dashboard metrics to trigger alerts when some defined conditions are met.

.Prerequisites
Expand Down
3 changes: 2 additions & 1 deletion modules/network-observability-metrics-names.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
:_mod-docs-content-type: REFERENCE
[id="network-observability-metrics_{context}"]
= Network Observability metrics

You can also create alerts by using the `includeList` metrics in Prometheus rules, as shown in the example "Creating alerts".

When looking for these metrics in Prometheus, such as in the Console through *Observe* -> *Metrics*, or when defining alerts, all the metrics names are prefixed with `netobserv_`. For example, `netobserv_namespace_flows_total`. Available metrics names are as follows:

includeList metrics names::
Names followed by an asterisk `*` are enabled by default.
Names followed by an asterisk `*` are enabled by default.

* `namespace_egress_bytes_total`
* `namespace_egress_packets_total`
Expand Down
11 changes: 6 additions & 5 deletions modules/network-observability-tcp-flag-syn-flood.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
:_mod-docs-content-type: PROCEDURE
[id="network-observability-tcp-flag-syn-flood_{context}"]
= Detecting SYN flooding using the FlowMetric API and TCP flags
You can create an `AlertingRule` resouce to alert for SYN flooding.

You can create an `AlertingRule` resouce to alert for SYN flooding.

.Procedure
. In the web console, navigate to *Operators* -> *Installed Operators*.
. In the *Provided APIs* heading for the *NetObserv Operator*, select *FlowMetric*.
. In the *Project* dropdown list, select the project of the Network Observability Operator instance.
. In the *Project* dropdown list, select the project of the Network Observability Operator instance.
. Click *Create FlowMetric*.
. Create `FlowMetric` resources to add the following configurations:
. Create `FlowMetric` resources to add the following configurations:
+
.Configuration counting flows per destination host and resource, with TCP flags
[source,yaml]
Expand Down Expand Up @@ -81,5 +82,5 @@ metadata:
.Verification
. In the web console, click *Manage Columns* in the *Network Traffic* table view and click *TCP flags*.
. In the *Network Traffic* table view, filter on *TCP protocol SYN TCPFlag*. A large number of flows with the same *byteSize* indicates a SYN flood.
. Go to *Observe* -> *Alerting* and select the *Alerting Rules* tab.
. Filter on *netobserv-synflood-in alert*. The alert should fire when SYN flooding occurs.
. Go to *Observe* -> *Alerting* and select the *Alerting Rules* tab.
. Filter on *netobserv-synflood-in alert*. The alert should fire when SYN flooding occurs.
3 changes: 2 additions & 1 deletion modules/network-observability-viewing-dashboards.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:_mod-docs-content-type: PROCEDURE
[id="network-observability-viewing-dashboards_{context}"]
= Viewing Network Observability metrics dashboards

On the *Overview* tab in the {product-title} console, you can view the overall aggregated metrics of the network traffic flow on the cluster. You can choose to display the information by node, namespace, owner, pod, and service. You can also use filters and display options to further refine the metrics.

.Procedure
Expand All @@ -16,7 +17,7 @@ On the *Overview* tab in the {product-title} console, you can view the overall a
* *DNS*
* *RTT*

. Select the *Netobserv/Health* dashboard.
. Select the *Netobserv/Health* dashboard.
. View metrics about the health of the Operator in the following categories, with each having the subset per node, namespace, source, and destination.

* *Flows*
Expand Down