mycheckpoint allows for emails notifications in various forms. More forms of email notifications are yet to be implemented. Currently, the following forms of emails are supported:
- Alert notifications
- Access error notifications
- Brief HTML reports email
It is necessary to provide with these configuration parameters:
- SMTP host (the mail server which will allow sending or relaying of emails)
- “From” address
- “To” address(es). One or more (comma delimited, spaces allowed) email addresses.
The parameters may either be provided on the command line, or in a defaults file. Following is a defaults file setup:
[mycheckpoint] smtp_host = mail.my-server-company.com smtp_from = firstname.lastname@example.org smtp_to = email@example.com [client] user=dbmonitor password=123456 socket=/tmp/mysql.sock port=3306 host=localhost
See “Brief HTML reports email“, following, for specifying the above parameters as command line options.
There is currently no sanity check for any of the above parameters. If they work – fine. If not – mycheckpoint lets the mail server deal with it.
These are your “Slave is not replicating” or “Disk quota exceeds 90%” kind of emails.
mycheckpoint sends an email for the first time an alert condition turns true (the alert is raised) and the first time it turns false (the alert is resolved). An alert condition may be defined as repetitive_alert, in which case an email is sent for every sample where the alert condition holds true.
Access error notifications
These notifications occur when mycheckpoint cannot access MySQL.
Since mycheckpoint stores monitored data in MySQL, and is a MySQL monitoring solution, it is a critical error when it cannot access the MySQL server. The reasons are not tested. Perhaps the service is down, or there’s too many connections, or there’s a network problem, or what have you. mycheckpoint responds by sending an email alert.
Brief HTML reports email
It is possible to manually send a brief HTML report via mail. The report is sent as an HTML attachment. Pass the email_brief_report argument to mycheckpoint.
mycheckpoint --defaults-file=/etc/mycheckpoint.cnf email_brief_report
mycheckpoint --defaults-file=/etc/mycheckpoint.cnf --firstname.lastname@example.org --email@example.com --smtp-host=mail.my-server-company.com email_brief_report
Turning off emails
mycheckpoint --skip-emails ...
To turn off automatic mail notification (i.e. alerts and access error notifications).