Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
94 lines (94 sloc) 1.88 KB
GET /monitoring/_search
{
"query": {
"bool": {
"should": [
{
"bool": {
"must": [
{
"term": {
"device_indicator_join": "device"
}
},
{
"range": {
"state": {
"gt": 0
}
}
},
{
"range": {
"last_received_state_change": {
"lte": "now-5m"
}
}
}
],
"must_not": [
{
"term": {
"ack": true
}
}
]
}
},
{
"bool": {
"must": [
{
"term": {
"device_indicator_join": "indicator"
}
},
{
"has_parent": {
"parent_type": "device",
"query": {
"term": {
"state": 0
}
}
}
},
{
"range": {
"state": {
"gt": 0
}
}
},
{
"range": {
"last_received_state_change": {
"lte": "now-5m"
}
}
}
],
"must_not": [
{
"term": {
"ack": true
}
}
]
}
}
]
}
},
"sort": [
{
"state": {
"order": "desc"
},
"last_received_state_change": {
"order": "desc"
}
}
],
"size": 100
}
You can’t perform that action at this time.