Status Notification

Star (0)

Monika sends status notifications periodically based on a set schedule with the following information:

  • Host
  • Number of probes
  • Average response time in the last 24 hours
  • Incidents in the last 24 hours
  • Recoveries in the last 24 hours
  • Number of sent notifications in the last 24 hours
  • Application version

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: desktop
type: desktop
probes:
- requests:
- url: http://example.com
status-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

Cron Syntax

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
│ │ │ │ │ │
│ │ │ │ │ │
* * * * * *

Valid Field Values

FieldData
second0-59
minute0-59
hour0-23
day1-31
month1-12 (or month names)
day of the week0 - 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.

← PrevProbes
Was this page helpful?
Next →TLS Checkers

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 © 2022 Hyperjump Tech. All Rights Reserved.