Service: reduce severity while host is down

This commit is contained in:
Alexander A. Klimov 2019-04-11 11:36:23 +02:00
parent ae18536b0f
commit 66949dd018
2 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,7 @@ enum SeverityFlag
{
SeverityFlagDowntime = 1,
SeverityFlagAcknowledgement = 2,
SeverityFlagHostDown = 4,
SeverityFlagUnhandled = 8,
SeverityFlagPending = 16,
SeverityFlagWarning = 32,

View File

@ -125,6 +125,8 @@ int Service::GetSeverity() const
severity |= SeverityFlagDowntime;
else if (IsAcknowledged())
severity |= SeverityFlagAcknowledgement;
else if (m_Host->GetProblem())
severity |= SeverityFlagHostDown;
else
severity |= SeverityFlagUnhandled;