zabbix-agent-client

client for zabbix-agent communication

npm install zabbix-agent-client
4 downloads in the last week
13 downloads in the last month

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

npm loves you