icinga2/lib/livestatus/livestatuslogutility.hpp

61 lines
1.4 KiB
C++
Raw Normal View History

/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2014-05-28 14:25:12 +02:00
#ifndef LIVESTATUSLOGUTILITY_H
#define LIVESTATUSLOGUTILITY_H
2014-05-25 16:23:35 +02:00
#include "livestatus/historytable.hpp"
using namespace icinga;
namespace icinga
{
enum LogEntryType {
LogEntryTypeHostAlert,
LogEntryTypeHostDowntimeAlert,
LogEntryTypeHostFlapping,
LogEntryTypeHostNotification,
LogEntryTypeHostInitialState,
LogEntryTypeHostCurrentState,
LogEntryTypeServiceAlert,
LogEntryTypeServiceDowntimeAlert,
LogEntryTypeServiceFlapping,
LogEntryTypeServiceNotification,
LogEntryTypeServiceInitialState,
LogEntryTypeServiceCurrentState,
LogEntryTypeTimeperiodTransition,
LogEntryTypeVersion,
LogEntryTypeInitialStates,
LogEntryTypeProgramStarting
};
enum LogEntryClass {
LogEntryClassInfo = 0,
LogEntryClassAlert = 1,
LogEntryClassProgram = 2,
LogEntryClassNotification = 3,
LogEntryClassPassive = 4,
LogEntryClassCommand = 5,
LogEntryClassState = 6,
LogEntryClassText = 7
};
/**
* @ingroup livestatus
*/
2017-12-31 07:22:16 +01:00
class LivestatusLogUtility
{
public:
static void CreateLogIndex(const String& path, std::map<time_t, String>& index);
static void CreateLogIndexFileHandler(const String& path, std::map<time_t, String>& index);
static void CreateLogCache(std::map<time_t, String> index, HistoryTable *table, time_t from, time_t until, const AddRowFunction& addRowFn);
static Dictionary::Ptr GetAttributes(const String& text);
private:
LivestatusLogUtility();
};
}
2014-05-28 14:25:12 +02:00
#endif /* LIVESTATUSLOGUTILITY_H */