zabbix lld uses the tracer method (ZABBIX? Sender)

Autodiscover script file output format:

{
    "data": [
        {
            "{#BIND_PERF}": "BIND INCOMING QUERY"
        },
        {
            "{#BIND_PERF}": "BIND INCOMING NOTIFY"
        },
        {
            "{#BIND_PERF}": "BIND INCOMING A"
        },
        {
            "{#BIND_PERF}": "BIND INCOMING SOA"
        },
        {
            "{#BIND_PERF}": "BIND INCOMING PTR"
        },
        {
            "{#BIND_PERF}": "BIND INCOMING AAAA"
        },
        {
            "{#BIND_PERF}": "BIND INCOMING IXFR"
        },
        {
            "{#BIND_PERF}": "BIND INCOMING AXFR"
        },
        {
            "{#BIND_PERF}": "BIND INCOMING ANY"
        },
        {
            "{#BIND_PERF}": "BIND OUTGOING A"
        },
        {
            "{#BIND_PERF}": "BIND OUTGOING NS"
        },
        {
            "{#BIND_PERF}": "BIND OUTGOING PTR"
        },
        {
            "{#BIND_PERF}": "BIND OUTGOING AAAA"
        },
        {
            "{#BIND_PERF}": "BIND OUTGOING DNSKEY"
        }
    ]
}

To use lld mode, you need to send json data to zabbix server. At this time, you need to use - o mode to report an error. At this time, you need to use temporary file mode to send data. The figure below is the configuration of ZABBIX tracer mode discovery

 

Format of file storage: host name monitoring key value. The value of json must be on the same line as the host name and monitoring key. Here, we use the configuration file to read the host name. We need to use - instead of:

- bind.parameter {"data": [{"{#BIND_PERF}": "BIND INCOMING QUERY"}, {"{#BIND_PERF}": "BIND INCOMING NOTIFY"}, {"{#BIND_PERF}": "BIND INCOMING A"}, {"{#BIND_PERF}": "BIND INCOMING SOA"}, {"{#BIND_PERF}": "BIND INCOMING PTR"}, {"{#BIND_PERF}": "BIND INCOMING AAAA"}, {"{#BIND_PERF}": "BIND INCOMING IXFR"}, {"{#BIND_PERF}": "BIND INCOMING AXFR"}, {"{#BIND_PERF}": "BIND INCOMING ANY"}, {"{#BIND_PERF}": "BIND OUTGOING A"}, {"{#BIND_PERF}": "BIND OUTGOING NS"}, {"{#BIND_PERF}": "BIND OUTGOING PTR"}, {"{#BIND_PERF}": "BIND OUTGOING AAAA"}, {"{#BIND_PERF}": "BIND OUTGOING DNSKEY"}]}

 

 

Send script command format:

/Usr / bin / ZABBIX ﹣ sender - C ZABBIX ﹣ agentd configuration file {0} '. Format (JSON ﹣ file)
The JSON file here is the above file path

Keywords: Python JSON Zabbix

Added by brickstermike on Wed, 25 Dec 2019 20:34:41 +0200