-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new tests for alerting dashboards (#832)
Signed-off-by: Ashish Agrawal <[email protected]> (cherry picked from commit 4300484)
- Loading branch information
1 parent
daf284a
commit 98f5a3b
Showing
9 changed files
with
836 additions
and
29 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
...ss/fixtures/plugins/alerting-dashboards-plugin/sample_cluster_metrics_health_monitor.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"name": "sample_cluster_metrics_health_monitor", | ||
"type": "monitor", | ||
"monitor_type": "cluster_metrics_monitor", | ||
"enabled": true, | ||
"schedule": { | ||
"period": { | ||
"unit": "MINUTES", | ||
"interval": 1 | ||
} | ||
}, | ||
"inputs": [ | ||
{ | ||
"uri": { | ||
"api_type": "CLUSTER_HEALTH", | ||
"path": "_cluster/health/", | ||
"path_params": "", | ||
"url": "http://localhost:9200/_cluster/health/" | ||
} | ||
} | ||
], | ||
"triggers": [], | ||
"ui_metadata": { | ||
"schedule": { | ||
"timezone": null, | ||
"frequency": "interval", | ||
"period": { | ||
"unit": "MINUTES", | ||
"interval": 1 | ||
}, | ||
"daily": 0, | ||
"weekly": { | ||
"tue": false, | ||
"wed": false, | ||
"thur": false, | ||
"sat": false, | ||
"fri": false, | ||
"mon": false, | ||
"sun": false | ||
}, | ||
"monthly": { | ||
"type": "day", | ||
"day": 1 | ||
}, | ||
"cronExpression": "0 */1 * * *" | ||
}, | ||
"search": { | ||
"searchType": "clusterMetrics", | ||
"timeField": "", | ||
"aggregations": [], | ||
"groupBy": [], | ||
"bucketValue": 1, | ||
"bucketUnitOfTime": "h", | ||
"filters": [] | ||
}, | ||
"monitor_type": "cluster_metrics_monitor" | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
...ess/fixtures/plugins/alerting-dashboards-plugin/sample_cluster_metrics_stats_monitor.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"name": "sample_cluster_metrics_stats_monitor", | ||
"type": "monitor", | ||
"monitor_type": "cluster_metrics_monitor", | ||
"enabled": true, | ||
"schedule": { | ||
"period": { | ||
"unit": "MINUTES", | ||
"interval": 1 | ||
} | ||
}, | ||
"inputs": [ | ||
{ | ||
"uri": { | ||
"api_type": "CLUSTER_STATS", | ||
"path": "_cluster/stats/", | ||
"path_params": "", | ||
"url": "http://localhost:9200/_cluster/stats/" | ||
} | ||
} | ||
], | ||
"triggers": [ | ||
{ | ||
"query_level_trigger": { | ||
"id": "Y5mmA4kBIezNcMbMJnEy", | ||
"name": "sample_cluster_metrics_stats_monitor-trigger1", | ||
"severity": "1", | ||
"condition": { | ||
"script": { | ||
"source": "ctx.results[0].indices.count >= 0", | ||
"lang": "painless" | ||
} | ||
}, | ||
"actions": [] | ||
} | ||
} | ||
], | ||
"ui_metadata": { | ||
"schedule": { | ||
"timezone": null, | ||
"frequency": "interval", | ||
"period": { | ||
"unit": "MINUTES", | ||
"interval": 1 | ||
}, | ||
"daily": 0, | ||
"weekly": { | ||
"tue": false, | ||
"wed": false, | ||
"thur": false, | ||
"sat": false, | ||
"fri": false, | ||
"mon": false, | ||
"sun": false | ||
}, | ||
"monthly": { | ||
"type": "day", | ||
"day": 1 | ||
}, | ||
"cronExpression": "0 */1 * * *" | ||
}, | ||
"search": { | ||
"searchType": "clusterMetrics", | ||
"timeField": "", | ||
"aggregations": [], | ||
"groupBy": [], | ||
"bucketValue": 1, | ||
"bucketUnitOfTime": "h", | ||
"filters": [] | ||
}, | ||
"monitor_type": "cluster_metrics_monitor" | ||
} | ||
} |
Oops, something went wrong.