0.0.7 • Published 10 years ago

zabbix-agent v0.0.7

Weekly downloads
1
License
ISC
Repository
-
Last release
10 years ago

zabbix-agent

Installing

npm install --save zabbix-agent

Using

Create agent instance

var ZabbixAgent = require('zabbix-agent');
var agent = new ZabbixAgent({
   port: 10000,  // Defaults to 10051
   host: 'zabbix-proxy.domain.tld', // Defaults to '127.0.0.1'
   interval: 60 * 1000 // How often to send collected data. Defaults to 30 sec. 
});

Real interval depends on zabbix response delay.

interval + delay

Then push data to it

agent.push({
    host: os.hostname(),
    key: 'my-metric-name',
    value: 100
});

Events

Event: error

In case of error.

Arguments:

  • {Error} error

Event: response

Then response is successfully parsed

Arguments:

  • {Object} response

response is the object of the following form:

{                                                                                                                                                                                
        "response":"success",     
        "info":"Processed 1 Failed 1 Total 2 Seconds spent 0.000253"
}

See also

https://www.zabbix.org/wiki/Docs/protocols/zabbix_sender/1.8(Zabbix sender protocol overview)

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago