@redredchen01/monitoring-tools
v1.0.0
Published
Network monitoring and health check CLI — ping, healthcheck, port-scan, uptime, alert, dashboard, watch
Downloads
18
Maintainers
Readme
@redredchen01/monitoring-tools
Network monitoring and health check CLI — ping, healthcheck, port-scan, uptime, alert, dashboard, watch
Install
npm install -g @redredchen01/monitoring-toolsQuick Start
monitoring-tools ping --host google.com
monitoring-tools healthcheck --url https://example.com
monitoring-tools port-scan --host 192.168.1.1 --ports 22,80,443
monitoring-tools uptime --url https://example.com --count 5
monitoring-tools dashboard --config ./monitoring.jsonCommands
ping — Measure latency
ICMP ping to a host or HTTP ping to a URL. Reports avg/min/max latency and packet loss.
monitoring-tools ping --host 8.8.8.8 --count 10
monitoring-tools ping --url https://example.com --count 5 --jsonOptions: --host HOST, --url URL, --count N, --timeout SECS, --json
healthcheck — HTTP health check
Validate HTTP status code and response time. Exits 0 on pass, 1 on fail.
monitoring-tools healthcheck --url https://api.example.com/health
monitoring-tools healthcheck --url https://example.com --expected-status 200 --max-time 2Options: --url URL, --expected-status CODE, --max-time SECS, --method METHOD, --json
port-scan — Scan open ports
Scan a host's ports using bash /dev/tcp or nc. Reports open ports with service names.
monitoring-tools port-scan --host example.com
monitoring-tools port-scan --host 192.168.1.1 --ports 1-1024 --timeout 1Options: --host HOST, --ports RANGE, --timeout SECS, --json
uptime — Availability monitoring
Run repeated HTTP checks and report uptime percentage. Single-run (not a daemon).
monitoring-tools uptime --url https://example.com --count 20 --interval 10Options: --url URL, --count N, --interval SECS, --json
alert — Threshold alerting
Compare a numeric value against a threshold. Reads from --value or stdin.
Exits 0 if OK, exits 1 if threshold exceeded.
monitoring-tools alert --value 95 --threshold 90 --above
echo "3" | monitoring-tools alert --threshold 5 --below --message "Too few workers"Options: --value N, --threshold N, --above, --below, --message MSG, --json
dashboard — Multi-URL summary
Check multiple URLs from a JSON config or stdin and display a summary table.
monitoring-tools dashboard --config ./monitoring.json
echo '[{"url":"https://example.com","name":"Main"}]' | monitoring-tools dashboardConfig format: JSON array with url (required) and name (optional) per entry.
Options: --config FILE, --timeout SECS, --json
watch — Periodic command runner
Re-run any shell command at an interval, displaying output with timestamps.
monitoring-tools watch --interval 5 --count 12 -- curl -s https://example.com/status
monitoring-tools watch --diff --count 6 -- df -hOptions: --interval SECS, --count N, --diff, --json
Pipe Protocol
All commands support --json for structured output compatible with the Skill Foundry pipe protocol:
# Alert if uptime drops below 95%
monitoring-tools uptime --url https://example.com --count 10 --json | \
monitoring-tools alert --threshold 95 --below --message "Uptime degraded"
# Dashboard output piped downstream
monitoring-tools dashboard --config ./urls.json --json | some-other-toolLicense
MIT
