Ping monitoring engine used in https://ping.gg

Overview

Disclaimer: If you are new to Go this is not a good place to learn best practices, the code is not very idiomatic and there's probably a few bad ideas.

What's this?

pingd is the ping engine used by the ping.gg monitoring service. It allows to simultaneously ping hundreds of IPs and can manage which hosts are being pinged during runtime.

The system is meant to be composed (or embedded) by you and requires up to 3 compatible functions to:

  1. load an initial set of hosts to monitor
  2. receive commands to start and stop monitoring a given host
  3. publish host UP or host DOWN events

These functions must be the following types respectively.

type Loader func(chan<- Host)
type Receiver func(chan<- Host, chan<- Host)
type Notifier func(<-chan Host)

There are some implementations of these functions available under pingd/io.

Usage example

NOTE: Before you run anything, remember that ICMP echo (ping) requires root privileges for raw socket access. If you don't want to sudo every time consider using setuid

To create your own private ping.gg alternative:

 # get the example
export GOPATH=$PWD
go get github.com/pinggg/pingd/examples/httpmail

 # start pinging 8.8.8.8 and 8.8.4.4 and email you if they go down
sudo bin/httpmail [email protected] 8.8.8.8 8.8.4.4

 # add a new host while running
curl localhost:7700/4.4.2.2

 # stop pinging 8.8.4.4
curl -XDELETE localhost:7700/8.8.4.4

Keep in mind that this is just an example which assumes that there is a local mail server running on port 25. Take a look at the sendMail function and adapt it to your needs. For example, to send the emails via Gmail.

https://ping.gg uses in production a configuration like the redis example allowing the website to interact with pingd via redis pub/sub.

You can add your own functions to have pingd interact with the world. For example, switching on some red light with the help of a Raspberry Pi.

Issues
  • Request Custom Ping Time

    Request Custom Ping Time

    Command Example: curl ping.gg/[email protected]/domain.com/time

    Time Format Example:

    • 30m -- 30 minuts between pings
    • 1h -- 1 hour between pings
    • 3h -- 3 hours between pings
    • 12h -- 12 hours between pings
    • 1d -- 1 day between pings
    • 1w -- 1 week between pings
    opened by ghost 0
Simple and extensible monitoring agent / library for Kubernetes: https://gravitational.com/blog/monitoring_kubernetes_satellite/

Satellite Satellite is an agent written in Go for collecting health information in a kubernetes cluster. It is both a library and an application. As a

Teleport 194 Jul 10, 2022
综合性网络质量(PING)检测工具,支持正/反向PING绘图、互PING拓扑绘图与报警、全国PING延迟地图与在线检测工具等功能

SmartPing | 开源、高效、便捷的网络质量监控神器 一个综合性网络质量(PING)检测工具,支持正/反向PING绘图、互PING拓扑绘图与报警、全国PING延迟地图与在线检测工具等功能 -- Browse website -- 功能 正向PING,反向Ping绘图 互PING间机器的状态拓扑

SmartPing 1.3k Aug 4, 2022
A flexible process data collection, metrics, monitoring, instrumentation, and tracing client library for Go

Package monkit is a flexible code instrumenting and data collection library. See documentation at https://godoc.org/gopkg.in/spacemonkeygo/monkit.v3 S

Space Monkey Go 465 Aug 1, 2022
The Prometheus monitoring system and time series database.

Prometheus Visit prometheus.io for the full documentation, examples and guides. Prometheus, a Cloud Native Computing Foundation project, is a systems

Prometheus 43.7k Aug 4, 2022
A GNU/Linux monitoring and profiling tool focused on single processes.

Uroboros is a GNU/Linux monitoring tool focused on single processes. While utilities like top, ps and htop provide great overall details, they often l

Simone Margaritelli 648 Jul 26, 2022
Open source framework for processing, monitoring, and alerting on time series data

Kapacitor Open source framework for processing, monitoring, and alerting on time series data Installation Kapacitor has two binaries: kapacitor – a CL

InfluxData 2.1k Aug 3, 2022
rtop is an interactive, remote system monitoring tool based on SSH

rtop rtop is a remote system monitor. It connects over SSH to a remote system and displays vital system metrics (CPU, disk, memory, network). No speci

RapidLoop 2k Aug 7, 2022
distributed monitoring system

OWL OWL 是由国内领先的第三方数据智能服务商 TalkingData 开源的一款企业级分布式监控告警系统,目前由 Tech Operation Team 持续开发更新维护。 OWL 后台组件全部使用 Go 语言开发,Go 语言是 Google 开发的一种静态强类型、编译型、并发型,并具有垃圾回

null 821 Jul 30, 2022
A system and resource monitoring tool written in Golang!

Grofer A clean and modern system and resource monitor written purely in golang using termui and gopsutil! Currently compatible with Linux only. Curren

PES Open Source Community 214 Aug 6, 2022
An open-source and enterprise-level monitoring system.

Falcon+ Documentations Usage Open-Falcon API Prerequisite Git >= 1.7.5 Go >= 1.6 Getting Started Docker Please refer to ./docker/README.md. Build from

Open-Falcon 6.9k Aug 5, 2022
Distributed simple and robust release management and monitoring system.

Agente Distributed simple and robust release management and monitoring system. **This project on going work. Road map Core system First worker agent M

StreetByters Community 31 Mar 3, 2022
Gowl is a process management and process monitoring tool at once. An infinite worker pool gives you the ability to control the pool and processes and monitor their status.

Gowl is a process management and process monitoring tool at once. An infinite worker pool gives you the ability to control the pool and processes and monitor their status.

Hamed Yousefi 33 Aug 11, 2022
checkah is an agentless SSH system monitoring and alerting tool.

CHECKAH checkah is an agentless SSH system monitoring and alerting tool. Features: agentless check over SSH (password, keyfile, agent) config file bas

deadc0de 7 Aug 5, 2022
mtail - extract internal monitoring data from application logs for collection into a timeseries database

mtail - extract internal monitoring data from application logs for collection into a timeseries database mtail is a tool for extracting metrics from a

Google 3.3k Aug 9, 2022
SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. 🔥 🖥. 👉 Open source Application Performance Monitoring (APM) & Observability tool

Monitor your applications and troubleshoot problems in your deployed applications, an open-source alternative to DataDog, New Relic, etc. Documentatio

SigNoz 4.7k Sep 24, 2021
Detecctor is a ⚡ fast, fully customizable 💗 monitoring platform. It uses Telegram as a notification 📥 service

Detecctor is a ⚡ fast, fully customizable ?? monitoring platform. It uses Telegram as a notification ?? service. The main components are a TCP server, MongoDB and multiple clients.

null 2 Nov 16, 2021
Cloudprober is a monitoring software that makes it super-easy to monitor availability and performance of various components of your system.

Cloudprober is a monitoring software that makes it super-easy to monitor availability and performance of various components of your system. Cloudprobe

null 170 Aug 9, 2022
Next Generation Monitoring Server With Golang

Next Generation Monitoring Server Build make Arguments $ bin/ng-monitoring-server --help Usage of bin/ng-monitoring-server: --address string

PingCAP 22 Jun 29, 2022
Monitoring service uses variables with golang

Monitoring service Setting up Monitoring service uses variables. If no variables are set, the default values listed below will be used: PORT=8000 SECR

ולדי 0 Oct 8, 2021