home

p5-hubot - a Hubot in Perl

09 Jul 2014

p5-hubot is a Hubot written in Perl with AnyEvent. The original Hubot is from Github written in NodeJS.

We are using IRC for internal communication at Internetstores. IRC Service is provided by InspIRCd with GnuTLS and authentication.

p5-hubot is the bot in our IRC channel. p5-hubot provides some basic plugins:

There is also an additional repository with more plugins called p5-hubot-scripts.

we are using the following plugins

plugin from p5-hubot core. displays contents of perldoc from every plugin.

plugin from p5-hubot-scripts repository. This plugin provides a HTTP API. You can use curl to post any message to your IRC Channel:

curl -X POST -d '{"room": "#test-channel", "secret": "foobar", "message": "Hello from JSON" }' http://localhost:8080/hubot/say

this is a internal plugin. we can query running versions of your software in production.

plugin from p5-hubot core. displays the rules of the robot.

plugin from p5-hubot-scripts repository. This plugin shows newly created issues from JIRA in our channel

plugin from p5-hubot-scripts repository. It provides some love to you :)

our p5-hubot in action


Nagios/Icinga

Icinga uses sayhttpd to inform channel users about service/host problems:

< isbot> NAGIOS: PROBLEM Service: CPU Load www5 State: CRITICAL : Fri May 2 10:20:58 CEST 2014 Additional Info: CRITICAL - load average: 162.97, 75.99, 30.61


Git

Our Git post-receive hook sends commit messages with the repository name into the channel with the sayhttpd plugin:

< isbot> Git: [puppet] push commit: Jonas Genannt (5ec6b27) added logrotate for image downloader


Query running version from production

We are using git tags to deploy our software with MCollective to our servers. The running plugin allows you to get the running version from production: (this plugin is not available for download)

< hggh> isbot: running? prod/isCommerce
< isbot> hggh: We have running: prod/2014-07-02_d2


JIRA notifications

We are using JIRA for our issues. If a new issue in JIRA is created, the new issue will be displayed in our IRC channel. It is using the jira plugin. You need to enable Webhooks in JIRA, have a look at my inline doc from the jira plugin.

< isbot> JIRA Issue Jonas Genannt created SUP-2479 with mobile checkout form validation


some love

The lessthanthree plugin provides some love to you:

< hggh> isbot: <3
< isbot> hggh: <3 you too! http://youtu.be/4iHWZRqSTQ4


We have fun with our p5-hubot! - try it yourself! :)