Finer control over Slack messaging
I have installed the CC Hubot integration and have it sending messages to Slack (http://severalnines.com/blog/automate-your-database-ccbot-clustercontrol-hubot-integration). This works well.
The current implementation gives me a message like the following when a backup starts:
New job (22) has been scheduled on cluster 1: Starting backup job. (RUNNING3)
However there is no feedback on when it completes, even if it fails. I can take or leave the backup starting message, but what I'd really like to see is the backup complete message which would include the following information:
- Name of the cluster (not just the cluster number)
- If the backup was successful or not
- The duration of the backup
I believe the above should all be possible with the standard job information, but as an added bonus it would be nice to see the final backup size, however this is not as important.
I'd also like to be able to filter the notifications based on backup type. For example, show the result for a full backup regardless if it was successful or not, but only show a message for incremental backups if it failed.
I guess that this could be put more generally as 'finer control over Slack messaging'.
-
Hi Kent,
Thank you very much for the suggested improvements! I will have to look in what is feasible and if all the information is available through the cmon api, so I'll follow up on that.
About the status updates on the backup: when we designed the backup scheduling in CCBot it is supposed to keep the users updated by sending status updates until it is done. I'll have a look at why it isn't sending messages then.
Best regards,
Art
-
Hi Kent,
I managed to track down the issue regarding backup notifications: there was a bug in the token handling in that routine so it never was able to retrieve the job status.
I have made naming of the clusters in any output consistent:
New job (818) has been scheduled on cluster 3 (MySQL Replication): backup (DEFINED)Finished job 818 on cluster 3 (MySQL Replication)10.10.16.11: Backup 28 completed and stored in '10.10.16.11:/vagrant/BACKUP-28/backup-full-2016-05-02_135905.xbstream.gz'.In this case the cluster identifier is 3 and the cluster name is "MySQL Replication".
Unfortunately the cmon backend does not provide any details on the backup, so we can't provide more details on the backup via Hubot at the moment. We'll investigate options here.
For now you can grab the latest version at Github:
https://github.com/severalnines/ccbot/
Best regards,
Art
Please sign in to leave a comment.
Comments
2 comments