UNPKG

zabbix-utils

Version:

TypeScript port of zabbix-utils - Python library for working with Zabbix API, Sender, and Getter protocols

37 lines 1.23 kB
import * as net from 'net'; import { AgentResponse } from './types'; export declare class Getter { /** * Zabbix get synchronous implementation. * * @param host - Zabbix agent address. Defaults to '127.0.0.1'. * @param port - Zabbix agent port. Defaults to 10050. * @param timeout - Connection timeout value. Defaults to 10. * @param useIpv6 - Specifying IPv6 use instead of IPv4. Defaults to false. * @param sourceIp - IP from which to establish connection. Defaults to null. * @param socketWrapper - Function to wrap socket. Defaults to null. */ private host; private port; private timeout; private useIpv6; private sourceIp?; private socketWrapper?; constructor(options?: { host?: string; port?: number; timeout?: number; useIpv6?: boolean; sourceIp?: string; socketWrapper?: (conn: net.Socket) => net.Socket; }); private getResponse; /** * Gets item value from Zabbix agent by specified key. * * @param key - Zabbix item key. * @returns Value from Zabbix agent for specified key. */ get(key: string): Promise<AgentResponse>; } //# sourceMappingURL=getter.d.ts.map