Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

vigiboard / vigiboard / config / app_cfg.py @ 80e68d9c

History | View | Annotate | Download (2.27 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

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

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

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

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

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

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