zabbix-agent
v0.0.7
Published
Simple Zabbix agent
Downloads
19
Readme
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)