1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #ifndef LIVESTATUSLOGUTILITY_H
4 #define LIVESTATUSLOGUTILITY_H
6 #include "livestatus/historytable.hpp"
8 using namespace icinga;
14 LogEntryTypeHostAlert,
15 LogEntryTypeHostDowntimeAlert,
16 LogEntryTypeHostFlapping,
17 LogEntryTypeHostNotification,
18 LogEntryTypeHostInitialState,
19 LogEntryTypeHostCurrentState,
20 LogEntryTypeServiceAlert,
21 LogEntryTypeServiceDowntimeAlert,
22 LogEntryTypeServiceFlapping,
23 LogEntryTypeServiceNotification,
24 LogEntryTypeServiceInitialState,
25 LogEntryTypeServiceCurrentState,
26 LogEntryTypeTimeperiodTransition,
28 LogEntryTypeInitialStates,
29 LogEntryTypeProgramStarting
33 LogEntryClassInfo = 0,
34 LogEntryClassAlert = 1,
35 LogEntryClassProgram = 2,
36 LogEntryClassNotification = 3,
37 LogEntryClassPassive = 4,
38 LogEntryClassCommand = 5,
39 LogEntryClassState = 6,
46 class LivestatusLogUtility
49 static void CreateLogIndex(const String& path, std::map<time_t, String>& index);
50 static void CreateLogIndexFileHandler(const String& path, std::map<time_t, String>& index);
51 static void CreateLogCache(std::map<time_t, String> index, HistoryTable *table, time_t from, time_t until, const AddRowFunction& addRowFn);
52 static Dictionary::Ptr GetAttributes(const String& text);
55 LivestatusLogUtility();
60 #endif /* LIVESTATUSLOGUTILITY_H */