Skip to content

Commit

Permalink
Adding alert filters for specific pages
Browse files Browse the repository at this point in the history
  • Loading branch information
simianhacker committed Oct 7, 2021
1 parent 6c5110e commit 225ee7e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions x-pack/plugins/monitoring/common/types/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface CommonAlertState {
export interface CommonAlertFilter {
nodeUuid?: string;
shardId?: string;
shardIndex?: string;
}

export interface CommonAlertParamDetail {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ export const ElasticsearchCcrShardPage: React.FC<ComponentProps> = () => {
fetch: services.http.fetch,
alertTypeIds: [RULE_CCR_READ_EXCEPTIONS],
clusterUuid,
filters: [
{
shardId,
},
],
timeRange: {
min: bounds.min.valueOf(),
max: bounds.max.valueOf(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ export const ElasticsearchIndexAdvancedPage: React.FC<ComponentProps> = () => {
const alertsResponse = await fetchAlerts({
fetch: services.http.fetch,
alertTypeIds: [RULE_LARGE_SHARD_SIZE],
filters: [
{
shardIndex: index,
},
],
clusterUuid,
timeRange: {
min: bounds.min.valueOf(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ export const ElasticsearchIndexPage: React.FC<ComponentProps> = () => {
const alertsResponse = await fetchAlerts({
fetch: services.http.fetch,
alertTypeIds: [RULE_LARGE_SHARD_SIZE],
filters: [
{
shardIndex: index,
},
],
clusterUuid,
timeRange: {
min: bounds.min.valueOf(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ export const ElasticsearchNodeAdvancedPage: React.FC<ComponentProps> = () => {
RULE_DISK_USAGE,
RULE_MEMORY_USAGE,
],
filters: [
{
nodeUuid: node,
},
],
timeRange: {
min: bounds.min.valueOf(),
max: bounds.max.valueOf(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export const ElasticsearchNodePage: React.FC<ComponentProps> = () => {
RULE_DISK_USAGE,
RULE_MEMORY_USAGE,
],
filters: [{ nodeUuid: node }],
clusterUuid,
timeRange: {
min: bounds.min.valueOf(),
Expand Down

0 comments on commit 225ee7e

Please sign in to comment.