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

ezios

v2.1.0-mv

Published

nagios, but more dynamic

Downloads

21

Readme

MonJS

A monitoring wep application tool that leverages nagios-like tools and idioms. Unlike nagios-core, this tool has a full-featured web ui to dynamically configure hosts and services.

This tool might be useful to you if you require a simple service to monitor a small set of servers and services. This tool has not been performance tested for thousands of checkers.

init

# will create the default configuration file.
monjs init 

# write default config to /etc/monjs
monjs init -c /etc/monjs

# will start the application
monjs

# start application with different config
monjs -c /etc/monjs

# launch into background
monjs > monjs.log & disown

Make sure to edit the configuration file before use; the init command will indicate where it was saved.

Using

By default, the config has the program listen on port 9001.

When hitting the index page, you should be prompted for the api key, which was set in the config.

Hosts

Hosts are just simple documents with an alias (hostname), an address (your.domain.tld or some ip) and extra variables (you can put extra information your services can use to check the health of your host).

# example host
# note that extra_vars should be lowercase only
{
    "name": "alias",
    "address": "your.domain.tld",
    "extra_vars": {
        "service_pass": "some secret"        
    }
}

Variables in a host can be accessed via the "args" of a service. To access them, use $VAR$ or $_VAR$ for extra_vars:

$NAME$          - is replaced by the host's alias name
$ADDRESS$       - is replaced by the address of the host
$_SERVICE_PASS$ - gets the service_pass variable in extra_vars

Services

Services should Ideally be nagios compatible commands. Like hosts, they have an alias which is denoted by name. A service must be associated with only one, sigular host (future versions may allow for grouping common hosts). The service must also have a command; the command is just a path to an executable on the server or a command which can be found in monjs's configured process.env.PATH (see the config file). Interval is the frequency, in miliseconds, the command is executed.

In the web ui, args is just a string which is automatically split into an array. quoted strings will be converted to a singular argument. As stated in the Hosts section, you can access host variables using the $VAR$ or $_VAR$ syntax.

Limitations

All service changes will trigger a service to fire. This includes changing service variables, renaming the service's host's name, etc.

Atom/RSS Feeds

Currently MonJS does not offer to push failure notifications and likely will not in the future. In corporate Nagios deployments, I always use RSS feeds instead of emails or other active push services. This way users can choose to listen to the alerts instead of filtering the emails to the trash if they don't care.

Screenshots

Status Page

Host Modal

Service Modal

Services

Metrics

TODO

  • full-featured command line client.
  • logo?