Hello
I'm new to zabbix api so I'm stucked on this problem
Here's a example: I have one host that have 2 items. One of this items belongs to my template X. Those two items are alarmed, so they appear in "problem" tab. What I want is to retrieve the count of problems that are generated by an item that belongs to template X. Is that possible? I've tried many things, and I've started to think that it's not lol also, I'm reading and following the manual, but it's still hard for me to achieve this.
What I've done (consider my host with hostid 10446 and the templateid for the template Y, 31149):
{
"jsonrpc": "2.0",
"method": "trigger.get",
"params": {
"output": ["name","templateid","description","priority"],
"filter": {
"value": "1",
"status": 0,
"hostid": 10446,
"templateid": 31149
}
},
"auth": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"id": 1
}
note: I know how to do the count, I just placed this code above because it's more simple and I'm in doubt with this part of code
It seems to work, but when I create new items that belongs to this template Y, they are not part of my count.
What seemed strange for me was this number of templateid, my template Y don't have this id, but it shows me this number when I execute my code for bring to me the template id for my host problems lol
plsss help me
I'm new to zabbix api so I'm stucked on this problem
Here's a example: I have one host that have 2 items. One of this items belongs to my template X. Those two items are alarmed, so they appear in "problem" tab. What I want is to retrieve the count of problems that are generated by an item that belongs to template X. Is that possible? I've tried many things, and I've started to think that it's not lol also, I'm reading and following the manual, but it's still hard for me to achieve this.
What I've done (consider my host with hostid 10446 and the templateid for the template Y, 31149):
{
"jsonrpc": "2.0",
"method": "trigger.get",
"params": {
"output": ["name","templateid","description","priority"],
"filter": {
"value": "1",
"status": 0,
"hostid": 10446,
"templateid": 31149
}
},
"auth": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"id": 1
}
note: I know how to do the count, I just placed this code above because it's more simple and I'm in doubt with this part of code
It seems to work, but when I create new items that belongs to this template Y, they are not part of my count.
What seemed strange for me was this number of templateid, my template Y don't have this id, but it shows me this number when I execute my code for bring to me the template id for my host problems lol
plsss help me
Comment