mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
150353d88f
commit
c30d64a261
@ -44,6 +44,7 @@ target_link_libraries(livestatus ${Boost_LIBRARIES} base config icinga remote)
|
||||
set_target_properties (
|
||||
livestatus PROPERTIES
|
||||
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
|
||||
DEFINE_SYMBOL I2_LIVESTATUS_BUILD
|
||||
FOLDER Components
|
||||
)
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#ifndef AGGREGATOR_H
|
||||
#define AGGREGATOR_H
|
||||
|
||||
#include "livestatus/i2-livestatus.hpp"
|
||||
#include "livestatus/table.hpp"
|
||||
#include "livestatus/filter.hpp"
|
||||
|
||||
@ -29,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class Aggregator : public Object
|
||||
class I2_LIVESTATUS_API Aggregator : public Object
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(Aggregator);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class AndFilter : public CombinerFilter
|
||||
class I2_LIVESTATUS_API AndFilter : public CombinerFilter
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(AndFilter);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class AttributeFilter : public Filter
|
||||
class I2_LIVESTATUS_API AttributeFilter : public Filter
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(AttributeFilter);
|
||||
|
@ -29,7 +29,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class AvgAggregator : public Aggregator
|
||||
class I2_LIVESTATUS_API AvgAggregator : public Aggregator
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(AvgAggregator);
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef COLUMN_H
|
||||
#define COLUMN_H
|
||||
|
||||
#include "livestatus/i2-livestatus.hpp"
|
||||
#include "livestatus/i2-livestatus.hpp"
|
||||
#include "base/value.hpp"
|
||||
#include <boost/function.hpp>
|
||||
|
||||
@ -34,7 +36,7 @@ enum LivestatusGroupByType {
|
||||
LivestatusGroupByServiceGroup
|
||||
};
|
||||
|
||||
class Column
|
||||
class I2_LIVESTATUS_API Column
|
||||
{
|
||||
public:
|
||||
typedef boost::function<Value (const Value&)> ValueAccessor;
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class CombinerFilter : public Filter
|
||||
class I2_LIVESTATUS_API CombinerFilter : public Filter
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(CombinerFilter);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class CommandsTable : public Table
|
||||
class I2_LIVESTATUS_API CommandsTable : public Table
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(CommandsTable);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class CommentsTable : public Table
|
||||
class I2_LIVESTATUS_API CommentsTable : public Table
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(CommentsTable);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class ContactGroupsTable : public Table
|
||||
class I2_LIVESTATUS_API ContactGroupsTable : public Table
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(ContactGroupsTable);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class ContactsTable : public Table
|
||||
class I2_LIVESTATUS_API ContactsTable : public Table
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(ContactsTable);
|
||||
|
@ -29,7 +29,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class CountAggregator : public Aggregator
|
||||
class I2_LIVESTATUS_API CountAggregator : public Aggregator
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(CountAggregator);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class DowntimesTable : public Table
|
||||
class I2_LIVESTATUS_API DowntimesTable : public Table
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(DowntimesTable);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class EndpointsTable : public Table
|
||||
class I2_LIVESTATUS_API EndpointsTable : public Table
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(EndpointsTable);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#ifndef FILTER_H
|
||||
#define FILTER_H
|
||||
|
||||
#include "livestatus/i2-livestatus.hpp"
|
||||
#include "livestatus/table.hpp"
|
||||
|
||||
namespace icinga
|
||||
@ -28,7 +29,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class Filter : public Object
|
||||
class I2_LIVESTATUS_API Filter : public Object
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(Filter);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class HistoryTable : public Table
|
||||
class I2_LIVESTATUS_API HistoryTable : public Table
|
||||
{
|
||||
public:
|
||||
virtual void UpdateLogEntries(const Dictionary::Ptr& bag, int line_count, int lineno, const AddRowFunction& addRowFn);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class HostGroupsTable : public Table
|
||||
class I2_LIVESTATUS_API HostGroupsTable : public Table
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(HostGroupsTable);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class HostsTable : public Table
|
||||
class I2_LIVESTATUS_API HostsTable : public Table
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(HostsTable);
|
||||
|
37
lib/livestatus/i2-livestatus.hpp
Normal file
37
lib/livestatus/i2-livestatus.hpp
Normal file
@ -0,0 +1,37 @@
|
||||
/******************************************************************************
|
||||
* Icinga 2 *
|
||||
* Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org) *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation; either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the Free Software Foundation *
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef I2LIVESTATUS_H
|
||||
#define I2LIVESTATUS_H
|
||||
|
||||
/**
|
||||
* @defgroup icinga Livestatus
|
||||
*
|
||||
* The Livestatus library implements the Livestatus protocol for Icinga.
|
||||
*/
|
||||
|
||||
#include "base/i2-base.hpp"
|
||||
|
||||
#ifdef I2_LIVESTATUS_BUILD
|
||||
# define I2_LIVESTATUS_API I2_EXPORT
|
||||
#else /* I2_LIVESTATUS_BUILD */
|
||||
# define I2_LIVESTATUS_API I2_IMPORT
|
||||
#endif /* I2_LIVESTATUS_BUILD */
|
||||
|
||||
#endif /* I2LIVESTATUS_H */
|
@ -29,7 +29,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class InvAvgAggregator : public Aggregator
|
||||
class I2_LIVESTATUS_API InvAvgAggregator : public Aggregator
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(InvAvgAggregator);
|
||||
|
@ -29,7 +29,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class InvSumAggregator : public Aggregator
|
||||
class I2_LIVESTATUS_API InvSumAggregator : public Aggregator
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(InvSumAggregator);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#ifndef LIVESTATUSLISTENER_H
|
||||
#define LIVESTATUSLISTENER_H
|
||||
|
||||
#include "livestatus/i2-livestatus.hpp"
|
||||
#include "livestatus/livestatuslistener.thpp"
|
||||
#include "livestatus/livestatusquery.hpp"
|
||||
#include "base/socket.hpp"
|
||||
@ -33,7 +34,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class LivestatusListener : public ObjectImpl<LivestatusListener>
|
||||
class I2_LIVESTATUS_API LivestatusListener : public ObjectImpl<LivestatusListener>
|
||||
{
|
||||
public:
|
||||
DECLARE_OBJECT(LivestatusListener);
|
||||
|
@ -60,9 +60,8 @@ enum LogEntryClass {
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class LivestatusLogUtility
|
||||
class I2_LIVESTATUS_API 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);
|
||||
|
@ -55,7 +55,7 @@ struct LivestatusScriptFrame
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class LivestatusQuery : public Object
|
||||
class I2_LIVESTATUS_API LivestatusQuery : public Object
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(LivestatusQuery);
|
||||
|
@ -31,7 +31,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class LogTable : public HistoryTable
|
||||
class I2_LIVESTATUS_API LogTable : public HistoryTable
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(LogTable);
|
||||
|
@ -29,7 +29,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class MaxAggregator : public Aggregator
|
||||
class I2_LIVESTATUS_API MaxAggregator : public Aggregator
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(MaxAggregator);
|
||||
|
@ -29,7 +29,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class MinAggregator : public Aggregator
|
||||
class I2_LIVESTATUS_API MinAggregator : public Aggregator
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(MinAggregator);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class NegateFilter : public Filter
|
||||
class I2_LIVESTATUS_API NegateFilter : public Filter
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(NegateFilter);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class OrFilter : public CombinerFilter
|
||||
class I2_LIVESTATUS_API OrFilter : public CombinerFilter
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(OrFilter);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class ServiceGroupsTable : public Table
|
||||
class I2_LIVESTATUS_API ServiceGroupsTable : public Table
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(ServiceGroupsTable);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class ServicesTable : public Table
|
||||
class I2_LIVESTATUS_API ServicesTable : public Table
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(ServicesTable);
|
||||
|
@ -32,7 +32,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class StateHistTable : public HistoryTable
|
||||
class I2_LIVESTATUS_API StateHistTable : public HistoryTable
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(StateHistTable);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class StatusTable : public Table
|
||||
class I2_LIVESTATUS_API StatusTable : public Table
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(StatusTable);
|
||||
|
@ -29,7 +29,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class StdAggregator : public Aggregator
|
||||
class I2_LIVESTATUS_API StdAggregator : public Aggregator
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(StdAggregator);
|
||||
|
@ -29,7 +29,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class SumAggregator : public Aggregator
|
||||
class I2_LIVESTATUS_API SumAggregator : public Aggregator
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(SumAggregator);
|
||||
|
@ -43,7 +43,7 @@ class Filter;
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class Table : public Object
|
||||
class I2_LIVESTATUS_API Table : public Object
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(Table);
|
||||
|
@ -30,7 +30,7 @@ namespace icinga
|
||||
/**
|
||||
* @ingroup livestatus
|
||||
*/
|
||||
class TimePeriodsTable : public Table
|
||||
class I2_LIVESTATUS_API TimePeriodsTable : public Table
|
||||
{
|
||||
public:
|
||||
DECLARE_PTR_TYPEDEFS(TimePeriodsTable);
|
||||
|
Loading…
x
Reference in New Issue
Block a user