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

hipcheck

v0.8.0

Published

Active health checker for hipache proxy written in Node.js. Hipache health-checker will check the backends specified regularly and add/remove them from redis.

Downloads

7

Readme

hipcheck Build Status

configurable hipache active health checker written in node

Installation

npm install -g hipcheck

OR

docker pull tjmehta/hipcheck

Usage

  Usage: hipcheck [options] <virtual-host-url ...>

  Options:

    -h, --help               output usage information
    -d, --dryrun             Enable dryrun (health check simulation). Flag.
    -V, --version            output the version number
    -m, --method <s>         URL Method to health check eg. GET. Default: GET
    -s, --expect_status <n>  Expected response status code. Default: 200
    -t, --timeout <n>        Max timeout in seconds for a healthy response. Default: 3
    -i, --interval <n>       Interval in seconds of how often to ping the domain. Default: 3
    -c, --hosts_interval <n> Interval in seconds of how often to check for host changes. Default: 3
    -r, --redis <s>          Hipache's redis host (hostname:port). Default: localhost:6379
    -p, --redis_password <s> Hipache's redis database password. Default: undefined
    -c, --cache <s>          Disk location where to cache (unhealthy backends that hipcheck has removed - see examples section)
    -d, --delete-cache       Delete cache (reset cached unhealthy hosts - see examples section)
    -e, --rollbar <s>        Rollbar token for error tracking. Default: undefined

run after npm install

hipcheck --interval 60 http://sub.domain.com

run after docker pull

sudo docker run -d tjmehta/hipcheck hipcheck --interval 60 http://sub.domain.com

Examples and Info

Hipcheck will check the redis backends for the specified virtual-host-url's host, by creating hearbeats. It will create a heartbeat for each backend.

The hearbeats ping the path specified in the virtual-host-url (and use the same protocol).

hipcheck --method POST https://sub.domain.com/health # has backends 10.0.0.1 and 10.0.0.2

Heartbeats will ping by posting to https://10.0.0.1/health and https://10.0.0.2/health

Hipcheck will remove unhealthy backends from redis that respond with unexpected status codes or timeout. It will continue to ping the unhealthy backends at the same interval and will readd them to redis when they recover.

Hipcheck will keep track of unhealthy backends that it has removed from redis in a cache on disk. So that backends are not lost when stopping/restarting Hipcheck.

License

MIT