npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hubot-nagios

v0.0.2

Published

Hubot adapter for nagios

Downloads

1

Readme

hubot-nagios

hubot-nagios adds nagios monitoring support to hubot

Build Status

Description

This plugin enables hubot to react to nagios notification as well as request current service state or acknowledge problems.

It requires custom notification commands and a contact on the nagios side as well. On notification nagios runs a simple curl call to relay the event to hubot. For this to work, hubot needs to listen on an IP that is reachable from nagios.

Installation and Setup

Add hubot-nagios to your package.json, run npm install and add hubot-nagios to external-scripts.json.

Add hubot-nagios to your package.json dependencies.

"dependencies": {
  "hubot-nagios": ">= 0.0.1"
}

Add hubot-nagios to external-scripts.json.

> cat external-scripts.json
> ["hubot-nagios"]

You need to specify the chat room to use for build events and the cctray.xml to use on startup:

% HUBOT_NAGIOS_EVENT_NOTIFIER_ROOM="#roomname" \
  bin/hubot

Within nagios configuration you need to add a new contact that calls the hubot webhook:

define contact {
        alias                          hubot
        host_notification_period       24x7
        service_notification_options   w,u,c,r
        contact_name                   hubot
        email                          [email protected]
        host_notification_options      d,r
        service_notification_period    24x7
        service_notification_commands  notify-service-by-hubot
        host_notification_commands     notify-host-by-hubot
}

And add this new contact as a member to at least one contactgroup.

You need to add these new commands:

define command {
        command_name                    notify-service-by-hubot
        command_line                    /usr/bin/curl -d host="$HOSTALIAS$" -d serviceoutput="$SERVICEOUTPUT$" -d servicedescription="$SERVICEDESC$" -d notificationtype="$NOTIFICATIONTYPE$" -d servicestate="$SERVICESTATE$" https://username:[email protected]/hubot/nagios/service
}

define command {
        command_name                    notify-host-by-hubot
        command_line                    /usr/bin/curl -d host="$HOSTNAME$" -d hostoutput="$HOSTOUTPUT$" -d notificationtype="$NOTIFICATIONTYPE$" -d hoststate="$HOSTSTATE$" https://username:[email protected]/hubot/nagios/host
}

That's it!