This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import argparse | |
| import socket | |
| # Define a function to send a notification to the Uptime Kuma webhook | |
| def send_webhook_notification(webhook_url, status_code, message): | |
| payload = {"status": status_code, "message": message} | |
| try: | |
| response = requests.post(webhook_url, json=payload) | |
| response.raise_for_status() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| // simple http server that counts requests per second and total requests | |
| import ( | |
| "flag" | |
| "log" | |
| "net/http" | |
| "sync/atomic" | |
| "time" |