-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6722 from Icinga/feature/notification-result
Add notification result store/sync
- Loading branch information
Showing
22 changed files
with
183 additions
and
37 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */ | ||
|
||
#include "icinga/notificationresult.hpp" | ||
#include "icinga/notificationresult-ti.cpp" | ||
|
||
using namespace icinga; | ||
|
||
REGISTER_TYPE(NotificationResult); | ||
|
||
double NotificationResult::CalculateExecutionTime() const | ||
{ | ||
return GetExecutionEnd() - GetExecutionStart(); | ||
} |
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,27 @@ | ||
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */ | ||
|
||
#ifndef NOTIFICATIONRESULT_H | ||
#define NOTIFICATIONRESULT_H | ||
|
||
#include "icinga/i2-icinga.hpp" | ||
#include "icinga/notificationresult-ti.hpp" | ||
|
||
namespace icinga | ||
{ | ||
|
||
/** | ||
* A notification result. | ||
* | ||
* @ingroup icinga | ||
*/ | ||
class NotificationResult final : public ObjectImpl<NotificationResult> | ||
{ | ||
public: | ||
DECLARE_OBJECT(NotificationResult); | ||
|
||
double CalculateExecutionTime() const; | ||
}; | ||
|
||
} | ||
|
||
#endif /* NOTIFICATIONRESULT_H */ |
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,24 @@ | ||
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */ | ||
|
||
library icinga; | ||
|
||
namespace icinga | ||
{ | ||
|
||
class NotificationResult | ||
{ | ||
[state] Timestamp execution_start; | ||
[state] Timestamp execution_end; | ||
|
||
[state] Value command; | ||
[state] int exit_status; | ||
[state] String output; | ||
|
||
[state] bool active { | ||
default {{{ return true; }}} | ||
}; | ||
|
||
[state] String execution_endpoint; | ||
}; | ||
|
||
} |
Oops, something went wrong.