Giter Club home page Giter Club logo

network-watcher's Introduction

Network Watcher

This is an application that acts as both client and server to monitor network connections.

It's designed to respond to other instances of itself, so you would run this in multiple machines and watch the traffic between them.

I originally created to watch the effect of Kubernetes network policies as I modified them.

Installation

To install, just run go get github.com/jmhobbs/network-watcher

Alternatively, I have a Docker image you can use at https://hub.docker.com/r/jmhobbs/network-watcher/

Usage

usage: ./network-watcher [options] hostname:port ...
  -interval duration
      time between polling targets (default 5s)
  -port int
      port to listen on (default 4444)
  -verbose
      extra output

Example

In this example run, three instances exist: isolated, unisolated and unisolated-too. The connection between isolated and unisolated-too is blocked, everything else is permitted.

$ kubectl logs unisolated-66cf5b9fc8-hn7t7
2018/02/10 17:05:41 isolated:4444 UP
2018/02/10 17:05:41 unisolated-too:4444 UP
2018/02/10 17:05:46 isolated:4444 UP
2018/02/10 17:05:46 unisolated-too:4444 UP
2018/02/10 17:05:51 isolated:4444 UP
2018/02/10 17:05:51 unisolated-too:4444 UP
$ kubectl logs unisolated-too-5468649df4-zl6vp
2018/02/10 17:05:42 isolated:4444 DOWN dial tcp 10.63.42.6:4444: i/o timeout
2018/02/10 17:05:42 unisolated:4444 UP
2018/02/10 17:05:48 isolated:4444 DOWN dial tcp 10.63.42.6:4444: i/o timeout
2018/02/10 17:05:48 unisolated:4444 UP
2018/02/10 17:05:54 isolated:4444 DOWN dial tcp 10.63.42.6:4444: i/o timeout
2018/02/10 17:05:54 unisolated:4444 UP
2018/02/10 17:06:00 isolated:4444 DOWN dial tcp 10.63.42.6:4444: i/o timeout
2018/02/10 17:06:00 unisolated:4444 UP

That's all there is to it.

network-watcher's People

Contributors

jmhobbs avatar

Stargazers

Doru Carastan avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.