Skip to content

bobrik/node-zabbix-agent-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node.js client for zabbix-agent communication

Gather metrics from zabbix-controlled servers directly from your node.js application. No storage required.

Installation

Just install from npm:

npm install zabbix-agent-client

Usage

var ZabbixAgentClient = require("zabbix-agent-client"),
    client            = new ZabbixAgentClient(10050, "127.0.0.1"),
    item              = "system.cpu.util",
    params            = ["", "nice", "avg1"];

client.getItemWithParams(item, params, function(error, result) {
    if (error) {
        console.log("Got error", error);
    }

    console.log("Result: " + result);
});

API

  • Requiring
var ZabbixAgentClient = require("zabbix-agent-client");
  • New zabbix agent connection:
var client = new ZabbixAgentClient(10050, "127.0.0.1");
  • Getting item by full name:
client.getItemByFullName(name, callback);
  • Getting item by name and params:
client.getItemWithParams(name, params, callback);

callback - usual node.js style callback function with error and result arguments

Authors

About

node.js client for zabbix-agent metrics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published