Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hapromo

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapromo

Haproxy Monitor library

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

HAProxy monitor library

Build Status

Usage:

require('hapromo');

var hapromo = new Hapromo({  
  user : 'username',  
  pass : 'password',  
  host : 'somehost.com',  
  path : '/pathtostats;csv',  
  interval : 5000  
});  

hapromo.on(server_event, function(data) {  
	// Handle event  
});  

Installation:

npm install hapromo

List of built-in events:

server_up
server_down
error
update

Creating a custom filter with a handler function:

hapromo.addFilter({ criteria : [  
    { header : 'svname', op : 'ne', value : 'FRONTEND' },  
    { header : 'svname', op : 'ne', value : 'BACKEND' },  
    { header : 'scur', op : 'gt', value : function(data) { return 0.70 * data.slim; } }  
  ], handler : function(data) {  
    	console.log('High load on server %s!', data.svname);  
    	// Handle it  
	}  
});  

Same, but register as event instead:

hapromo.addFilter({ criteria : [  
    { header : 'svname', op : 'ne', value : 'FRONTEND' },  
    { header : 'svname', op : 'ne', value : 'BACKEND' },  
    { header : 'scur', op : 'gt', value : function(data) { return 0.70 * data.slim; } }  
  ], event : 'high_load'  
});

FAQs

Package last updated on 04 Feb 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc