[Top][All Lists]

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

Re: use curl to check if api is down or up

From: Mike Dunaway
Subject: Re: use curl to check if api is down or up
Date: Sun, 26 Jun 2022 12:13:59 -0500

That’s what changing it to 200 checks for. A failure would be if it’s not 200, then do this.

Sent from my iPhone

On Jun 26, 2022, at 12:03 PM, Anthony Ettinger <> wrote:

Can I check for not equal to 200?

On Jun 25, 2022, at 7:32 PM, Mike D <> wrote:

I believe you could do something like this:

 check host with address
       if failed
          port 80 protocol http and request "/location/of/whatever" method GET status = 502
       then restart

On Sat, Jun 25, 2022 at 7:25 PM Anthony Ettinger <> wrote:
I 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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]