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-glink

v0.1.5

Published

glink - graphite link hubot script

Downloads

18

Readme

hubot-glink

Build Status

A hubot script for building graphite links

See src/glink.coffee for full documentation.

Installation

In hubot project repo, run:

npm install hubot-glink --save

Then add hubot-glink to your external-scripts.json:

[
  "hubot-glink"
]

Sample Interaction

user1> hubot graphme users index
hubot> http://graphite.example.com/render?target=some.configed.target.users.index&width=800&.png

Aliases

hubot-glink allows for stored aliases. While you can set some defaults for your bot via environment configuration variables, chances are members of your team are going to want a few "custom" things that only apply to them. They can simply create aliases with all the values they want and run those aliases whenever they want.

user1> hubot alias ui as users index --from=-3months --bgcolor=black
hubot: created alias `ui` for `users index --from=-3months --bgcolor=black`
user1> hubot alias ui
hubot: `ui` = `users index --from=-3months --bgcolor=black`
user1> hubot aliases
hubot: Aliases:

`ui` = `users index --from=-3months --bgcolor=black`

user1> hubot run ui
hubot: https://graphite.example.net/render?from=-3months&bgcolor=black&target=foo.users.index&image=.png

# `hubot run ui` is now equivalent to running:
# `hubot graphme users index --from=-3months --bgcolor=black`

Configuration

As graphite keys will vary from one project to another, you will need to configure a few things to get hubot-glink going for your project in graphite. The following environment variables should allow you configure hubot-glink for your project (See the glink project for more information as these configs map somewhat to the configuration of glink)

Config Var Name | Note ------------------------------------- | --------------------------------------------------- HUBOT_GLINK_DEFAULT_APP | the default appname to be used when no --app is specified HUBOT_GLINK_[appname]TEMPLATE | i.e. stats.timers.!!#controller#!!.!!#action#!! HUBOT_GLINK[appname]_TEMPLATE_DEFAULTS | (comma delimited i.e. !!#controller===users#!!, #!!action===index#!! HUBOT_GLINK_HOSTNAME | HUBOT_GLINK_DEFAULT_PARAMS | optional (comma delimited i.e.: from:-1week, width:800) HUBOT_GLINK_PROTOCOL | optional HUBOT_GLINK_PORT | optional HUBOT_GLINK_TEMPLATE_DEFAULT_DELIMITER | optional (defaults to ===) HUBOT_GLINK_USE_SLACK_API | optional, prettier posts for Slack via the API HUBOT_GLINK_SLACK_IMAGES | optional (default false), attempt to pull images into Slack HUBOT_GLINK_SLACK_COLOR | optional (default #CCC), color for Slack API post HUBOT_GLINK_CREDS | optional (i.e. user:password) will be inserted into graphite url for Slack image posts

For comma delimited configs be sure to use a space after the comma (i.e. value, other) as the parsing isn't very forgiving and this will allow you to use things like graphite value lists (i.e. {foo,bar}) in your configs without them being parsed as individual items.

Now that hubot-glink supports multiple application configs, it's important to note that users will need to pass along an extra param, --app to specify the application's config they what hubot to use. When users don't pass along --app, the HUBOT_GLINK_DEFAULT_APP will be used instead.

License and Copyright

MIT License

(c) 2015 Jason Madsen