Ad Widget

Collapse

Regex on Zabbix API?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stephen253
    Junior Member
    • Jul 2019
    • 1

    #1

    Regex on Zabbix API?

    After some hours spent reading Zabbix Api's documentation, I haven't found a way of doing a search by key with more than one possible value.

    So, with this code:

    {
    "jsonrpc": "2.0",
    "method": "item.get",
    "params": {
    "output": "extend",
    "hostids": " 10355",
    "search": {
    "key_": "[in_*|out_*]"
    },

    "sortfield": "name"
    },
    "auth": "15729708df1f5936f6ea840ae1b41cb6",
    "id": 0
    }

    I'm trying to get every item which key is in_<anything> OR out_<anything> so, the output would be the combination of all the items related to the interfaces. Instead, I get this:

    {"jsonrpc":"2.0","result":[],"id":0}

    I know that there's the possibility to use filter instead of search but, from what I read, it is used when you want exact match like Tellthebell.com, which is not the case.
    Last edited by Stephen253; 04-07-2019, 09:28.
Working...