Last Updated: March 06, 2017
· rljohnsn

OpenNMS Hipchat Notifications

We love hipchat. On our team email is considered the place where collaboration goes to die. As a result we try and funnel all our information channels into hipchat rooms. We have integrated github, codeclimate, zendesk, chef-client, knife, bugsnag, teamcity, pingdom and now OpenNMS for service alerts.

<!-- Notification configuration to map a high thresh     -->
<!-- hold exceeded event to a hipchat message            -->
<!-- OPENNMS_HOME/etc/notifications.xml                  -->
<!-- Rule can be as specific as desired.  Filter using   -->
<!-- categories or service checks. I'm using a           -->
<!-- category that matches the Hipchat Room              -->
<!-- name and a category indicating production           -->
<!-- (EnvironmentFilter)                                 -->

    <notification name="Hipchat - High Threshold Exceeded room specific filter" status="on" writeable="yes">
        <description>A monitored device has reached a high threshold</description>
        <rule>(IPADDR != '') &amp; (catincRoomfilter) &amp; (isServiceName) &amp; (catincEnvironmentFilter)</rule>
        <subject>Notice #%noticeid%: High Threshold for %parm[ds]% on node %nodelabel%.</subject>

 <!-- A destination path and corresponding user need to exist -->
 <!-- OPENNMS_HOME/etc/destinationPaths.xml                   -->
   <path name="Hipchat" initial-delay="0s">
        <target interval="0s">

<!-- User  -->
<!-- OPENNMS_HOME/etc/users.xml -->
        <user read-only="false">
            <user-comments>service account to allow for hipchat room updates.  notification system requires a target user or group.</user-comments>
            <password salt="true">generated_from_the_UI</password>
            <contact type="email" info=""/>
            <contact type="pagerEmail" info=""/>
            <contact type="xmppAddress" info=""/>
            <contact type="microblog" info=""/>
            <contact type="numericPage" info="" serviceProvider=""/>
            <contact type="textPage" info="" serviceProvider=""/>
            <contact type="workPhone" info=""/>
            <contact type="mobilePhone" info=""/>
            <contact type="homePhone" info=""/>

<!-- Notification command, using curl to post to hipchat API -->
<!-- OPENNMS_HOME/etc/notificationCommands.xml               -->
<!-- Generate your API_KEY from                  -->

    <command binary="true">
        <comment>Post a message to Hipchat using curl</comment>
        <argument streamed="false">
        <argument streamed="false">
        <argument streamed="false">

1 Response
Add your response

Hi. I stumbeled over this post while trying to set up a curl request on OpenNMS. So far i've created a new user, the destination path and the notification, but i can't find where to create the command. Could you tell me? Thx! OPENNMS_HOME/etc/notificationCommands.xml doesn't exist btw

over 1 year ago ·