this post was submitted on 23 Jun 2023
2 points (100.0% liked)

Self Hosted - Self-hosting your services.

14673 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules

Important

Cross-posting

If you see a rule-breaker please DM the mods!

founded 4 years ago
MODERATORS
 

I am looking to monitor self hosted services that can send notifications to Telegram. Are there any web service monitoring solutions that can be installed on Windows and not installed using Docker?

I checked through awesome-selfhosted and awesome-sysadmin repos and couldn't find one. All the ones I saw were either for Linux or container based.

EDIT: For anyone that comes across this, here is how I resolved this. Thanks to u/dotmatrix for suggesting healthchecks.io

SOLUTION

On the host

  1. Script to check the status of the webpage. Save the file with ps1 extension
$hc= "https://hc-ping.com/<blahblahblah>"
$url = "https://website.com/"
$response = curl $url
if ($response.StatusCode -eq 200) {
    curl $hc
} else {
    curl $hc/fail
}
  1. Set up the above script in Task Scheduler to run every 5 mins

On HealthChecks

  1. Create a check
  2. Create a Telegram integration if you want the notification in a group/direct message/channel: https://healthchecks.io/integrations/add_telegram/
  3. If you want to customize the message or send the message to a topic in a group, you can create a Webhook. Instructions are here: https://github.com/healthchecks/healthchecks/issues/689#issuecomment-1409847685
you are viewing a single comment's thread
view the rest of the comments
[–] dotmatrix@mastodon.ftp.rip 2 points 2 years ago* (last edited 2 years ago) (2 children)

https://healthchecks.io/

You'll have to write some kind of script that does the checking (I'd use curl to check the HTTP response code), healthchecks.io then handles the notifications.

Edit: Just an example of how such a script might look (haven't tested it, but I do something similar in linux). You can let the task scheduler run it every few minutes: https://pastebin.com/rY0FPpgk

[–] tarius@lemmy.ml 1 points 2 years ago

Thank you for the script. I will look in to this.

[–] tarius@lemmy.ml 1 points 2 years ago

I have posted the solution above. Thank you for suggesting the above service