-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[controller] Add metric for disabled partition map. (#742)
Since disabled metric can cause a cluster to be in undeployable state, this PR is adding an alert to indicate disabled partition per cluster. The proposed action would be for oncall to investigate what error caused the alert and mitigate by restarting those hosts. --------- Co-authored-by: Sourav Maji <[email protected]>
- Loading branch information
1 parent
353a18a
commit c61eeb0
Showing
7 changed files
with
51 additions
and
8 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
...controller/src/main/java/com/linkedin/venice/controller/stats/DisabledPartitionStats.java
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,21 @@ | ||
package com.linkedin.venice.controller.stats; | ||
|
||
import com.linkedin.venice.stats.AbstractVeniceStats; | ||
import io.tehuti.metrics.MetricsRepository; | ||
import io.tehuti.metrics.Sensor; | ||
import io.tehuti.metrics.stats.Count; | ||
|
||
|
||
public class DisabledPartitionStats extends AbstractVeniceStats { | ||
private final Sensor disabledPartitionCount; | ||
|
||
public DisabledPartitionStats(MetricsRepository metricsRepository, String name) { | ||
super(metricsRepository, name); | ||
disabledPartitionCount = registerSensorIfAbsent("disabled_partition_count", new Count()); | ||
} | ||
|
||
public void recordDisabledPartition() { | ||
disabledPartitionCount.record(); | ||
} | ||
|
||
} |
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
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
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
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
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