[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: |
Wed, 29 Jun 2022 20:51:31 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hello Anthony,
as long as you know something about the data, you can use an addition
"content" test to do some more detail tests.
> I’m just hitting the index api page which returns some static json. If the
> api crashes that would not return a 200. Usually systemd restarts it but not
> always.
>
See https://mmonit.com/monit/documentation/monit.html#HTTP
the sample used to test the mmonit host is a nice sample.
See example:
if failed
port 80 protocol http content = "foobar [0-9.]+"
then alert
With regards,
Lutz