{"id":43236807,"url":"https://github.com/servak/mping","last_synced_at":"2026-02-01T11:05:10.579Z","repository":{"id":55662147,"uuid":"58225054","full_name":"servak/mping","owner":"servak","description":"mping is a multi-target, multi-protocol network monitoring tool","archived":false,"fork":false,"pushed_at":"2025-09-30T05:55:17.000Z","size":462,"stargazers_count":17,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-22T15:02:32.901Z","etag":null,"topics":["dns","http","icmp","icmpv6","ntp","ping"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/servak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-05-06T17:51:55.000Z","updated_at":"2025-11-09T14:29:40.000Z","dependencies_parsed_at":"2024-06-19T09:56:52.488Z","dependency_job_id":"809c8ebe-0a31-4a07-8d3f-46a7091b5712","html_url":"https://github.com/servak/mping","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/servak/mping","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/servak%2Fmping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/servak%2Fmping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/servak%2Fmping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/servak%2Fmping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/servak","download_url":"https://codeload.github.com/servak/mping/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/servak%2Fmping/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28977317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T09:57:52.632Z","status":"ssl_error","status_checked_at":"2026-02-01T09:57:49.143Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","http","icmp","icmpv6","ntp","ping"],"created_at":"2026-02-01T11:04:53.928Z","updated_at":"2026-02-01T11:05:10.572Z","avatar_url":"https://github.com/servak.png","language":"Go","readme":"mping\n=====\n\n![CI](https://github.com/servak/mping/actions/workflows/ci.yml/badge.svg)\n\n**mping** is a multi-target, multi-protocol network monitoring tool that extends traditional ping functionality. Monitor multiple hosts and services simultaneously with real-time statistics and an interactive terminal UI.\n\n## Features\n\n- 🎯 **Multi-target monitoring**: Monitor dozens of hosts simultaneously\n- 🌐 **Multi-protocol support**: ICMP, HTTP/HTTPS, TCP, DNS, and NTP monitoring\n- 📊 **Real-time statistics**: Live success rates, response times, and packet loss\n- 🖥️ **Interactive TUI**: Clean terminal interface with sortable results\n- ⚡ **High performance**: Concurrent probing with configurable intervals\n- 📁 **Batch mode**: Non-interactive mode for scripting and automation\n\n## Supported Protocols\n\n| Protocol | Format | Example | Description |\n|----------|--------|---------|-------------|\n| **ICMP v4** | `hostname`, `subnet`, or `icmpv4://hostname` | `8.8.8.8`, `192.168.1.0/24`, `icmpv4://google.com` | Traditional ping functionality with subnet support |\n| **ICMP v6** | `icmpv6://hostname` | `icmpv6://google.com` | IPv6 ping support |\n| **HTTP/HTTPS** | `http://url` or `https://url` | `https://google.com` | Web service monitoring |\n| **TCP** | `tcp://host:port` | `tcp://google.com:443` | Port connectivity testing |\n| **DNS** | `dns://[server[:port]]/domain[/record_type]` | `dns://8.8.8.8/google.com/A`, `dns:///google.com` | DNS query monitoring |\n| **NTP** | `ntp://[server[:port]]` | `ntp://pool.ntp.org`, `ntp://time.google.com:123` | Network Time Protocol monitoring |\n\n## Demo\n\n![Demo](mping.gif)\n\n## Install\n\nhttps://github.com/servak/mping/releases\n\n## Build\n\n```\ngo install github.com/servak/mping/cmd/mping@latest\n```\n## Permission\n\n```\nsudo setcap cap_net_raw=+ep mping\n```\n\nor\n\n```\nsudo chown root mping\nsudo chmod u+s mping\n```\n\n## Quick Start\n\n### Basic usage\n```bash\n# Monitor multiple hosts with ICMP\nmping 8.8.8.8 1.1.1.1 google.com\n\n# Monitor entire subnet ranges\nmping 192.168.1.0/24 10.0.0.0/29\n\n# Mix different protocols\nmping google.com https://google.com tcp://google.com:443\n\n# Monitor web services\nmping https://github.com https://google.com http://httpbin.org\n\n# IPv6 support\nmping icmpv6://google.com icmpv6://2001:4860:4860::8888\n\n# DNS monitoring with explicit servers\nmping dns://8.8.8.8/google.com/A dns://1.1.1.1/cloudflare.com/AAAA\n\n# DNS monitoring with defaults (uses 8.8.8.8:53, A record)\nmping \"dns:///google.com\" \"dns:///github.com\"\n\n# NTP time synchronization monitoring\nmping ntp://pool.ntp.org ntp://time.google.com:123\n\n# Mixed protocol monitoring\nmping google.com https://google.com ntp://time.google.com\n```\n\n### Batch mode for automation\n```bash\n# Run 10 probes and exit\nmping batch --count 10 google.com https://api.example.com\n\n# Monitor subnet ranges in batch mode\nmping batch --count 5 192.168.1.0/29\n\n# Use with external host lists\nmping batch -f hosts.txt --count 5\n```\n\n## Target Expansion\n\nmping supports powerful target expansion syntax for monitoring large numbers of hosts efficiently:\n\n### Bracket Expansion\nUse square brackets `[]` to specify multiple targets with patterns:\n\n#### Numeric Ranges\n```bash\n# Basic numeric range\nmping server[1-5].example.com\n# Expands to: server1.example.com, server2.example.com, ..., server5.example.com\n\n# Zero-padded ranges (auto-detected from start format)\nmping web[01-10].example.com\n# Expands to: web01.example.com, web02.example.com, ..., web10.example.com\n\n# Three-digit padding\nmping host[001-100].datacenter.com\n# Expands to: host001.datacenter.com, host002.datacenter.com, ..., host100.datacenter.com\n```\n\n#### Character Ranges\n```bash\n# Lowercase letters\nmping server[a-d].example.com\n# Expands to: servera.example.com, serverb.example.com, serverc.example.com, serverd.example.com\n\n# Uppercase letters\nmping db[A-C].cluster.internal\n# Expands to: dbA.cluster.internal, dbB.cluster.internal, dbC.cluster.internal\n```\n\n#### List Expansion\n```bash\n# Comma-separated lists\nmping service[web,api,db].example.com\n# Expands to: serviceweb.example.com, serviceapi.example.com, servicedb.example.com\n\n# Mixed environments\nmping app[dev,staging,prod].company.com\n# Expands to: appdev.company.com, appstaging.company.com, appprod.company.com\n```\n\n#### Multiple Brackets (Combinations)\n```bash\n# Multiple expansion points\nmping server[1-2].[dev,prod].example.com\n# Expands to: server1.dev.example.com, server1.prod.example.com, \n#            server2.dev.example.com, server2.prod.example.com\n\n# Protocol-specific monitoring\nmping https://api[1-3].[us,eu].service.com/health\n```\n\n#### Advanced Use Cases\n```bash\n# Infrastructure monitoring\nmping db[01-05].cluster[a-c].datacenter.com\n\n# Multi-region web services\nmping https://[web,api,cdn][1-3].[us-west,eu-central].example.com\n\n# Network equipment\nmping switch[01-24].rack[a-f].datacenter.internal\n```\n\n### File-based Expansion\nBracket expansion also works in target files (`-f` option):\n\n```bash\n# Create targets.txt\ncat \u003e targets.txt \u003c\u003c EOF\n# Web tier\nweb[01-05].prod.example.com\napi[1-3].prod.example.com\n\n# Database tier  \ndb[01-02].[master,slave].prod.example.com\n\n# Monitoring endpoints\nhttps://health[1-5].prod.example.com/status\nEOF\n\n# Monitor all expanded targets\nmping -f targets.txt\n```\n\n### Combination with CIDR Ranges\nBracket expansion works alongside CIDR notation:\n\n```bash\n# Mix bracket expansion with subnet ranges\nmping server[1-3].example.com 192.168.1.0/29\n\n# In files\necho \"web[01-03].prod.example.com\" \u003e\u003e targets.txt\necho \"10.0.1.0/28\" \u003e\u003e targets.txt\nmping -f targets.txt\n```\n\n### Key Features\n- **Cross-platform**: Works on Windows, macOS, and Linux\n- **Shell-independent**: Unlike bash `{}` expansion, works in files and non-bash environments  \n- **Zero-padding intelligence**: Automatically detects and maintains padding format\n- **Error handling**: Invalid patterns are preserved as-is (e.g., `[5-1]` stays `[5-1]`)\n- **Protocol support**: Works with all protocol prefixes (`https://`, `tcp://`, `dns://`, etc.)\n\n## DNS Monitoring Details\n\n### DNS Target Format\n```\ndns://[server[:port]]/domain[/record_type]\n```\n\n- **server**: DNS server IP or hostname (optional, defaults to 8.8.8.8)\n- **port**: DNS server port (optional, defaults to 53)\n- **domain**: Domain name to query (required)\n- **record_type**: DNS record type (optional, defaults to A)\n\n### Supported Record Types\nA, AAAA, CNAME, MX, NS, PTR, SOA, SRV, TXT\n\n### DNS Examples\n```bash\n# Basic A record query using default server (8.8.8.8:53)\nmping \"dns:///google.com\"\n\n# Explicit server and record type\nmping dns://1.1.1.1/google.com/AAAA\n\n# Custom port\nmping dns://dns-server:5353/example.com/MX\n\n# Multiple DNS queries\nmping dns://8.8.8.8/google.com/A dns://1.1.1.1/google.com/AAAA\n```\n\n### Default Configuration\nDNS queries use these defaults (configurable via ~/.mping.yml):\n- Server: 8.8.8.8\n- Port: 53\n- Record Type: A\n- Protocol: UDP\n\n## Usage\n\n```\nUsage:\n  mping [IP or HOSTNAME]... [flags]\n  mping [command]\n\nExamples:\nmping 1.1.1.1 8.8.8.8\nmping 192.168.1.0/24\nmping icmpv6://google.com\nmping http://google.com\nmping ntp://pool.ntp.org\nmping tcp://google.com:443 https://google.com ntp://time.google.com 8.8.8.8\n\nAvailable Commands:\n  batch       Disables TUI and performs probing for a set number of iterations\n  help        Help about any command\n\nFlags:\n  -c, --config string      config path (default \"~/.mping.yml\")\n  -f, --filename string    use contents of file\n  -h, --help               help for mping\n  -I, --interface string   source interface (name or IP address)\n  -i, --interval int       interval(ms) (default 1000)\n  -t, --timeout int        timeout(ms) (default 1000)\n  -n, --title string       print title\n  -v, --version            Display version\n\nUse \"mping [command] --help\" for more information about a command.\n```\n\n## Configuration\n\nmping supports flexible configuration through YAML files located at `~/.mping.yml`. This allows you to customize behavior for different protocols and create custom prober profiles.\n\n### Configuration File Structure\n\n```yaml\n# Default prober to use for plain hostnames (e.g., when running \"mping google.com\")\ndefault: icmpv4\n\n# Custom prober configurations\nprober:\n  # ICMP v4 configuration\n  icmpv4:\n    probe: icmpv4\n    icmp:\n      body: \"mping\"           # ICMP payload (default: \"mping\")\n      tos: 0                  # Type of Service (0-255)\n      ttl: 64                 # Time to Live (0-255)\n      source_interface: \"\"    # Source interface name or IP\n  \n  # ICMP v6 configuration\n  icmpv6:\n    probe: icmpv6\n    icmp:\n      body: \"mping\"\n      ttl: 64\n      source_interface: \"\"\n  \n  # HTTP configuration\n  http:\n    probe: http\n    http:\n      expect_codes: \"200-299\"     # Expected HTTP status codes\n      expect_body: \"\"             # Expected response body (optional)\n      headers:                    # Custom headers (optional)\n        User-Agent: \"mping/1.0\"\n      redirect_off: false         # Disable redirect following\n  \n  # HTTPS configuration\n  https:\n    probe: http\n    http:\n      expect_codes: \"200-299\"\n      expect_body: \"\"\n      headers: {}\n      redirect_off: false\n      tls:\n        skip_verify: true         # Skip TLS certificate verification\n  \n  # TCP configuration\n  tcp:\n    probe: tcp\n    tcp:\n      source_interface: \"\"        # Source interface for connections\n  \n  # DNS configuration\n  dns:\n    probe: dns\n    dns:\n      server: \"8.8.8.8\"          # DNS server IP (required)\n      port: 53                   # DNS server port (1-65535)\n      record_type: \"A\"           # Default record type\n      use_tcp: false             # Use TCP instead of UDP\n      recursion_desired: true    # Enable recursive queries\n      expect_codes: \"\"           # Expected DNS response codes (optional)\n  \n  # NTP configuration\n  ntp:\n    probe: ntp\n    ntp:\n      server: \"pool.ntp.org\"     # NTP server IP or hostname (required)\n      port: 123                  # NTP server port (1-65535, default: 123)\n      max_offset: \"5s\"           # Maximum time offset before alert (e.g., \"100ms\", \"5s\")\n\n# UI configuration\nui:\n  cui:\n    border: true                  # Show border around TUI\n```\n\n### HTTP Status Code Patterns\n\nThe `expect_codes` field supports flexible status code matching:\n\n```yaml\n# Single status code\nexpect_codes: \"200\"\n\n# Status code range\nexpect_codes: \"200-299\"\n\n# Multiple specific codes\nexpect_codes: \"200,201,202\"\n\n# Mixed patterns\nexpect_codes: \"200,201,300-399,404\"\n\n# Empty means accept any status code\nexpect_codes: \"\"\n```\n\n### DNS Response Code Patterns\n\nDNS queries support similar pattern matching for response codes:\n\n```yaml\n# Accept only successful responses\nexpect_codes: \"0\"\n\n# Accept successful or non-authoritative responses\nexpect_codes: \"0,5\"\n\n# Accept range of codes\nexpect_codes: \"0-5\"\n```\n\nCommon DNS response codes:\n- `0`: No error (NOERROR)\n- `1`: Format error (FORMERR)\n- `2`: Server failure (SERVFAIL)\n- `3`: Name error (NXDOMAIN)\n- `5`: Refused (REFUSED)\n\n### Custom Prober Names\n\nYou can create custom prober configurations with any name:\n\n```yaml\nprober:\n  # Custom fast HTTP checker\n  api-check:\n    probe: http\n    http:\n      expect_codes: \"200,201\"\n      headers:\n        Authorization: \"Bearer token\"\n  \n  # Custom internal network ICMP\n  internal-ping:\n    probe: icmpv4\n    icmp:\n      body: \"internal-check\"\n      source_interface: \"eth1\"\n  \n  # Custom strict NTP checker\n  ntp-strict:\n    probe: ntp\n    ntp:\n      server: \"time.google.com\"\n      port: 123\n      max_offset: \"100ms\"\n```\n\nUse custom probers with the prefix format:\n```bash\nmping api-check://api.example.com internal-ping://192.168.1.1 ntp-strict://pool.ntp.org\n```\n\n### Configuration Validation\n\nmping validates configuration files at startup and provides detailed error messages for invalid settings:\n\n```bash\n# Example validation errors\n$ mping google.com\nError: multiple validation errors: \n  prober 'http': invalid expect_codes pattern: 200-;\n  prober 'dns': DNS server is required;\n  default prober 'invalid' not found in prober configurations\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservak%2Fmping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fservak%2Fmping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservak%2Fmping/lists"}