85 result.SetString(
"AcknowledgedTime",
"n/a");
87 result.SetString(
"AcknowledgedTime",
90 result.SetString(
"LastDetectedTime",
102 const string & message)
106 lock_guard<mutex> guard(
m_Lock);
111 found->second.m_LastDetectedTimestamp = chrono::system_clock::now();
112 found->second.m_On =
true;
113 ++found->second.m_Count;
114 ++found->second.m_CountSinceAck;
115 found->second.m_Message = message;
142 lock_guard<mutex> guard(
m_Lock);
148 if (!found->second.m_On)
151 found->second.m_AcknowledgedTimestamp = chrono::system_clock::now();
152 found->second.m_On =
false;
153 found->second.m_User = user;
154 found->second.m_CountSinceAck = 0;
185 lock_guard<mutex> guard(
m_Lock);
200 lock_guard<mutex> guard(
m_Lock);
203 if (k->second.m_On) {
const size_t kAlertToIdMapSize
const SAlertToId kAlertToIdMap[]
@ ePSGS_AlertAcknowledged
@ ePSGS_AlertAlreadyAcknowledged
@ ePSGS_ConfigListenerBacklog
@ ePSGS_ConfigAuthDecrypt
@ ePSGS_ConfigExcludeCachePurgeSize
@ ePSGS_NoValidCassandraMapping
@ ePSGS_NewCassandraMappingAccepted
@ ePSGS_ConfigSNPHealthTimeout
@ ePSGS_ConfigHttpWorkers
@ ePSGS_ConfigStatScaleType
@ ePSGS_ConfigMaxConnections
@ ePSGS_NewCassandraSatNamesMapping
@ ePSGS_ConfigLMDBHealthTimeout
@ ePSGS_ConfigCassandraHealthTimeout
@ ePSGS_ConfigTcpMaxConnSoftLimit
@ ePSGS_ConfigExcludeCacheInactivity
@ ePSGS_ConfigWGSHealthTimeout
@ ePSGS_InvalidCassandraMapping
@ ePSGS_ConfigHealthTimeout
@ ePSGS_ConfigStatMinMaxVal
@ ePSGS_NoCassandraPublicCommentsMapping
@ ePSGS_ConfigCDDHealthTimeout
@ ePSGS_ConfigExcludeCacheSize
@ ePSGS_NewCassandraPublicCommentMapping
static CJsonNode NewObjectNode()
Create a new JSON object node.
map< EPSGS_AlertType, SPSGAlertAttributes > m_Alerts
void Register(EPSGS_AlertType alert_type, const string &message)
CJsonNode SerializeActive(void) const
CJsonNode Serialize(void) const
string x_TypeToId(EPSGS_AlertType type) const
EPSGS_AlertAckResult Acknowledge(const string &alert_id, const string &user)
EPSGS_AlertType x_IdToType(const string &alert_id) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
string FormatPreciseTime(const chrono::system_clock::time_point &t_point)
CJsonNode Serialize(void) const
chrono::system_clock::time_point m_LastDetectedTimestamp
chrono::system_clock::time_point m_AcknowledgedTimestamp