3
# -*- coding: utf-8 -*-
5
# Copyright (C) 2009-2012:
6
# Gabes Jean, naparuba@gmail.com
7
# Gerhard Lausser, Gerhard.Lausser@consol.de
8
# Gregory Starck, g.starck@gmail.com
9
# Hartmut Goebel, h.goebel@goebel-consult.de
11
# This file is part of Shinken.
13
# Shinken is free software: you can redistribute it and/or modify
14
# it under the terms of the GNU Affero General Public License as published by
15
# the Free Software Foundation, either version 3 of the License, or
16
# (at your option) any later version.
18
# Shinken is distributed in the hope that it will be useful,
19
# but WITHOUT ANY WARRANTY; without even the implied warranty of
20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
# GNU Affero General Public License for more details.
23
# You should have received a copy of the GNU Affero General Public License
24
# along with Shinken. If not, see <http://www.gnu.org/licenses/>.
27
This class store log broks in a black hole
28
It is one possibility (!) for an exchangeable storage for log broks
31
from shinken.log import logger
32
from shinken.basemodule import BaseModule
35
'daemons': ['livestatus'],
36
'type': 'logstore_null',
38
'phases': ['running'],
42
# called by the plugin manager
43
def get_instance(plugin):
44
logger.info("[Logstore Null] Get an LogStore Null module for plugin %s" % plugin.get_name())
45
instance = LiveStatusLogStoreNull(plugin)
49
class LiveStatusLogStoreNull(BaseModule):
51
def __init__(self, modconf):
52
BaseModule.__init__(self, modconf)
62
logger.info("[Logstore Null] Open LiveStatusLogStoreNull ok")
70
def commit_and_rotate_log_db(self):
73
def manage_log_brok(self, b):
74
# log brok successfully stored in the black hole
77
def add_filter(self, operator, attribute, reference):
80
def add_filter_and(self, andnum):
83
def add_filter_or(self, ornum):
86
def add_filter_not(self):
89
def get_live_data_log(self):
90
"""Like get_live_data, but for log objects"""