Hello, I need to get the latest not "0" value from history. Unfortunately, zabbix filter does not provide an opportunity to look for values that does not match a set one, I can only find those which match.
I have tried to get values with 'search' param writing next params:
but I get an error from API:
I also have tried to seach without 'excludeSearch' param to make sure that seach does not work here at all.
Here is my code:
Any ideas on this thing?
Zabbix version is 6.0.32.
I have tried to get values with 'search' param writing next params:
Code:
search: {
value: ['0']
},
excludeSearch: true
code: -32602,
message: 'Invalid params.',
data: 'Invalid parameter "/search": should be empty.'
message: 'Invalid params.',
data: 'Invalid parameter "/search": should be empty.'
Here is my code:
Code:
const response = await axios.post(
"http://zabbix.gmkzoloto.ru/zabbix/api_jsonrpc.php",
{
jsonrpc: "2.0",
method: "history.get",
params: {
output: ["value"],
history: 0,
itemids,
time_till: endTimestamp,
sortfield: "clock",
sortorder: "DESC",
limit: 1,
},
id: 1,
auth: token,
},
{
headers: {
"Content-Type": "application/json-rpc",
},
}
);
Any ideas on this thing?
Zabbix version is 6.0.32.
Comment