Walt Mankowski via plug on 17 Oct 2023 13:37:03 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Could you put that in an email?


On Tue, Oct 17, 2023 at 03:00:11AM -0400, Steve Litt via plug wrote:
> L K via plug said on Mon, 16 Oct 2023 18:38:40 -0400
> 
> >Hey Pluggers,
> >  I have a home arch linux server I use for various hobbiest services.
> > I'd
> >like to get notified via email if it goes down. I usually would run
> >such things on my server but... well.. you see my dilemma :D. Can
> >anyone recommend a service they have used for such? I'd prefer a
> >pull-based one (like issuing a web request from the server) for
> >security. I have a bad association with pagerduty :P.
> >
> >Lou
> 
> Sounds like a job for a shellscript to me. The shellscript contains a
> subroutine to test whether the remote server is doing its job, and
> another subroutine to email error messages, so pseudocode looks like
> this:
> 
> forever
>    test remote server
>    if problem
>       email people
>    sleep 1 minute
> 
> The shellscript could be launched as a daemon by systemd, sysvinit,
> runit, s6 or OpenRC.

Of course at a high level it would work something like that, but the
devil is in the details. Here are a few questions off the top of my head:

* Where will this shell script run?

* How will it test the remote server?

* Does something need to be running on the remote server too?

* How will you email the people that need to know?

* How will you ensure that whatever took out the remote server doesn't
  take out the test script too?

* How do you get it to stop pinging you so that you're not flooded
  with alerts every minute when it goes down?

Presumably packages designed for this sort of testing will have
solutions to most/all of these potential issues.

Walt
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug