[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use curl to check if service is down?
From: |
Lutz Mader |
Subject: |
Re: How to use curl to check if service is down? |
Date: |
Sun, 26 Jun 2022 11:08:05 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hello Anthony,
see the way Maik suggested or see
https://mmonit.com/wiki/Monit/ConfigurationExamples#apache
for some more useful hints.
You can use "curl" in a script used in a "check program" service.
But monit can do the job also, see
https://mmonit.com/monit/documentation/monit.html#CONNECTION-TESTS
> want to use monit and curl so that curl would hit and api and check if its
> up, if it gets a 502 or similar error then restart the systemd service.
>
> How would I do this?
>
Have a nice weekend,
Lutz