TCPProbe is a modern TCP tool and service for network performance observability.

tcpprobe

Github Actions Go report Coverage Status

TCPProbe is a modern TCP tool and service for network performance observability. It exposes information about socket’s underlying TCP session, TLS and HTTP (more than 60 metrics). you can run it through command line or as a service. the request is highly customizable and you can integrate it with your application through gRPC. it runs in a Kubernetes cluster as cloud native application and by adding annotations on pods allow a fine control of the probing process.

tcpprobe

Features

  • TCP socket statistics
  • TCP/IP request customization
  • Prometheus exporter
  • Probing multiple hosts
  • Runs as service
  • Kubernetes native
  • gRPC interface

Documentation

Command line (download Linux binary)

tcpprobe -json https://www.google.com
{"Target":"https://www.google.com","IP":"142.250.72.196","Timestamp":1607567390,"Seq":0,"State":1,"CaState":0,"Retransmits":0,"Probes":0,"Backoff":0,"Options":7,"Rto":204000,"Ato":40000,"SndMss":1418,"RcvMss":1418,"Unacked":0,"Sacked":0,"Lost":0,"Retrans":0,"Fackets":0,"LastDataSent":56,"LastAckSent":0,"LastDataRecv":0,"LastAckRecv":0,"Pmtu":9001,"RcvSsthresh":56587,"Rtt":1365,"Rttvar":446,"SndSsthresh":2147483647,"SndCwnd":10,"Advmss":8949,"Reordering":3,"RcvRtt":0,"RcvSpace":62727,"TotalRetrans":0,"PacingRate":20765147,"BytesAcked":448,"BytesReceived":10332,"SegsOut":10,"SegsIn":11,"NotsentBytes":0,"MinRtt":1305,"DataSegsIn":8,"DataSegsOut":3,"DeliveryRate":1785894,"BusyTime":4000,"RwndLimited":0,"SndbufLimited":0,"Delivered":4,"DeliveredCe":0,"BytesSent":447,"BytesRetrans":0,"DsackDups":0,"ReordSeen":0,"RcvOoopack":0,"SndWnd":66816,"TCPCongesAlg":"cubic","HTTPStatusCode":200,"HTTPRcvdBytes":14683,"HTTPRequest":113038,"HTTPResponse":293,"DNSResolve":2318,"TCPConnect":1421,"TLSHandshake":57036,"TCPConnectError":0,"DNSResolveError":0}

Docker

docker run --rm mehrdadrad/tcpprobe smtp.gmail.com:587

Docker Compose

TCPProbe and Prometheus

docker-compose up -d

Open your browser and try http://localhost:9090 You can edit the docker-compose.yml to customize the options and target(s).

Helm Chart

Detailed installation instructions for TCPProbe on Kubernetes are found here.

helm install tcpprobe tcpprobe

License

This project is licensed under MIT license. Please read the LICENSE file.

Contribute

Welcomes any kind of contribution, please follow the next steps:

  • Fork the project on github.com.
  • Create a new branch.
  • Commit changes to the new branch.
  • Send a pull request.
Owner
Mehrdad Arshad Rad
Cloud, Automation, Network, Go and Open Source enthusiast.
Mehrdad Arshad Rad
Similar Resources

Make TCP connection storm between server and client for benchmarking network stuff

Make TCP connection storm between server and client for benchmarking network stuff

Nov 14, 2021

🌍 Package tcplisten provides a customizable TCP net.Listener with various performance-related options

Package tcplisten provides customizable TCP net.Listener with various performance-related options: SO_REUSEPORT. This option allows linear scaling ser

Nov 14, 2022

Send network packets over a TCP or UDP connection.

Packet is the main class representing a single network message. It has a byte code indicating the type of the message and a []byte type payload.

Nov 28, 2022

:vulcan_salute: Fast, modern, easy-to-use network scanner

sx is the command-line network scanner designed to follow the UNIX philosophy. The goal of this project is to create the fastest network scanner with

