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

Add icmp-ip example with inet_ip decoder #251

Merged
merged 1 commit into from
Aug 20, 2023

Conversation

bobrik
Copy link
Contributor

@bobrik bobrik commented Aug 20, 2023

Example metrics from local pings:

ivan@vm:~$ curl -s http://localhost:9435/metrics | fgrep ebpf_exporter_icmp
# HELP ebpf_exporter_icmp4_received_packets_total Number of icmp packets received over IPv4
# TYPE ebpf_exporter_icmp4_received_packets_total counter
ebpf_exporter_icmp4_received_packets_total{source_addr="10.2.0.15"} 4
ebpf_exporter_icmp4_received_packets_total{source_addr="127.0.0.1"} 6
# HELP ebpf_exporter_icmp6_received_packets_total Number of icmp packets received over IPv6
# TYPE ebpf_exporter_icmp6_received_packets_total counter
ebpf_exporter_icmp6_received_packets_total{source_addr="::1"} 4
ebpf_exporter_icmp6_received_packets_total{source_addr="fe80::5054:ff:fe12:3456"} 4
ebpf_exporter_icmp6_received_packets_total{source_addr="fec0::5054:ff:fe12:3456"} 6

Example metrics from local pings:

    ivan@vm:~$ curl -s http://localhost:9435/metrics | fgrep ebpf_exporter_icmp
    # HELP ebpf_exporter_icmp4_received_packets_total Number of icmp packets received over IPv4
    # TYPE ebpf_exporter_icmp4_received_packets_total counter
    ebpf_exporter_icmp4_received_packets_total{source_addr="10.2.0.15"} 4
    ebpf_exporter_icmp4_received_packets_total{source_addr="127.0.0.1"} 6
    # HELP ebpf_exporter_icmp6_received_packets_total Number of icmp packets received over IPv6
    # TYPE ebpf_exporter_icmp6_received_packets_total counter
    ebpf_exporter_icmp6_received_packets_total{source_addr="::1"} 4
    ebpf_exporter_icmp6_received_packets_total{source_addr="fe80::5054:ff:fe12:3456"} 4
    ebpf_exporter_icmp6_received_packets_total{source_addr="fec0::5054:ff:fe12:3456"} 6
@bobrik bobrik merged commit 55d45c1 into cloudflare:master Aug 20, 2023
7 checks passed
@bobrik bobrik deleted the ivan/ipnet-ip-example branch August 20, 2023 04:42
@cdkunsong
Copy link

hi, @bobrik
I also want to discuss a issue, whether it is possible to use struct type for value,
although I see in tcp-window-clamps.bpf.c
tcp_rmem_schedule_enters
__type(value, struct sock *);
but it don't use by metrics .
Currently, it seems that a struct type cannot be supported, and it can parse multiple member values.

Can you explain this problem, thanks!

@bobrik
Copy link
Contributor Author

bobrik commented Aug 22, 2023

@cdkunsong, could you open a new issue describing what you're trying to do?

@cdkunsong
Copy link

#253
I have create new issue.

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.

2 participants