As part of our Cloudbot project, we wanted to collect metrics for our bot’s actions and socialize significant milestones. When our bot performs an action, we log that action, gather the metrics over time, and store them in Elasticsearch.
We stood up a small Node.js application that watches our bot’s progress and then tweet its progress as it reaches new milestones. For example, after our bot created 20 new services instances, the Node.js app tweeted the following message:
New milestone! Over 20 service instances created #hubotbluemix
— IBMCloud Solutions (@ibmbmsolutions) June 10, 2016
We tweet all kinds of milestones, including the following:
- apps started/stopped/removed/scaled
- app monitoring events such as detected crashes or excessive CPU/Memory usage
- app log retrievals
- service instances created or removed
- containers started/stopped/scaled
- virtual servers started/stopped/rebooted/destroyed
We also want our bot to be recognized for its growth. If it’s deployed with a new Hubot adapter, or if a particular Hubot adapter is growing in popularity, we tweet the progress:
Great news! Our bot now supports 1 Slack client integration! #ibm
— IBMCloud Solutions (@ibmbmsolutions) August 18, 2016
In addition to milestones, we thought our bot should be recognized for doing work all the time, and so we tweet periodically to socialize that continuous work. Even if it’s not a new milestone, we want to recognize our bot for the time periods where it’s working hard:
Still working for you!
7 app list commands executed in the last 108 minutes #cognitive
— IBMCloud Solutions (@ibmbmsolutions) August 19, 2016
Socializing the bot’s progress helps other adopters recognize that the bot is active and serving developers. It’s a way of highlighting it’s utility while celebrating it’s milestones. As we move forward, we will continue to enhance the socialization of our bot activity. If you’re interested in this type of functionality, check out our open-source repository.
via developerWorks Open http://ibm.co/2cyX8VV
September 23, 2016 at 10:24AM