golang script to check server & port status

netcheck

Simple script to check if host alive by sending ICMP messages & TCP Port checks.

ICMP messages not working without sudo privileges.

usage

netcheck -help
Usage of netcheck:
  -host string
        Server ip or name to check.
  -interval int
        Check interval in seconds. (default 1)
  -only_errors
        Print only fails.
  -port int
        Server TCP port to check.
  -timeout int
        Connection timeout in seconds. (default 5)

examples

 sudo netcheck -host ya.ru -port 80
2021/10/13 16:54:52 Starting tcp port check: ya.ru:80
2021/10/13 16:54:52 Connection success to "ya.ru:80"
2021/10/13 16:54:54 Connection success to "ya.ru:80"
^C
❯ sudo netcheck -host ya.ru -port 3366 -only_errors
2021/10/13 16:55:04 Starting tcp port check: ya.ru:3366
ERROR: 2021/10/13 16:55:09 Connection fail to "ya.ru:3366" within 5 seconds. PING: OK, TCP_PORT: FAIL
ERROR: 2021/10/13 16:55:16 Connection fail to "ya.ru:3366" within 5 seconds. PING: OK, TCP_PORT: FAIL
^C
❯ sudo netcheck -host 192.168.8.119 -port 22
2021/10/13 16:56:56 Starting tcp port check: 192.168.8.119:22
2021/10/13 16:56:56 Connection success to "192.168.8.119:22"
2021/10/13 16:56:57 Connection success to "192.168.8.119:22"
2021/10/13 16:56:58 Connection success to "192.168.8.119:22"
^C
Owner
Similar Resources

A quick and dirty concurrent Golang-based port scanner

go-scan-ports A quick and dirty concurrent Golang-based port scanner, this will scan ports 1 through 1024 Usage: Requires 1 command line argument of U

Jan 6, 2022

A pure Unix shell script implementing ACME client protocol

An ACME Shell script: acme.sh An ACME protocol client written purely in Shell (Unix shell) language. Full ACME protocol implementation. Support ACME v

Jan 2, 2023

Một script nho nhỏ viết bằng Go để crawl toàn bộ điểm thi THPTQG-2021

Một script nho nhỏ viết bằng Go để crawl toàn bộ điểm thi THPTQG-2021

Crawl toàn bộ điểm thi THPTQG-2021 Một script nho nhỏ viết bằng Go để crawl toàn bộ điểm thi THPTQG-2021, mình đã crawl sẵn toàn bộ ở đây: https://dri

Jul 18, 2022

Simple script fro DNS upload testing. Written in Go.

BENCH DNS Simple script fro DNS upload testing. Written in Go. Features Using local domain list file with -file argument Download from URL and then us

Dec 6, 2021

Simple installation script for grpc-gateway

Grpc-Gateway-installation Grpc-gateway is a plugin of Google protocol buffer compiler, it reads the definitions from .proto file and generates a rever

Dec 16, 2021

UFW-Autoblacklist - Script that allow you to ban-ip all spammers

UFW-Autoblacklist - Script that allow you to ban-ip all spammers

Setup: go build main.go tcptrack -i interface | ./main

Nov 1, 2022

Kobiton-execute-test-buildkite-plugin - A Buildkite Plugin to (synchronously) execute an automated test script on Kobiton service

Kobiton Execute Test Buildkite Plugin A Buildkite Plugin to (synchronously) exec

Feb 10, 2022

Use ICMP requests to check the alive subnet.

Doge-AliveCheck Use ICMP requests to check the alive subnet. Build go build -ldflags "-s -w" -trimpath Usage Doge-AliveCheck.exe

Nov 11, 2022

DNS Ping: to check packet loss and latency issues with DNS servers

DNSping DNS Ping checks packet loss and latency issues with DNS servers Installation If you have golang, easiest install is go get -u fortio.org/dnspi

Nov 18, 2022
Related tags
port close check scanner. detects open ports, sends alert with slack.

aite9 (port close check scanner) サーバのポートが空いてないことを確認するポートスキャナー たくさんのサーバを管理していると設定ミスで内部利用ポートが外部に公開されてしまっている可能性があり、それに早く気付くためのチェックツールです。 サーバのリストを標準入力で渡すと

Feb 3, 2022
Application wirtten in GO to check if the port on the remote host is open

portcheck A simple Pod that get API POST request with port type and number with a target's IP address and checks if the destination port is available

Nov 26, 2021
Port-proxy - Temporary expose port for remote connections

Port proxy util Temporary expose port for remote connections. E.g. database/wind

Jan 27, 2022
fbstatus graphically shows the gokrazy system status on the Linux frame buffer, which is typically available via HDMI when running on a Raspberry Pi or a PC.
fbstatus graphically shows the gokrazy system status on the Linux frame buffer, which is typically available via HDMI when running on a Raspberry Pi or a PC.

gokrazy framebuffer status (fbstatus) fbstatus graphically shows the gokrazy system status on the Linux frame buffer, which is typically available via

Aug 4, 2022
Small round tripper to avoid triggering the "attention required" status of CloudFlare for HTTP requests
Small round tripper to avoid triggering the

CloudFlare-ByPass-Go. Small round tripper to avoid triggering the "attention req

Nov 14, 2022
Event driven modular status-bar for dwm; written in Go & uses Unix sockets for signaling.

dwmstat A simple event-driven modular status-bar for dwm. It is written in Go & uses Unix sockets for signaling. The status bar is conceptualized as a

Dec 25, 2021
Abc voe - Development and Maintenance Status
Abc voe - Development and Maintenance Status

Development and Maintenance Status RancherOS 1.x is no longer being actively mai

Jan 5, 2022
Keeps track of Steam Deck Verifications. On first run, it reports all games with their respective Steam Deck Verification status. On subsequent runs, the tool will report newly tested and updated games.

Keeps track of Steam Deck Verifications. On first run, it reports all games with their respective Steam Deck Verification status. On subsequent runs, the tool will report newly tested and updated games.

Feb 2, 2022
A simple, standalone, and lightWeight tool that can do health/status checking, written in Go.
A simple, standalone, and lightWeight tool that can do health/status checking, written in Go.

EaseProbe EaseProbe is a simple, standalone, and lightWeight tool that can do health/status checking, written in Go. Table of Contents EaseProbe 1. Ov

Dec 24, 2022