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

FEATURE: implement tcp stats metrics #9

Merged
merged 1 commit into from
Mar 29, 2024
Merged

Conversation

ihatemodels
Copy link
Member

This PR implements a set of common TCP metrics exposed by OPNsense

Example:

# HELP opnsense_proto_statistics_arp_received_requests_total Number of received ARP requests
# TYPE opnsense_proto_statistics_arp_received_requests_total counter
opnsense_proto_statistics_arp_received_requests_total{opnsense_instance="opnsense-local1"} 6.526501e+06
# HELP opnsense_proto_statistics_arp_sent_requests_total Number of sent ARP requests
# TYPE opnsense_proto_statistics_arp_sent_requests_total counter
opnsense_proto_statistics_arp_sent_requests_total{opnsense_instance="opnsense-local1"} 11673
# HELP opnsense_proto_statistics_tcp_connection_count_by_state Number of TCP connections by state
# TYPE opnsense_proto_statistics_tcp_connection_count_by_state gauge
opnsense_proto_statistics_tcp_connection_count_by_state{opnsense_instance="opnsense-local1",state="CLOSED"} 0
opnsense_proto_statistics_tcp_connection_count_by_state{opnsense_instance="opnsense-local1",state="CLOSE_WAIT"} 0
opnsense_proto_statistics_tcp_connection_count_by_state{opnsense_instance="opnsense-local1",state="CLOSING"} 0
opnsense_proto_statistics_tcp_connection_count_by_state{opnsense_instance="opnsense-local1",state="ESTABLISHED"} 6
opnsense_proto_statistics_tcp_connection_count_by_state{opnsense_instance="opnsense-local1",state="FIN_WAIT_1"} 0
opnsense_proto_statistics_tcp_connection_count_by_state{opnsense_instance="opnsense-local1",state="FIN_WAIT_2"} 0
opnsense_proto_statistics_tcp_connection_count_by_state{opnsense_instance="opnsense-local1",state="LAST_ACK"} 0
opnsense_proto_statistics_tcp_connection_count_by_state{opnsense_instance="opnsense-local1",state="LISTEN"} 37
opnsense_proto_statistics_tcp_connection_count_by_state{opnsense_instance="opnsense-local1",state="SYN_RCVD"} 0
opnsense_proto_statistics_tcp_connection_count_by_state{opnsense_instance="opnsense-local1",state="SYN_SENT"} 0
opnsense_proto_statistics_tcp_connection_count_by_state{opnsense_instance="opnsense-local1",state="TIME_WAIT"} 12
# HELP opnsense_proto_statistics_tcp_received_packets_total Number of received TCP packets
# TYPE opnsense_proto_statistics_tcp_received_packets_total counter
opnsense_proto_statistics_tcp_received_packets_total{opnsense_instance="opnsense-local1"} 1.23587e+07
# HELP opnsense_proto_statistics_tcp_sent_packets_total Number of sent TCP packets 
# TYPE opnsense_proto_statistics_tcp_sent_packets_total counter
opnsense_proto_statistics_tcp_sent_packets_total{opnsense_instance="opnsense-local1"} 1.6408881e+07

Introduce pull_req_template as well

@ihatemodels ihatemodels self-assigned this Mar 29, 2024
@ihatemodels ihatemodels added enhancement New feature or request new metrics labels Mar 29, 2024
@ihatemodels ihatemodels merged commit 87d7d4a into main Mar 29, 2024
4 checks passed
@ihatemodels ihatemodels deleted the feature/tcp-stats branch March 29, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new metrics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant