Monika sends status notifications periodically based on a set schedule with the following information:
By default the schedule is set to 6:00 AM everyday. You can configure the schedule with cron syntax via command line argument like so:
monika --status-notification "0 6 * * *"
or via the configuration file with the status-notification
field like below:
notifications:- id: desktoptype: desktopprobes:- requests:- url: http://example.comstatus-notification: 0 6 * * *
You can also choose to disable this feature altogether. Just set the value to false
monika --status-notification false
or
notifications: ...probes: ...status-notification: false
To schedule the status notification we use standard cron syntax. You can try out your configuration on crontab.guru.
In addition to the standard 5 cron syntax, Monika supports an optional seconds
field. So if you wrote 6 cron syntax, please be advised that the status notification could be sent very frequently.
┌────────────── second (optional)│ ┌──────────── minute│ │ ┌────────── hour│ │ │ ┌──────── day of month│ │ │ │ ┌────── month│ │ │ │ │ ┌──── day of week│ │ │ │ │ ││ │ │ │ │ │* * * * * *
Field | Data |
---|---|
second | 0-59 |
minute | 0-59 |
hour | 0-23 |
day | 1-31 |
month | 1-12 (or month names) |
day of the week | 0 - 7, or names (0 and 7 are Sunday) |
Examples:
status-notification "1,2,5,7 * * * *"
Notifies every minute 1, 2, 5 and 7. In other words every xx:01, xx:02, xx:05, xx:07 of every hour.
status-notification "1-5 * * * *"
Notifies with the range of minute 1 to 5.
status-notification "*/2 * * * *"
Notifies every two minutes.
status-notification "* * * Feb,Mar Sun"
Notifies every Sunday in February and March.
PT Artha Rajamas Mandiri (Hyperjump) is an open-source-first company providing engineering excellence service. We aim to build and commercialize open-source tools to help companies streamline, simplify, and secure the most important aspects of its modern DevOps practices.
Copyright © 2024 Hyperjump Tech. All Rights Reserved.