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:

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:

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:

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.

The post Cloudbot: Socializing our bot activity appeared first on developerWorks Open.

via developerWorks Open http://ibm.co/2cyX8VV

September 23, 2016 at 10:24AM