Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

vigiboard / vigiboard / config / app_cfg.py @ 6e76504a

History | View | Annotate | Download (2.28 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': [
40
        'Nagios host details',
41
        '/nagios/%(host)s/cgi-bin/status.cgi?host=%(host)s'
42
    ],
43
    'metrology': [
44
        'Metrology details',
45
        'http://example.com/?host=%(host)s'
46
    ],
47
    'security': [
48
        'Security details',
49
        'http://security.example.com/?host=%(host)s'
50
    ],
51
    'inventory': [
52
        'Inventory',
53
        'http://cmdb.example.com/?host=%(host)s'
54
    ],
55
    'documentation': [
56
        'Documentation',
57
        'http://doc.example.com/?q=%(message)s'
58
    ],
59
}
60

    
61
# URL des tickets, possibilités:
62
# - %(idcorrevent)d
63
# - %(host)s
64
# - %(service)s
65
# - %(tt)s
66
base_config['vigiboard_links.tt'] = 'http://bugs.example.com/?ticket=%(tt)s'
67

    
68
# Plugins to use
69
base_config['vigiboard_plugins'] = [
70
    ('details', 'PluginDetails'),
71
    ('date', 'PluginDate'),
72
    ('priority', 'PluginPriority'),
73
    ('occurrences', 'PluginOccurrences'),
74
    ('hostname', 'PluginHostname'),
75
    ('servicename', 'PluginServicename'),
76
    ('output', 'PluginOutput'),
77
    ('hls', 'PluginHLS'),
78
    ('status', 'PluginStatus'),
79
]