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

[BUG] pktvisor flow_advanced handler returning incorrect openmetrics output. #716

Open
renatoalmeidaoliveira opened this issue May 16, 2024 · 0 comments

Comments

@renatoalmeidaoliveira
Copy link

renatoalmeidaoliveira commented May 16, 2024

Pktvisor version

pktvisor 4.5.0

Platform

binary

Agent configuration

version: "1.0"
visor:
  config:
    verbose: true
  taps:
    my_flow_tap:
      input_type: flow
      config:
        port: 6343
        bind: 192.168.0.1
        flow_type: netflow
      tags:
        flow: true
  # optionally define policies
  policies:
    default:
      input:
        input_type: flow
        tap: my_flow_tap
      kind: collection
      handlers:
        modules:
          flow_advanced:
            config:
              summarize_ips_by_asn: true
              exclude_unknown_asns_from_summarization: true
              exclude_asns_from_summarization:
                - 65000
            type: flow
            metric_groups:
              enable:
                - counters
                - by_bytes
                - top_ports
                - top_ips
              disable:
                - all

Steps to reproduce

  1. Send data to the server, the router MUST send flow data for multiple interfaces;
  2. Collect data using http://127.0.0.1:10853/metrics/

Expected output

Only one entry TYPE for each metric, as https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md?plain=1#L527

Current Output

The api is returning one TYPE output for each interface, example metric:

# HELP flow_top_out_dst_ports_bytes Top out destination ports by bytes
# TYPE flow_top_out_dst_ports_bytes gauge
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

No branches or pull requests

1 participant