Hello -
I am trying to count all the host in a particular host group with a Tag on them. I can get it to count the host in a group with no issue, however I can not seem to figure out how to just count Hosts with a tag In postman it always returns the count for the whole group using the json request below. Any help would be greatly appreciated
{
"jsonrpc": "2.0",
"method": "host.get",
"params": {
"output": ["hostid"],
"groupids": "22",
"filter": {
"tags": [
{
"tag": "Importance",
"value": "Important"
}
]
},
"countOutput": true
},
"auth": "authkey here",
"id": 1
}
I am trying to count all the host in a particular host group with a Tag on them. I can get it to count the host in a group with no issue, however I can not seem to figure out how to just count Hosts with a tag In postman it always returns the count for the whole group using the json request below. Any help would be greatly appreciated
{
"jsonrpc": "2.0",
"method": "host.get",
"params": {
"output": ["hostid"],
"groupids": "22",
"filter": {
"tags": [
{
"tag": "Importance",
"value": "Important"
}
]
},
"countOutput": true
},
"auth": "authkey here",
"id": 1
}
Comment