Giter Site home page Giter Site logo

jewertow / nsfd Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 53 KB

NSFD (Network Service Failure Detector) is a not production ready monitoring system for network services.

CMake 4.65% C++ 93.23% C 1.00% Dockerfile 1.11%
tcp icmp bsd-sockets socket-programming networking

nsfd's Introduction

NSFD

What is NSFD?

NSFD (Network Service Failure Detector) is an academic project as a part of the course "Computer Networks". It is a simple monitoring system that verifies the connection with a server (via the ICMP protocol) and checks the availability of a network service running on a specific port by establishing a TCP connection.

Additionally NSFD measures and collects connection time for both protocols - ICMP and TCP.

NSFD runs two TCP servers that allows for defining health checks and reading metrics.

Building and running in docker container

docker build -t nsfd-server:latest .
docker run -it -p 8000:8000 -p 8001:8001 --name nsfd-server --privileged nsfd-server:latest

Using with netcat as a client

Define scheduling health checks for facebook:

echo -n "create;facebook.com;80" | nc localhost 8000

First column is an action, second is a domain or IP address and third is a port of a network service to monitor.

Reading metrics:

echo -n "facebook.com" | nc localhost 8001

It will return results of health checks and connection time in the following format:

1;17.8211;1;18.2539;1595454676038
  • 1st column is 1 or 0 - connection between services is possible or not.
  • 2nd column is a connection time for ICMP protocol.
  • 3rd column is 1 or 0 - defined network service is health or not.
  • 4th column is a connection time for TCP protocol.

Simulating ICMP connection failure

Run the command from the running container:

iptables -A OUTPUT -d facebook.com -j DROP

Now ICMP connections should fail. To restore the connection between servers execute command:

iptables -D OUTPUT -d facebook.com -j DROP

GUI

NSFD has also dedicated desktop client available here: https://github.com/jewertow/nsfd-client

It provides GUI to configure health checks and display metrics on charts.

nsfd's People

Contributors

jewertow avatar

Watchers

 avatar

nsfd's Issues

Configurable ports

NSFD has fixed port in the main function. It should be possible to configure it with input argument.

Introduce request handlers

For now NSFD runs dedicated server for each feature.
NSFD should provide API to create request handlers for each feature that would be registered in a single server instead of running multiple servers.

Unify logging

For now nsfd uses multiple functions to logging: printf, fprintf and cout.
A function used to logging should be the same in the whole code base.

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.