Monday, October 22, 2018

Automated reports with IBM Cloud Functions, Db2 and Slack

GitHub Traffic Analytics
One of my (many) favorite IBM Cloud solution tutorials is about combining serverless and Cloud Foundry for data retrieval and analytics. I blogged about it and described how an automated IBM Cloud Functions action retrieves GitHub statistics and stores them in Db2. Using an embedded Cognos dashboard and regular Javascript / HTML tables, the solution offers GitHub Traffic Analytics. I extended that solution by automatic weekly reports that are posted to Slack.

Automated weekly Slack reports

My team uses Slack for messaging and collaboration. We utilize integrations with GitHub, Stack Overflow and our own tools. Therefore, I looked into a way of how to automatically analyze the GitHub traffic data on a weekly basis. As a result, I wrote an IBM Cloud Functions action with some Db2 queries. The action is triggered by an IBM Cloud Functions alarm, executes the queries, composes a short report and posts it to a Slack channel by utilizing an incoming webhook. The result looks like this:

Automated Db2 report to Slack channel
My teammates can expand the message attachment, see the top 25 repositories with their viewcount and number of clones. Instead of pulling the numbers manually and keeping me busy for some minutes, the serverless action runs few seconds and then sleeps again until next week. Smart, right?

If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.

LinkWithin

Related Posts with Thumbnails