0

I'm trying to find out when a file size increase stops and then sends a GET request to some URL. already added this conf in

/etc/monit/monitrc

check file file.log with path /home/projects/my_project/file.log
    if timestamp > 15 minutes then alert

now I want to send a request to URL instead of alert.

something like this:

check file file.log with path /home/projects/my_project/file.log
    if timestamp > 15 minutes then request GET "http://my_url:8000"

1 Answers1

1

Monit can execute a script or command, instead of sending an alert only.

Use something like

if timestamp > 15 minutes then exec /path/script.sh

See also https://mmonit.com/monit/documentation/monit.html

A suggestion only.

lutzmad
  • 196
  • 4