Module: check_mk
Branch: master
Commit: b89e06b3e12b1f32a67ce3d3a9357d6042d4ccf1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b89e06b3e12b1f…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Oct 14 14:07:44 2016 +0200
Fetched Livestatus from downstream.
---
livestatus/src/ChronoUtils.h | 2 ++
livestatus/src/LogEntry.cc | 22 ++++++++++++++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/livestatus/src/ChronoUtils.h b/livestatus/src/ChronoUtils.h
index 79d17e7..9b9b005 100644
--- a/livestatus/src/ChronoUtils.h
+++ b/livestatus/src/ChronoUtils.h
@@ -73,6 +73,8 @@ public:
FormattedTimePoint(std::chrono::system_clock::time_point tp,
const std::string &format)
: _tp(tp), _format(format) {}
+ FormattedTimePoint(time_t t, const std::string &format)
+ : _tp(std::chrono::system_clock::from_time_t(t)), _format(format) {}
friend std::ostream &operator<<(std::ostream &os,
const FormattedTimePoint &f) {
diff --git a/livestatus/src/LogEntry.cc b/livestatus/src/LogEntry.cc
index b4622a4..10bdf82 100644
--- a/livestatus/src/LogEntry.cc
+++ b/livestatus/src/LogEntry.cc
@@ -239,13 +239,26 @@ std::vector<LogEntry::LogDef> LogEntry::log_definitions{
LOGCLASS_NOTIFICATION,
LogEntryType::none,
{Param::ContactName, Param::HostName, Param::StateType,
- Param::CommandName, Param::Comment}},
+ Param::CommandName, Param::CheckOutput, Param::Comment}},
////////////////
- LogDef{"SERVICE NOTIFICATION RESULT: ",
+ LogDef{
+ "SERVICE NOTIFICATION RESULT: ",
+ LOGCLASS_NOTIFICATION,
+ LogEntryType::none,
+ {Param::ContactName, Param::HostName, Param::SvcDesc, Param::StateType,
+ Param::CommandName, Param::CheckOutput, Param::Comment}},
+ ////////////////
+ LogDef{"HOST NOTIFICATION PROGRESS: ",
+ LOGCLASS_NOTIFICATION,
+ LogEntryType::none,
+ {Param::ContactName, Param::HostName, Param::StateType,
+ Param::CommandName, Param::CheckOutput}},
+ ////////////////
+ LogDef{"SERVICE NOTIFICATION PROGRESS: ",
LOGCLASS_NOTIFICATION,
LogEntryType::none,
{Param::ContactName, Param::HostName, Param::SvcDesc,
- Param::StateType, Param::CommandName, Param::Comment}},
+ Param::StateType, Param::CommandName, Param::CheckOutput}},
////////////////
LogDef{"HOST ALERT HANDLER STARTED: ",
8, // LOGCLASS_ALERT_HANDLERS,
@@ -396,7 +409,8 @@ unordered_map<string, HostState> hostStateTypes{
{"UNREACHABLE", HostState::unreachable},
// states from "... ALERT"/"... NOTIFICATION"
{"RECOVERY", HostState::up},
- // states from "... ALERT HANDLER STOPPED"
+ // states from "... ALERT HANDLER STOPPED" and "(HOST|SERVICE)
NOTIFICATION
+ // (RESULT|PROGRESS)"
{"OK", HostState::up},
{"WARNING", HostState::down},
{"CRITICAL", HostState::unreachable},