Zabbix parsing macros value

33 views Asked by At

Based on the Website certificate by Zabbix agent 2, I want to autodetect the purposes of the SSL certificates.

Moreover, without external files, based on macro values, as an example (not necessarily in this form):

{$macro.example}:

{
"zabbix.com": {
  "name": "zabbix.com",
  "port": "443",
  "ip": "192.168.1.1"
  },
"google.com": {
  "name": "google.com",
  "port": "443",
  "ip": ""
  }
}

or like this:

{$macro2.example}:

zabbix.com:443:192.168.1.1; google.com:443:

Accordingly, there is an idea to parse the value of a variable and select the name, port and IP, but have not yet found how to do this.

Ideally, you can implement it at the script level or place JSON somewhere and parse it, but I would like to implement a more universal scheme.

I looked at the basic types of detection rules, but could not find how to implement this.

0

There are 0 answers