Skip to content

Prometheus stream_* metrics exported by bngblaster-controller stay 0 while stream-info shows correct counters #19

@StanislawSauer

Description

@StanislawSauer

Hi,

I’m seeing a mismatch between the stream statistics reported by the BNGBlaster CLI/API and the Prometheus metrics exposed by bngblaster-controller.

Environment

  • BNGBlaster version: 0.9.26
  • bngblaster-controller version: 0.1.2
  • OS: Ubuntu 24.04.4 LTS

What I’m doing

I start a test instance via the controller API with metric_flags=["streams", "interfaces"] enabled and generate a raw UDP traffic. Here is the config.json:

{
        "interfaces": {
                "network": [
                        {
                                "interface": "Inf1",
                                "address": "x.x.x.1/31",
                                "gateway": "x.x.x.0",
                                "vlan": 2
                        },
                        {
                                "interface": "Inf2",
                                "address": "y.y.y.1/31",
                                "gateway": "y.y.y.0",
                                "vlan": 2
                        }
                ]
        },
        "streams": [
                {
                        "name": "my_stream",
                        "type": "ipv4",
                        "stream-group-id": 0,
                        "priority": 0,
                        "length": 982,
                        "network-interface": "Inf2:2",
                        "destination-ipv4-address": "x.x.x.1",
                        "Mbps": 1.0
                }
        ]
}

Observed behavior

  • interfaces_* metrics increase as expected (traffic is clearly passing).
  • stream-info for the flow shows correct, increasing counters (TX/RX packets/bytes etc.).
  • However, all stream_* metrics remain at 0 for that same flow.

Example excerpt from /metrics (controller):

# HELP stream_rx_bytes Stream RX bytes
# TYPE stream_rx_bytes counter
stream_rx_bytes{flow_id="1",hostname="bngblastervm",instance_name="manuel-test",session_id="0",stream_direction="downstream",stream_name="my_stream",stream_sub_type="ipv4",stream_type="unicast"} 0

# HELP stream_rx_packets Stream RX packets
# TYPE stream_rx_packets counter
stream_rx_packets{flow_id="1",hostname="bngblastervm",instance_name="manuel-test",session_id="0",stream_direction="downstream",stream_name="my_stream",stream_sub_type="ipv4",stream_type="unicast"} 0

# HELP stream_tx_bytes Stream TX bytes
# TYPE stream_tx_bytes counter
stream_tx_bytes{flow_id="1",hostname="bngblastervm",instance_name="manuel-test",session_id="0",stream_direction="downstream",stream_name="my_stream",stream_sub_type="ipv4",stream_type="unicast"} 0

# HELP stream_tx_packets Stream TX packets
# TYPE stream_tx_packets counter
stream_tx_packets{flow_id="1",hostname="bngblastervm",instance_name="manuel-test",session_id="0",stream_direction="downstream",stream_name="my_stream",stream_sub_type="ipv4",stream_type="unicast"} 0

Meanwhile, when I query the instance for the same flow, stream-info shows the expected increasing values:

  • Command: bngblaster-cli run.sock stream-info flow-id x
  • Result: Flow is performing as expected, but the exposed metrics stay on zero.

Steps to reproduce

  1. Configure raw UDP stream.

  2. Start a test instance via controller API with stream-metrics enabled:

    { "metric_flags": ["streams", "interfaces"] }
  3. Verify interface metric are exposed correctly.

  4. CLI bngblaster-cli run.sock stream-info flow-id x (traffic arrives).

  5. Check stream-metrics remain 0.

Expected behavior

stream_* Metrics exposed by BNGBlaster-Controller should reflect the counters reported by stream-info for each flow.

Additional notes / suspicion

This looks like the controller might be collecting stream metrics from stream-summary rather than stream-info, which does not include the counters for generated flows, resulting in exported zeros.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions