]> granicus.if.org Git - icinga2/commitdiff
Rename livestatus classes.
authorMichael Friedrich <michael.friedrich@netways.de>
Wed, 28 May 2014 12:25:12 +0000 (14:25 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 28 May 2014 12:42:00 +0000 (14:42 +0200)
Refs #6346

components/livestatus/CMakeLists.txt
components/livestatus/livestatuslistener.cpp [moved from components/livestatus/listener.cpp with 97% similarity]
components/livestatus/livestatuslistener.hpp [moved from components/livestatus/listener.hpp with 96% similarity]
components/livestatus/livestatuslistener.ti [moved from components/livestatus/listener.ti with 100% similarity]
components/livestatus/livestatuslogutility.cpp [moved from components/livestatus/logutility.cpp with 90% similarity]
components/livestatus/livestatuslogutility.hpp [moved from components/livestatus/logutility.hpp with 94% similarity]
components/livestatus/livestatusquery.cpp [moved from components/livestatus/query.cpp with 88% similarity]
components/livestatus/livestatusquery.hpp [moved from components/livestatus/query.hpp with 92% similarity]
components/livestatus/logtable.cpp
components/livestatus/statehisttable.cpp
components/livestatus/statustable.cpp

index f706a43569fa76d57f54559da28d4b99febe4ddc..42d2682710d4b4ae9e7fea09a38554bf8ed6d5d0 100644 (file)
@@ -15,7 +15,7 @@
 # along with this program; if not, write to the Free Software Foundation
 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
-mkclass_target(listener.ti listener.thpp)
+mkclass_target(livestatuslistener.ti livestatuslistener.thpp)
 
 mkembedconfig_target(livestatus-type.conf livestatus-type.cpp)
 
@@ -24,8 +24,9 @@ add_library(livestatus SHARED aggregator.cpp andfilter.cpp attributefilter.cpp
   commentstable.cpp contactgroupstable.cpp contactstable.cpp countaggregator.cpp
   downtimestable.cpp endpointstable.cpp filter.cpp historytable.cpp
   hostgroupstable.cpp hoststable.cpp invavgaggregator.cpp invsumaggregator.cpp
-  listener.cpp listener.thpp logutility.cpp logtable.cpp maxaggregator.cpp
-  minaggregator.cpp negatefilter.cpp orfilter.cpp query.cpp
+  livestatuslistener.cpp livestatuslistener.thpp livestatusquery.cpp
+  livestatuslogutility.cpp logtable.cpp maxaggregator.cpp
+  minaggregator.cpp negatefilter.cpp orfilter.cpp
   servicegroupstable.cpp servicestable.cpp statehisttable.cpp
   statustable.cpp stdaggregator.cpp sumaggregator.cpp table.cpp
   timeperiodstable.cpp livestatus-type.cpp)
similarity index 97%
rename from components/livestatus/listener.cpp
rename to components/livestatus/livestatuslistener.cpp
index 776462597580079013e9afe0b4507341a97af2dd..f230fb349cf3de64c9725d2b5ad2a4cd67b9181b 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "livestatus/listener.hpp"
+#include "livestatus/livestatuslistener.hpp"
 #include "config/configcompilercontext.hpp"
 #include "base/utility.hpp"
 #include "base/objectlock.hpp"
@@ -155,7 +155,7 @@ void LivestatusListener::ClientHandler(const Socket::Ptr& client)
                if (lines.empty())
                        break;
 
-               Query::Ptr query = make_shared<Query>(lines, GetCompatLogPath());
+               LivestatusQuery::Ptr query = make_shared<LivestatusQuery>(lines, GetCompatLogPath());
                if (!query->Execute(stream))
                        break;
        }
similarity index 96%
rename from components/livestatus/listener.hpp
rename to components/livestatus/livestatuslistener.hpp
index 6a4080ef34146b4655ad2401d010a084c4eede0c..63341dfbbdc1332cede8287ff491e8c9dfea6286 100644 (file)
@@ -20,8 +20,8 @@
 #ifndef LIVESTATUSLISTENER_H
 #define LIVESTATUSLISTENER_H
 
-#include "livestatus/listener.thpp"
-#include "livestatus/query.hpp"
+#include "livestatus/livestatuslistener.thpp"
+#include "livestatus/livestatusquery.hpp"
 #include "base/socket.hpp"
 #include <boost/thread/thread.hpp>
 
