Skip to content

srintern/longcon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

HTTP Monitor

A Go CLI tool that monitors HTTP endpoints using custom DNS resolution.

Configuration

The script has two hard-coded URLs that you can modify in monitor.go:

  • targetURL: The URL to monitor (default: https://example.com)
  • dnsServer: The DNS server to use for resolution (default: 8.8.8.8:53)

Usage

  1. Build the binary:

    go build -o monitor monitor.go
  2. Run the monitor:

    ./monitor

The script will:

  • Make an HTTP GET request every 10 seconds
  • Use a 5-second timeout for each request
  • Print "o" for successful requests (2xx status codes)
  • Print "x" for failed requests
  • Stop gracefully when you press Ctrl+C

Features

  • Custom DNS resolution using specified DNS server
  • Graceful shutdown on interrupt signals
  • Real-time status feedback
  • 5-second request timeout
  • 10-second interval between requests

longcon

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages