|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
#include <gtest/gtest.h>#include <kcenon/monitoring/alert/alert_types.h>#include <chrono>#include <thread>
Go to the source code of this file.
Classes | |
| class | AlertLabelsTest |
| class | AlertTest |
| class | AlertTransitionTest |
| class | AlertGroupTest |
| class | AlertSilenceTest |
Functions | |
| TEST (AlertSeverityTest, ToStringConversions) | |
| TEST (AlertSeverityTest, OrderingByValue) | |
| TEST (AlertStateTest, ToStringConversions) | |
| TEST_F (AlertLabelsTest, DefaultConstructionIsEmpty) | |
| TEST_F (AlertLabelsTest, ConstructFromMap) | |
| TEST_F (AlertLabelsTest, SetAndGet) | |
| TEST_F (AlertLabelsTest, GetNonexistentReturnsEmpty) | |
| TEST_F (AlertLabelsTest, HasExistingKey) | |
| TEST_F (AlertLabelsTest, SetOverwritesExisting) | |
| TEST_F (AlertLabelsTest, FingerprintIsDeterministic) | |
| TEST_F (AlertLabelsTest, FingerprintDiffersForDifferentValues) | |
| TEST_F (AlertLabelsTest, EqualityOperator) | |
| TEST_F (AlertLabelsTest, InequalityWhenDifferent) | |
| TEST (AlertAnnotationsTest, DefaultConstruction) | |
| TEST (AlertAnnotationsTest, ConstructWithSummaryAndDescription) | |
| TEST (AlertAnnotationsTest, RunbookUrl) | |
| TEST (AlertAnnotationsTest, CustomAnnotations) | |
| TEST_F (AlertTest, DefaultConstruction) | |
| TEST_F (AlertTest, ConstructWithNameAndLabels) | |
| TEST_F (AlertTest, UniqueIds) | |
| TEST_F (AlertTest, FingerprintIncludesNameAndLabels) | |
| TEST_F (AlertTest, FingerprintConsistency) | |
| TEST_F (AlertTest, IsActiveForPendingAndFiring) | |
| TEST_F (AlertTest, StateDurationIsPositive) | |
| TEST_F (AlertTest, FiringDurationZeroWhenNotFiring) | |
| TEST_F (AlertTransitionTest, InactiveToLending) | |
| TEST_F (AlertTransitionTest, InactiveToFiringInvalid) | |
| TEST_F (AlertTransitionTest, InactiveToResolvedInvalid) | |
| TEST_F (AlertTransitionTest, PendingToFiring) | |
| TEST_F (AlertTransitionTest, PendingToInactive) | |
| TEST_F (AlertTransitionTest, FiringToResolved) | |
| TEST_F (AlertTransitionTest, FiringToPendingInvalid) | |
| TEST_F (AlertTransitionTest, ResolvedToPending) | |
| TEST_F (AlertTransitionTest, ResolvedToInactive) | |
| TEST_F (AlertTransitionTest, AnyStateToSuppressed) | |
| TEST_F (AlertTransitionTest, SuppressedToAnyState) | |
| TEST_F (AlertTransitionTest, FullLifecycle) | |
| TEST_F (AlertTransitionTest, FiringStartedAtSetOnlyOnce) | |
| TEST_F (AlertTransitionTest, UpdatedAtChangesOnTransition) | |
| TEST_F (AlertGroupTest, DefaultConstruction) | |
| TEST_F (AlertGroupTest, ConstructWithKey) | |
| TEST_F (AlertGroupTest, AddAlert) | |
| TEST_F (AlertGroupTest, AddMultipleAlerts) | |
| TEST_F (AlertGroupTest, MaxSeverityEmptyGroup) | |
| TEST_F (AlertGroupTest, MaxSeveritySingleAlert) | |
| TEST_F (AlertGroupTest, MaxSeverityMultipleAlerts) | |
| TEST_F (AlertGroupTest, UpdatedAtChangesOnAdd) | |
| TEST_F (AlertSilenceTest, DefaultConstructionIsActive) | |
| TEST_F (AlertSilenceTest, UniqueIds) | |
| TEST_F (AlertSilenceTest, ExpiredSilenceNotActive) | |
| TEST_F (AlertSilenceTest, FutureSilenceNotActive) | |
| TEST_F (AlertSilenceTest, MatchesAlertWithMatchingLabels) | |
| TEST_F (AlertSilenceTest, DoesNotMatchAlertWithDifferentLabels) | |
| TEST_F (AlertSilenceTest, DoesNotMatchAlertMissingLabel) | |
| TEST_F (AlertSilenceTest, EmptyMatchersMatchesAll) | |
| TEST_F (AlertSilenceTest, ExpiredSilenceDoesNotMatch) | |
| TEST_F (AlertSilenceTest, MultipleMatchersMustAllMatch) | |
| TEST_F (AlertSilenceTest, CommentAndCreatedBy) | |
| TEST | ( | AlertAnnotationsTest | , |
| ConstructWithSummaryAndDescription | ) |
Definition at line 157 of file test_alert_types.cpp.
References kcenon::monitoring::alert_annotations::description, and kcenon::monitoring::alert_annotations::summary.
| TEST | ( | AlertAnnotationsTest | , |
| CustomAnnotations | ) |
Definition at line 170 of file test_alert_types.cpp.
References kcenon::monitoring::alert_annotations::custom.
| TEST | ( | AlertAnnotationsTest | , |
| DefaultConstruction | ) |
Definition at line 149 of file test_alert_types.cpp.
References kcenon::monitoring::alert_annotations::custom, kcenon::monitoring::alert_annotations::description, kcenon::monitoring::alert_annotations::runbook_url, and kcenon::monitoring::alert_annotations::summary.
| TEST | ( | AlertAnnotationsTest | , |
| RunbookUrl | ) |
Definition at line 163 of file test_alert_types.cpp.
References kcenon::monitoring::alert_annotations::runbook_url.
| TEST | ( | AlertSeverityTest | , |
| OrderingByValue | ) |
Definition at line 37 of file test_alert_types.cpp.
| TEST | ( | AlertSeverityTest | , |
| ToStringConversions | ) |
Definition at line 30 of file test_alert_types.cpp.
References kcenon::monitoring::alert_severity_to_string().

| TEST | ( | AlertStateTest | , |
| ToStringConversions | ) |
Definition at line 50 of file test_alert_types.cpp.
References kcenon::monitoring::alert_state_to_string().

| TEST_F | ( | AlertGroupTest | , |
| AddAlert | ) |
Definition at line 392 of file test_alert_types.cpp.
| TEST_F | ( | AlertGroupTest | , |
| AddMultipleAlerts | ) |
Definition at line 399 of file test_alert_types.cpp.
| TEST_F | ( | AlertGroupTest | , |
| ConstructWithKey | ) |
Definition at line 387 of file test_alert_types.cpp.
| TEST_F | ( | AlertGroupTest | , |
| DefaultConstruction | ) |
Definition at line 380 of file test_alert_types.cpp.
References kcenon::monitoring::alert_group::empty(), kcenon::monitoring::alert_group::group_key, and kcenon::monitoring::alert_group::size().

| TEST_F | ( | AlertGroupTest | , |
| MaxSeverityEmptyGroup | ) |
Definition at line 407 of file test_alert_types.cpp.
| TEST_F | ( | AlertGroupTest | , |
| MaxSeverityMultipleAlerts | ) |
Definition at line 418 of file test_alert_types.cpp.
References kcenon::monitoring::alert::severity.
| TEST_F | ( | AlertGroupTest | , |
| MaxSeveritySingleAlert | ) |
Definition at line 411 of file test_alert_types.cpp.
References kcenon::monitoring::alert::severity.
| TEST_F | ( | AlertGroupTest | , |
| UpdatedAtChangesOnAdd | ) |
Definition at line 434 of file test_alert_types.cpp.
| TEST_F | ( | AlertLabelsTest | , |
| ConstructFromMap | ) |
Definition at line 71 of file test_alert_types.cpp.
References kcenon::monitoring::alert_labels::get(), and kcenon::monitoring::alert_labels::labels.

| TEST_F | ( | AlertLabelsTest | , |
| DefaultConstructionIsEmpty | ) |
Definition at line 67 of file test_alert_types.cpp.
| TEST_F | ( | AlertLabelsTest | , |
| EqualityOperator | ) |
Definition at line 125 of file test_alert_types.cpp.
References kcenon::monitoring::other, and kcenon::monitoring::alert_labels::set().

| TEST_F | ( | AlertLabelsTest | , |
| FingerprintDiffersForDifferentValues | ) |
Definition at line 114 of file test_alert_types.cpp.
References kcenon::monitoring::other, and kcenon::monitoring::alert_labels::set().

| TEST_F | ( | AlertLabelsTest | , |
| FingerprintIsDeterministic | ) |
Definition at line 100 of file test_alert_types.cpp.
References kcenon::monitoring::other, and kcenon::monitoring::alert_labels::set().

| TEST_F | ( | AlertLabelsTest | , |
| GetNonexistentReturnsEmpty | ) |
Definition at line 84 of file test_alert_types.cpp.
| TEST_F | ( | AlertLabelsTest | , |
| HasExistingKey | ) |
Definition at line 88 of file test_alert_types.cpp.
| TEST_F | ( | AlertLabelsTest | , |
| InequalityWhenDifferent | ) |
Definition at line 136 of file test_alert_types.cpp.
References kcenon::monitoring::other, and kcenon::monitoring::alert_labels::set().

| TEST_F | ( | AlertLabelsTest | , |
| SetAndGet | ) |
Definition at line 79 of file test_alert_types.cpp.
| TEST_F | ( | AlertLabelsTest | , |
| SetOverwritesExisting | ) |
Definition at line 94 of file test_alert_types.cpp.
| TEST_F | ( | AlertSilenceTest | , |
| CommentAndCreatedBy | ) |
Definition at line 535 of file test_alert_types.cpp.
| TEST_F | ( | AlertSilenceTest | , |
| DefaultConstructionIsActive | ) |
Definition at line 451 of file test_alert_types.cpp.
| TEST_F | ( | AlertSilenceTest | , |
| DoesNotMatchAlertMissingLabel | ) |
Definition at line 493 of file test_alert_types.cpp.
References kcenon::monitoring::alert::labels, and kcenon::monitoring::alert_labels::set().

| TEST_F | ( | AlertSilenceTest | , |
| DoesNotMatchAlertWithDifferentLabels | ) |
Definition at line 484 of file test_alert_types.cpp.
References kcenon::monitoring::alert::labels, and kcenon::monitoring::alert_labels::set().

| TEST_F | ( | AlertSilenceTest | , |
| EmptyMatchersMatchesAll | ) |
Definition at line 502 of file test_alert_types.cpp.
References kcenon::monitoring::alert::labels, and kcenon::monitoring::alert_labels::set().

| TEST_F | ( | AlertSilenceTest | , |
| ExpiredSilenceDoesNotMatch | ) |
Definition at line 509 of file test_alert_types.cpp.
References kcenon::monitoring::alert::labels, and kcenon::monitoring::alert_labels::set().

| TEST_F | ( | AlertSilenceTest | , |
| ExpiredSilenceNotActive | ) |
Definition at line 462 of file test_alert_types.cpp.
| TEST_F | ( | AlertSilenceTest | , |
| FutureSilenceNotActive | ) |
Definition at line 468 of file test_alert_types.cpp.
| TEST_F | ( | AlertSilenceTest | , |
| MatchesAlertWithMatchingLabels | ) |
Definition at line 474 of file test_alert_types.cpp.
References kcenon::monitoring::alert::labels, and kcenon::monitoring::alert_labels::set().

| TEST_F | ( | AlertSilenceTest | , |
| MultipleMatchersMustAllMatch | ) |
Definition at line 520 of file test_alert_types.cpp.
References kcenon::monitoring::alert::labels, and kcenon::monitoring::alert_labels::set().

| TEST_F | ( | AlertSilenceTest | , |
| UniqueIds | ) |
Definition at line 456 of file test_alert_types.cpp.
References kcenon::monitoring::alert_silence::id.
| TEST_F | ( | AlertTest | , |
| ConstructWithNameAndLabels | ) |
Definition at line 203 of file test_alert_types.cpp.
| TEST_F | ( | AlertTest | , |
| DefaultConstruction | ) |
Definition at line 193 of file test_alert_types.cpp.
References kcenon::monitoring::alert::name, kcenon::monitoring::alert::resolved_at, kcenon::monitoring::alert::severity, kcenon::monitoring::alert::started_at, kcenon::monitoring::alert::state, and kcenon::monitoring::alert::value.
| TEST_F | ( | AlertTest | , |
| FingerprintConsistency | ) |
Definition at line 223 of file test_alert_types.cpp.
| TEST_F | ( | AlertTest | , |
| FingerprintIncludesNameAndLabels | ) |
Definition at line 216 of file test_alert_types.cpp.
| TEST_F | ( | AlertTest | , |
| FiringDurationZeroWhenNotFiring | ) |
Definition at line 255 of file test_alert_types.cpp.
References kcenon::monitoring::alert::firing_duration().

| TEST_F | ( | AlertTest | , |
| IsActiveForPendingAndFiring | ) |
Definition at line 230 of file test_alert_types.cpp.
References kcenon::monitoring::alert::is_active(), and kcenon::monitoring::alert::state.

| TEST_F | ( | AlertTest | , |
| StateDurationIsPositive | ) |
Definition at line 247 of file test_alert_types.cpp.
References kcenon::monitoring::alert::state_duration().

| TEST_F | ( | AlertTest | , |
| UniqueIds | ) |
Definition at line 210 of file test_alert_types.cpp.
References kcenon::monitoring::alert::id.
| TEST_F | ( | AlertTransitionTest | , |
| AnyStateToSuppressed | ) |
Definition at line 327 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| FiringStartedAtSetOnlyOnce | ) |
Definition at line 350 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| FiringToPendingInvalid | ) |
Definition at line 305 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| FiringToResolved | ) |
Definition at line 297 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| FullLifecycle | ) |
Definition at line 340 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| InactiveToFiringInvalid | ) |
Definition at line 274 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| InactiveToLending | ) |
Definition at line 269 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| InactiveToResolvedInvalid | ) |
Definition at line 279 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| PendingToFiring | ) |
Definition at line 284 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| PendingToInactive | ) |
Definition at line 291 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| ResolvedToInactive | ) |
Definition at line 320 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| ResolvedToPending | ) |
Definition at line 312 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| SuppressedToAnyState | ) |
Definition at line 332 of file test_alert_types.cpp.
| TEST_F | ( | AlertTransitionTest | , |
| UpdatedAtChangesOnTransition | ) |
Definition at line 364 of file test_alert_types.cpp.