Skip to content

prometheus: export NPOL flow decision counters#1056

Open
onong wants to merge 1 commit into
masterfrom
npol_stats
Open

prometheus: export NPOL flow decision counters#1056
onong wants to merge 1 commit into
masterfrom
npol_stats

Conversation

@onong

@onong onong commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Scrape NPOL flow decision counters from VPP stats and export them with the same pod and interface labels used for existing interface counters.

The exported metrics are:

cni_projectcalico_vpp_npol_rx_flows_allow
cni_projectcalico_vpp_npol_rx_flows_deny
cni_projectcalico_vpp_npol_tx_flows_allow
cni_projectcalico_vpp_npol_tx_flows_deny

Example output:

cni_projectcalico_vpp_npol_rx_flows_allow{
worker="0",
namespace="default",
podName="nginx",
podInterfaceName="eth0",
vppInterfaceName="tun3"
} 42

Also, document the new metrics and add Prometheus integration coverage that verifies the counters are exposed after NPOL is configured on an interface.

Scrape NPOL flow decision counters from VPP stats and export them with the
same pod and interface labels used for existing interface counters.

The exported metrics are:

  cni_projectcalico_vpp_npol_rx_flows_allow
  cni_projectcalico_vpp_npol_rx_flows_deny
  cni_projectcalico_vpp_npol_tx_flows_allow
  cni_projectcalico_vpp_npol_tx_flows_deny

Example output:

  cni_projectcalico_vpp_npol_rx_flows_allow{
    worker="0",
    namespace="default",
    podName="nginx",
    podInterfaceName="eth0",
    vppInterfaceName="tun3"
  } 42

Also, document the new metrics and add Prometheus integration coverage that
verifies the counters are exposed after NPOL is configured on an interface.
@onong onong requested review from aritrbas, hedibouattour and sknat July 7, 2026 12:18
@onong

onong commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

For ref, the VPP side changes: https://gerrit.fd.io/r/c/vpp/+/46217

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.

1 participant