Jan 2, 2023

Modern network boot server.

Modern network boot server.

bofied demo.mp4 Modern network boot server. Overview bofied is a network boot server. It provides everything you need to PXE boot a node, from a (prox

Dec 17, 2022

A TCP proxy used to expose services onto a tailscale network without root. Ideal for container environments.

tailscale-sidecar This is barely tested software, I don't guarantee it works but please make an issue if you use it and find a bug. Pull requests are

Dec 30, 2022

🐶 A modern alternative network traffic sniffer.

🐶  A modern alternative network traffic sniffer.

sniffer A modern alternative network traffic sniffer inspired by bandwhich(Rust) and nethogs(C++). sniffer.mov Introduction 中文介绍 sniffer is designed f

Dec 29, 2022

Service that calls uzma24/project1 service, takes input from .txt file and prints JSON output returned from the service.

Service that calls uzma24/project1 service, takes input from .txt file and prints JSON output returned from the service. Program can take large input files.

Feb 6, 2022
Comments
  • simplify docker build script

    simplify docker build script

    Hi mehrdadrad:

    1. we can simplify image build script, as the docker documentation says: If the WORKDIR doesn’t exist, it will be created, so we can just use WORKDIR /go/src/github.com/mehrdadrad/tcpprobe replace multiple lines, and then copy current dir to the container

    2. I test this on my laptop, it works fine

    docker build -t  mehrdadrad/tcpprobe:v0.2  .
    ...........                                                                                                                                                  
     ---> b870df39c040
    Step 6/9 : FROM alpine
     ---> d6e46aa2470d
    Step 7/9 : COPY --from=builder /go/src/github.com/mehrdadrad/tcpprobe/tcpprobe /usr/bin/
     ---> Using cache
     ---> c33729cb2037
    Step 8/9 : EXPOSE 8081
     ---> Using cache
     ---> 2658e857863b
    Step 9/9 : ENTRYPOINT ["tcpprobe"]
     ---> Using cache
     ---> 2440e7304aff
    Successfully built 2440e7304aff
    Successfully tagged mehrdadrad/tcpprobe:v0.2
    
    docker container run --rm mehrdadrad/tcpprobe:v0.2 https://cn.bing.com                                                                                                                                                                     
    Target:https://cn.bing.com IP:202.89.233.100 Timestamp:1607011996
    State:1 CaState:0 Retransmits:0 Probes:0 Backoff:0 Options:6 Rto:230000 Ato:40000 SndMss:1412 RcvMss:1412 Unacked:0 Sacked:0 Lost:0 Retrans:0 Fackets:0 LastDataSent:130 LastAckSent:0 LastDataRecv:0 LastAckRecv:4 Pmtu:1500 RcvSsthresh:64076 Rtt:27506 Rttvar:6368 SndSsthresh:2147483647 SndCwnd:10 Advmss:1460 Reordering:3 RcvRtt:0 RcvSpace:14600 TotalRetrans:0 HTTPStatusCode:200 HTTPRcvdBytes:112920 HTTPRequest:229663 HTTPResponse:32820 DNSResolve:27775 TCPConnect:27406 TLSHandshake:131382 TCPConnectError:0 DNSResolveError:0 
    
  • ARM Support?

    ARM Support?

    Looks like a number of values are not available when running docker on ARM or maybe rasberrypi specifically?

    • RTO
    • RcvMss
    • SndMss
    • pmtu
    • RTT
    • Congestion window size

    Is this a platform limitation? I used the default docker-compose file when I cloned the repo on both x86 and arm, and the arm one doesn't display these values.

  • TCPProbe annotations on pods didn't make pod probed

    TCPProbe annotations on pods didn't make pod probed

    The tcpprobe seems to work well in the k3s cluster. It probes some sites continuously and I can see tcp-related metrics in the Prometheus and Grafana. I follow the config file described in https://github.com/mehrdadrad/tcpprobe/wiki/helm , where i set a nginx deployment and annotate it to tell tcpprobe to "probe" it.
    But after that I deployed the Nginx server. I found several things confusing.

    • the annotation tcpprobe/targets: "http://PODIP:80" didn't get rewritten , which means that PODIP is literally PODIP and so i know the Nginx won't be "probed"
    • even if i fill the right ip address of the nginx server using another pod's annotation, the Nginx server still didn't get probed. I see no data in the metrics it expose.

    Env: OS X + k3d cluster (k3s in docker)

    I would appreciate all the help, thanks!

    apiVersion: apps/v1 
    kind: Deployment
    metadata:
      name: nginx-deployment
    spec:
      selector:
        matchLabels:
          app: nginx
      replicas: 1
      template:
        metadata:
          labels:
            app: nginx
          annotations:
            tcpprobe/targets: "http://PODIP:80"
            tcpprobe/interval: "10s"
            tcpprobe/labels: '{"app": "nginx"}'
        spec:
          containers:
            - name: nginx
              image: nginx:latest
              ports:
                - containerPort: 80
    
eBPF based TCP observability.
eBPF based TCP observability.

TCPDog is a total solution from exporting TCP statistics from Linux kernel by eBPF very efficiently to store them at your Elasticsearch or InfluxDB da

Jan 3, 2023
🚀Gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.
🚀Gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.

gev 中文 | English gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily bui

Jan 6, 2023
A high-performance concurrent scanner written by go, which can be used for survival detection, tcp port detection, and web service detection.
A high-performance concurrent scanner written by go, which can be used for survival detection, tcp port detection, and web service detection.

aScan A high-performance concurrent scanner written by go, which can be used for survival detection, tcp port detection, and web service detection. Fu

Aug 15, 2022
TcpRoute , TCP 层的路由器。对于 TCP 连接自动从多个线路(电信、联通、移动)、多个域名解析结果中选择最优线路。

TcpRoute2 TcpRoute , TCP 层的路由器。对于 TCP 连接自动从多个线路(允许任意嵌套)、多个域名解析结果中选择最优线路。 TcpRoute 使用激进的选路策略,对 DNS 解析获得的多个IP同时尝试连接,同时使用多个线路进行连接,最终使用最快建立的连接。支持 TcpRoute

Dec 27, 2022
Multiplexer over TCP. Useful if target server only allows you to create limited tcp connections concurrently.

tcp-multiplexer Use it in front of target server and let your client programs connect it, if target server only allows you to create limited tcp conne

May 27, 2021
TCP output for beats to send events over TCP socket.

beats-tcp-output How To Use Clone this project to elastic/beats/libbeat/output/ Modify elastic/beats/libbeat/publisher/includes/includes.go : // add i

Aug 25, 2022
Tcp chat go - Create tcp chat in golang

TCP chat in GO libs Go net package and goroutines and channels tcp tcp or transm

Feb 5, 2022
Ethr is a Comprehensive Network Measurement Tool for TCP, UDP & ICMP.
Ethr is a Comprehensive Network Measurement Tool for TCP, UDP & ICMP.

Ethr Ethr is a cross platform network performance measurement tool written in golang. The goal of this project is to provide a native tool for compreh

Jan 2, 2023
:alarm_clock: :fire: A TCP proxy to simulate network and system conditions for chaos and resiliency testing
:alarm_clock: :fire: A TCP proxy to simulate network and system conditions for chaos and resiliency testing

Toxiproxy Toxiproxy is a framework for simulating network conditions. It's made specifically to work in testing, CI and development environments, supp

Jan 7, 2023
Toxiproxy - A TCP proxy to simulate network and system conditions for chaos and resiliency testing
Toxiproxy - A TCP proxy to simulate network and system conditions for chaos and resiliency testing

Toxiproxy is a framework for simulating network conditions. It's made specifically to work in testing, CI and development environments, supp

Nov 3, 2021