Answer the question
In order to leave comments, you need to log in
Is it possible to get values from the keys sheet?
Hello.
There is a desire to receive several values at once using one Zabbix API request
search by one key - ok
zabbix_get= \
{
"jsonrpc": "2.0",
"method": "item.get",
"params": {
"output": "extend",
"host": 'server01',
"search": {
"key_": 'vfs.fs.size[/data,free]'
},
"sortfield": "name"
},
"auth": authToken.get("result"),
"id": authToken.get("id")
}
Answer the question
In order to leave comments, you need to log in
Hello.
To search for multiple exact values, try using filter (works like item.key = '...' in a database).
To search for multiple wildcard values (using wildcard) use search (works like item.key LIKE '%...%' in a database).
To search for multiple values, use a JSON array :
zabbix_get= \
{
"jsonrpc": "2.0",
"method": "item.get",
"params": {
"output": "extend",
"host": 'server01',
"filter": {
"key_": [
"vfs.fs.size[/data,free]",
"system.cpu.util.usage"
]
},
"sortfield": "name"
},
"auth": authToken.get("result"),
"id": authToken.get("id")
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question