similarity index 90%
rename from components/livestatus/logutility.cpp
rename to components/livestatus/livestatuslogutility.cpp
index 032d5b93f77bed3871fad843391cb77cc94fe116..1fcec9f9949ea030bf9441e122768c8a6a7ccae3 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "livestatus/logutility.hpp"
+#include "livestatus/livestatuslogutility.hpp"
 #include "icinga/service.hpp"
 #include "icinga/host.hpp"
 #include "icinga/user.hpp"
 
 using namespace icinga;
 
-void LogUtility::CreateLogIndex(const String& path, std::map<time_t, String>& index)
+void LivestatusLogUtility::CreateLogIndex(const String& path, std::map<time_t, String>& index)
 {
-       Utility::Glob(path + "/icinga.log", boost::bind(&LogUtility::CreateLogIndexFileHandler, _1, boost::ref(index)), GlobFile);
-       Utility::Glob(path + "/archives/*.log", boost::bind(&LogUtility::CreateLogIndexFileHandler, _1, boost::ref(index)), GlobFile);
+       Utility::Glob(path + "/icinga.log", boost::bind(&LivestatusLogUtility::CreateLogIndexFileHandler, _1, boost::ref(index)), GlobFile);
+       Utility::Glob(path + "/archives/*.log", boost::bind(&LivestatusLogUtility::CreateLogIndexFileHandler, _1, boost::ref(index)), GlobFile);
 }
 
-void LogUtility::CreateLogIndexFileHandler(const String& path, std::map<time_t, String>& index)
+void LivestatusLogUtility::CreateLogIndexFileHandler(const String& path, std::map<time_t, String>& index)
 {
        std::ifstream stream;
        stream.open(path.CStr(), std::ifstream::in);
@@ -68,12 +68,12 @@ void LogUtility::CreateLogIndexFileHandler(const String& path, std::map<time_t,
 
        stream.close();
 
-       Log(LogDebug, "LivestatusListener/LogUtility", "Indexing log file: '" + path + "' with timestamp start: '" + Convert::ToString(ts_start) + "'.");
+       Log(LogDebug, "LivestatusLogUtility", "Indexing log file: '" + path + "' with timestamp start: '" + Convert::ToString(ts_start) + "'.");
 
        index[ts_start] = path;
 }
 
-void LogUtility::CreateLogCache(std::map<time_t, String> index, HistoryTable *table,
+void LivestatusLogUtility::CreateLogCache(std::map<time_t, String> index, HistoryTable *table,
     time_t from, time_t until, const AddRowFunction& addRowFn)
 {
        ASSERT(table);
@@ -100,11 +100,11 @@ void LogUtility::CreateLogCache(std::map<time_t, String> index, HistoryTable *ta
                        if (line.empty())
                                continue; /* Ignore empty lines */
 
-                       Dictionary::Ptr log_entry_attrs = LogUtility::GetAttributes(line);
+                       Dictionary::Ptr log_entry_attrs = LivestatusLogUtility::GetAttributes(line);
 
                        /* no attributes available - invalid log line */
                        if (!log_entry_attrs) {
-                               Log(LogDebug, "LivestatusListener/LogUtility", "Skipping invalid log line: '" + line + "'.");
+                               Log(LogDebug, "LivestatusLogUtility", "Skipping invalid log line: '" + line + "'.");
                                continue;
                        }
 
@@ -118,7 +118,7 @@ void LogUtility::CreateLogCache(std::map<time_t, String> index, HistoryTable *ta
        }
 }
 
-Dictionary::Ptr LogUtility::GetAttributes(const String& text)
+Dictionary::Ptr LivestatusLogUtility::GetAttributes(const String& text)
 {
         Dictionary::Ptr bag = make_shared<Dictionary>();
 
@@ -127,7 +127,7 @@ Dictionary::Ptr LogUtility::GetAttributes(const String& text)
          */
         unsigned long time = atoi(text.SubStr(1, 11).CStr());
 
-        Log(LogDebug, "LivestatusListener/LogUtility", "Processing log line: '" + text + "'.");
+        Log(LogDebug, "LivestatusLogUtility", "Processing log line: '" + text + "'.");
         bag->Set("time", time);
 
         size_t colon = text.FindFirstOf(':');
similarity index 94%
rename from components/livestatus/logutility.hpp
rename to components/livestatus/livestatuslogutility.hpp
index 087073b3a744559c625c6da12775ba404a30d015..3f2b33bbb332fc40b4adf4fa07d0b0fa7ba0e789 100644 (file)
@@ -17,8 +17,8 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#ifndef LOGUTILITY_H
-#define LOGUTILITY_H
+#ifndef LIVESTATUSLOGUTILITY_H
+#define LIVESTATUSLOGUTILITY_H
 
 #include "livestatus/historytable.hpp"
 
@@ -60,7 +60,7 @@ enum LogEntryClass {
 /**
  * @ingroup livestatus
  */
-class LogUtility
+class LivestatusLogUtility
 {
 
 public:
@@ -70,9 +70,9 @@ public:
        static Dictionary::Ptr GetAttributes(const String& text);
 
 private:
-       LogUtility(void);
+       LivestatusLogUtility(void);
 };
 
 }
 
-#endif /* LOGUTILITY_H */
+#endif /* LIVESTATUSLOGUTILITY_H */
similarity index 88%
rename from components/livestatus/query.cpp
rename to components/livestatus/livestatusquery.cpp
index 1584a96fa7902f02af9bc64cf30fcf273ae59688..00e5c4176a578a6d73fe3bfef601d71d088034e3 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "livestatus/query.hpp"
+#include "livestatus/livestatusquery.hpp"
 #include "livestatus/countaggregator.hpp"
 #include "livestatus/sumaggregator.hpp"
 #include "livestatus/minaggregator.hpp"
@@ -47,7 +47,7 @@ using namespace icinga;
 static int l_ExternalCommands = 0;
 static boost::mutex l_QueryMutex;
 
-Query::Query(const std::vector<String>& lines, const String& compat_log_path)
+LivestatusQuery::LivestatusQuery(const std::vector<String>& lines, const String& compat_log_path)
        : m_KeepAlive(false), m_OutputFormat("csv"), m_ColumnHeaders(true),
          m_LogTimeFrom(0), m_LogTimeUntil(static_cast<long>(Utility::GetTime()))
 {
@@ -62,7 +62,7 @@ Query::Query(const std::vector<String>& lines, const String& compat_log_path)
        BOOST_FOREACH(const String& line, lines) {
                msg += line + "\n";
        }
-       Log(LogDebug, "LivestatusListener/Query", msg);
+       Log(LogDebug, "LivestatusQuery", msg);
 
        m_CompatLogPath = compat_log_path;
 
@@ -202,10 +202,10 @@ Query::Query(const std::vector<String>& lines, const String& compat_log_path)
 
                        if (header == "Or" || header == "StatsOr") {
                                filter = make_shared<OrFilter>();
-                               Log(LogDebug, "LivestatusListener/Query", "Add OR filter for " + params + " column(s). " + Convert::ToString(deq.size()) + " filters available.");
+                               Log(LogDebug, "LivestatusQuery", "Add OR filter for " + params + " column(s). " + Convert::ToString(deq.size()) + " filters available.");
                        } else {
                                filter = make_shared<AndFilter>();
-                               Log(LogDebug, "LivestatusListener/Query", "Add AND filter for " + params + " column(s). " + Convert::ToString(deq.size()) + " filters available.");
+                               Log(LogDebug, "LivestatusQuery", "Add AND filter for " + params + " column(s). " + Convert::ToString(deq.size()) + " filters available.");
                        }
 
                        if (num > deq.size()) {
@@ -217,7 +217,7 @@ Query::Query(const std::vector<String>& lines, const String& compat_log_path)
 
                        while (num > 0 && num--) {
                                filter->AddSubFilter(deq.back());
-                               Log(LogDebug, "LivestatusListener/Query", "Add " +  Convert::ToString(num) + " filter.");
+                               Log(LogDebug, "LivestatusQuery", "Add " +  Convert::ToString(num) + " filter.");
                                deq.pop_back();
                                if (&deq == &stats)
                                        aggregators.pop_back();
@@ -269,14 +269,14 @@ Query::Query(const std::vector<String>& lines, const String& compat_log_path)
        m_Aggregators.swap(aggregators);
 }
 
-int Query::GetExternalCommands(void)
+int LivestatusQuery::GetExternalCommands(void)
 {
        boost::mutex::scoped_lock lock(l_QueryMutex);
 
        return l_ExternalCommands;
 }
 
-Filter::Ptr Query::ParseFilter(const String& params, unsigned long& from, unsigned long& until)
+Filter::Ptr LivestatusQuery::ParseFilter(const String& params, unsigned long& from, unsigned long& until)
 {
        /*
         * time >= 1382696656
@@ -340,12 +340,12 @@ Filter::Ptr Query::ParseFilter(const String& params, unsigned long& from, unsign
                }
        }
 
-       Log(LogDebug, "LivestatusListener/Query", "Parsed filter with attr: '" + attr + "' op: '" + op + "' val: '" + val + "'.");
+       Log(LogDebug, "LivestatusQuery", "Parsed filter with attr: '" + attr + "' op: '" + op + "' val: '" + val + "'.");
 
        return filter;
 }
 
-void Query::PrintResultSet(std::ostream& fp, const Array::Ptr& rs)
+void LivestatusQuery::PrintResultSet(std::ostream& fp, const Array::Ptr& rs)
 {
        if (m_OutputFormat == "csv") {
                ObjectLock olock(rs);
@@ -373,7 +373,7 @@ void Query::PrintResultSet(std::ostream& fp, const Array::Ptr& rs)
        }
 }
 
-void Query::PrintCsvArray(std::ostream& fp, const Array::Ptr& array, int level)
+void LivestatusQuery::PrintCsvArray(std::ostream& fp, const Array::Ptr& array, int level)
 {
        bool first = true;
 
@@ -391,9 +391,9 @@ void Query::PrintCsvArray(std::ostream& fp, const Array::Ptr& array, int level)
        }
 }
 
-void Query::ExecuteGetHelper(const Stream::Ptr& stream)
+void LivestatusQuery::ExecuteGetHelper(const Stream::Ptr& stream)
 {
-       Log(LogInformation, "LivestatusListener/Query", "Table: " + m_Table);
+       Log(LogInformation, "LivestatusQuery", "Table: " + m_Table);
 
        Table::Ptr table = Table::GetByName(m_Table, m_CompatLogPath, m_LogTimeFrom, m_LogTimeUntil);
 
@@ -490,7 +490,7 @@ void Query::ExecuteGetHelper(const Stream::Ptr& stream)
        SendResponse(stream, LivestatusErrorOK, result.str());
 }
 
-void Query::ExecuteCommandHelper(const Stream::Ptr& stream)
+void LivestatusQuery::ExecuteCommandHelper(const Stream::Ptr& stream)
 {
        {
                boost::mutex::scoped_lock lock(l_QueryMutex);
@@ -498,18 +498,18 @@ void Query::ExecuteCommandHelper(const Stream::Ptr& stream)
                l_ExternalCommands++;
        }
 
-       Log(LogInformation, "LivestatusListener/Query", "Executing command: " + m_Command);
+       Log(LogInformation, "LivestatusQuery", "Executing command: " + m_Command);
        ExternalCommandProcessor::Execute(m_Command);
        SendResponse(stream, LivestatusErrorOK, "");
 }
 
-void Query::ExecuteErrorHelper(const Stream::Ptr& stream)
+void LivestatusQuery::ExecuteErrorHelper(const Stream::Ptr& stream)
 {
-       Log(LogDebug, "LivestatusListener/Query", "ERROR: Code: '" + Convert::ToString(m_ErrorCode) + "' Message: '" + m_ErrorMessage + "'.");
+       Log(LogDebug, "LivestatusQuery", "ERROR: Code: '" + Convert::ToString(m_ErrorCode) + "' Message: '" + m_ErrorMessage + "'.");
        SendResponse(stream, m_ErrorCode, m_ErrorMessage);
 }
 
-void Query::SendResponse(const Stream::Ptr& stream, int code, const String& data)
+void LivestatusQuery::SendResponse(const Stream::Ptr& stream, int code, const String& data)
 {
        if (m_ResponseHeader == "fixed16")
                PrintFixed16(stream, code, data);
@@ -521,12 +521,12 @@ void Query::SendResponse(const Stream::Ptr& stream, int code, const String& data
                        std::ostringstream info;
                        info << "Exception thrown while writing to the livestatus socket: " << std::endl
                             << DiagnosticInformation(ex);
-                       Log(LogCritical, "LivestatusListener/Query", info.str());
+                       Log(LogCritical, "LivestatusQuery", info.str());
                }
        }
 }
 
-void Query::PrintFixed16(const Stream::Ptr& stream, int code, const String& data)
+void LivestatusQuery::PrintFixed16(const Stream::Ptr& stream, int code, const String& data)
 {
        ASSERT(code >= 100 && code <= 999);
 
@@ -541,14 +541,14 @@ void Query::PrintFixed16(const Stream::Ptr& stream, int code, const String& data
                std::ostringstream info;
                info << "Exception thrown while writing to the livestatus socket: " << std::endl
                     << DiagnosticInformation(ex);
-               Log(LogCritical, "LivestatusListener/Query", info.str());
+               Log(LogCritical, "LivestatusQuery", info.str());
        }
 }
 
-bool Query::Execute(const Stream::Ptr& stream)
+bool LivestatusQuery::Execute(const Stream::Ptr& stream)
 {
        try {
-               Log(LogInformation, "LivestatusListener/Query", "Executing livestatus query: " + m_Verb);
+               Log(LogInformation, "LivestatusQuery", "Executing livestatus query: " + m_Verb);
 
                if (m_Verb == "GET")
                        ExecuteGetHelper(stream);
similarity index 92%
rename from components/livestatus/query.hpp
rename to components/livestatus/livestatusquery.hpp
index a0f096e582deaae9cd8401df857dd9145f106b79..98f5c9a158307859c689043ddc62a25f32c22fda 100644 (file)
@@ -17,8 +17,8 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#ifndef QUERY_H
-#define QUERY_H
+#ifndef LIVESTATUSQUERY_H
+#define LIVESTATUSQUERY_H
 
 #include "livestatus/filter.hpp"
 #include "livestatus/aggregator.hpp"
@@ -42,12 +42,12 @@ enum LivestatusError
 /**
  * @ingroup livestatus
  */
-class Query : public Object
+class LivestatusQuery : public Object
 {
 public:
-       DECLARE_PTR_TYPEDEFS(Query);
+       DECLARE_PTR_TYPEDEFS(LivestatusQuery);
 
-       Query(const std::vector<String>& lines, const String& compat_log_path);
+       LivestatusQuery(const std::vector<String>& lines, const String& compat_log_path);
 
        bool Execute(const Stream::Ptr& stream);
 
@@ -97,4 +97,4 @@ private:
 
 }
 
-#endif /* QUERY_H */
+#endif /* LIVESTATUSQUERY_H */
index 11138816bfa3d959a32a6704196536a6b8f77d76..7d86d8e4a7a6fb5454881c166ddda9017cca0b27 100644 (file)
@@ -18,7 +18,7 @@
  ******************************************************************************/
 
 #include "livestatus/logtable.hpp"
-#include "livestatus/logutility.hpp"
+#include "livestatus/livestatuslogutility.hpp"
 #include "livestatus/hoststable.hpp"
 #include "livestatus/servicestable.hpp"
 #include "livestatus/contactstable.hpp"
@@ -91,16 +91,16 @@ String LogTable::GetName(void) const
 
 void LogTable::FetchRows(const AddRowFunction& addRowFn)
 {
-       Log(LogNotice, "LivestatusListener/LogTable", "Pre-selecting log file from " + Convert::ToString(m_TimeFrom) + " until " + Convert::ToString(m_TimeUntil));
+       Log(LogDebug, "LogTable", "Pre-selecting log file from " + Convert::ToString(m_TimeFrom) + " until " + Convert::ToString(m_TimeUntil));
 
        /* create log file index */
-       LogUtility::CreateLogIndex(m_CompatLogPath, m_LogFileIndex);
+       LivestatusLogUtility::CreateLogIndex(m_CompatLogPath, m_LogFileIndex);
 
        /* generate log cache */
-       LogUtility::CreateLogCache(m_LogFileIndex, this, m_TimeFrom, m_TimeUntil, addRowFn);
+       LivestatusLogUtility::CreateLogCache(m_LogFileIndex, this, m_TimeFrom, m_TimeUntil, addRowFn);
 }
 
-/* gets called in LogUtility::CreateLogCache */
+/* gets called in LivestatusLogUtility::CreateLogCache */
 void LogTable::UpdateLogEntries(const Dictionary::Ptr& log_entry_attrs, int line_count, int lineno, const AddRowFunction& addRowFn)
 {
        /* additional attributes only for log table */
index 350ea93aa4d924d80ce2426cb73418d18a185a37..c5b95cf0e542402ca4b633ef8ad636684e0f07eb 100644 (file)
@@ -18,7 +18,7 @@
  ******************************************************************************/
 
 #include "livestatus/statehisttable.hpp"
-#include "livestatus/logutility.hpp"
+#include "livestatus/livestatuslogutility.hpp"
 #include "livestatus/hoststable.hpp"
 #include "livestatus/servicestable.hpp"
 #include "livestatus/contactstable.hpp"
@@ -117,7 +117,7 @@ void StateHistTable::UpdateLogEntries(const Dictionary::Ptr& log_entry_attrs, in
 
                state_hist_service_states->Add(state_hist_bag);
 
-               Log(LogDebug, "LivestatusListener/StateHistTable", "statehist: Adding new object '" + checkable->GetName() + "' to services cache.");
+               Log(LogDebug, "StateHistTable", "statehist: Adding new object '" + checkable->GetName() + "' to services cache.");
        } else {
                state_hist_service_states = m_CheckablesCache[checkable];
                state_hist_bag = state_hist_service_states->Get(state_hist_service_states->GetLength()-1); /* fetch latest state from history */
@@ -173,7 +173,7 @@ void StateHistTable::UpdateLogEntries(const Dictionary::Ptr& log_entry_attrs, in
 
                                        state_hist_service_states->Add(state_hist_bag_new);
 
-                                       Log(LogDebug, "LivestatusListener/StateHistTable", "statehist: State change detected for object '" +
+                                       Log(LogDebug, "StateHistTable", "statehist: State change detected for object '" +
                                            checkable->GetName() + "' in '" + log_line + "'.");
                                }
                                break;
@@ -252,13 +252,13 @@ String StateHistTable::GetName(void) const
 
 void StateHistTable::FetchRows(const AddRowFunction& addRowFn)
 {
-       Log(LogNotice, "LivestatusListener/StateHistTable", "Pre-selecting log file from " + Convert::ToString(m_TimeFrom) + " until " + Convert::ToString(m_TimeUntil));
+       Log(LogDebug, "StateHistTable", "Pre-selecting log file from " + Convert::ToString(m_TimeFrom) + " until " + Convert::ToString(m_TimeUntil));
 
        /* create log file index */
-       LogUtility::CreateLogIndex(m_CompatLogPath, m_LogFileIndex);
+       LivestatusLogUtility::CreateLogIndex(m_CompatLogPath, m_LogFileIndex);
 
        /* generate log cache */
-       LogUtility::CreateLogCache(m_LogFileIndex, this, m_TimeFrom, m_TimeUntil, addRowFn);
+       LivestatusLogUtility::CreateLogCache(m_LogFileIndex, this, m_TimeFrom, m_TimeUntil, addRowFn);
 
        Checkable::Ptr checkable;
 
index 306a6684b60b05738fc4dfa26f0580f27004d613..eb5d3f6000aea8501a09f80a8a4fe2789b97fc61 100644 (file)
@@ -18,7 +18,7 @@
  ******************************************************************************/
 
 #include "livestatus/statustable.hpp"
-#include "livestatus/listener.hpp"
+#include "livestatus/livestatuslistener.hpp"
 #include "icinga/icingaapplication.hpp"
 #include "icinga/cib.hpp"
 #include "icinga/host.hpp"
@@ -152,12 +152,12 @@ Value StatusTable::ServiceChecksRateAccessor(const Value&)
 
 Value StatusTable::ExternalCommandsAccessor(const Value&)
 {
-       return Query::GetExternalCommands();
+       return LivestatusQuery::GetExternalCommands();
 }
 
 Value StatusTable::ExternalCommandsRateAccessor(const Value&)
 {
-       return (Query::GetExternalCommands() / (Utility::GetTime() - Application::GetStartTime()));
+       return (LivestatusQuery::GetExternalCommands() / (Utility::GetTime() - Application::GetStartTime()));
 }
 
 Value StatusTable::NagiosPidAccessor(const Value&)