Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

vigiboard / vigiboard / config / app_cfg.py @ 2e753457

History | View | Annotate | Download (2.18 KB)

1
# -*- coding: utf-8 -*-
2
# vim: set fileencoding=utf-8 sw=4 ts=4 et :
3
"""
4
Global configuration file for TG2-specific settings in vigiboard.
5

6
This file complements development/deployment.ini.
7

8
Please note that **all the argument values are strings**. If you want to
9
convert them into boolean, for example, you should use the
10
:func:`paste.deploy.converters.asbool` function, as in::
11

12
    from paste.deploy.converters import asbool
13
    setting = asbool(global_conf.get('the_setting'))
14

15
"""
16

    
17
from vigilo.turbogears import VigiloAppConfig
18
from pylons.i18n import lazy_ugettext as l_
19

    
20
import vigiboard
21
from vigiboard.lib import app_globals, helpers
22

    
23
base_config = VigiloAppConfig('vigiboard')
24
base_config.package = vigiboard
25

    
26
##################################
27
# Settings specific to Vigiboard #
28
##################################
29

    
30
# Configuration des liens
31
# Les elements suivants peuvent etre utilises dans la chaine de formatage :
32
# - %(idcorrevent)d : identifiant de l'aggregat (alerte correlee)
33
# - %(host)s : le nom de l'hote concerne par l'alerte
34
# - %(service)s : le nom du service concerne par l'alerte
35
# - %(message) : le message transmis par Nagios dans l'alerte
36
#
37
# Permet de satisfaire l'exigence VIGILO_EXIG_VIGILO_BAC_0130.
38
base_config['vigiboard_links.eventdetails'] = {
39
    'nagios': [u'Nagios host details', '/nagios/%(host)s/cgi-bin/status.cgi?host=%(host)s'],
40
    'metrology': [u'Metrology details', 'http://example.com/?host=%(host)s'],
41
    'security': [u'Security details', 'http://security.example.com/?host=%(host)s'],
42
    'inventory': [u'Inventory', 'http://cmdb.example.com/?host=%(host)s'],
43
    'documentation': [u'Documentation', 'http://doc.example.com/?q=%(message)s'],
44
}
45

    
46
# URL des tickets, possibilités:
47
# - %(idcorrevent)d
48
# - %(host)s
49
# - %(service)s
50
# - %(tt)s
51
base_config['vigiboard_links.tt'] = 'http://bugs.example.com/?ticket=%(tt)s'
52

    
53
# Plugins to use
54
base_config['vigiboard_plugins'] = [
55
    ('details', 'PluginDetails'),
56
    ('date', 'PluginDate'),
57
    ('priority', 'PluginPriority'),
58
    ('occurrences', 'PluginOccurrences'),
59
    ('hostname', 'PluginHostname'),
60
    ('servicename', 'PluginServicename'),
61
    ('output', 'PluginOutput'),
62
    ('hls', 'PluginHLS'),
63
    ('status', 'PluginStatus'),
64
]