Re: How to use curl to check if service is down?
Lutz Mader <[email protected]> Wed, 29 Jun 2022 20:51:31 +0200
| Newsgroups | gmane.comp.monitoring.monit.general |
|---|---|
| Message-ID | <[email protected]> |
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