Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

vigiboard / vigiboard / config / app_cfg.py @ 858d88aa

History | View | Annotate | Download (2.77 KB)

1 d3c47597 Francois POIROTTE
# -*- coding: utf-8 -*-
2 2e5394d8 Gabriel DE PERTHUIS
# vim: set fileencoding=utf-8 sw=4 ts=4 et :
3 57f7cb3f Gabriel DE PERTHUIS
"""
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 10848680 Francois POIROTTE
from vigilo.turbogears import VigiloAppConfig
18 398c727b Francois POIROTTE
from pylons.i18n import lazy_ugettext as l_
19 d3c47597 Francois POIROTTE
20 57f7cb3f Gabriel DE PERTHUIS
import vigiboard
21 d3c47597 Francois POIROTTE
from vigiboard.lib import app_globals, helpers
22 57f7cb3f Gabriel DE PERTHUIS
23 10848680 Francois POIROTTE
base_config = VigiloAppConfig('vigiboard')
24 57f7cb3f Gabriel DE PERTHUIS
base_config.renderers = []
25
26
base_config.package = vigiboard
27
28
#Set the default renderer
29
base_config.default_renderer = 'genshi'
30
base_config.renderers.append('genshi')
31
32
#Configure the base SQLALchemy Setup
33
base_config.use_sqlalchemy = True
34 5dbfa80d Francois POIROTTE
35 57f7cb3f Gabriel DE PERTHUIS
# Configure the authentication backend
36
base_config.auth_backend = 'sqlalchemy'
37 e6029893 Francois POIROTTE
38 57f7cb3f Gabriel DE PERTHUIS
# override this if you would like to provide a different who plugin for
39
# managing login and logout of your application
40
base_config.sa_auth.form_plugin = None
41
42
# You may optionally define a page where you want users to be redirected to
43
# on login:
44
base_config.sa_auth.post_login_url = '/post_login'
45
46
# You may optionally define a page where you want users to be redirected to
47
# on logout:
48
base_config.sa_auth.post_logout_url = '/post_logout'
49 d3c47597 Francois POIROTTE
50 0f56fff9 Francois POIROTTE
51
##################################
52
# Settings specific to Vigiboard #
53
##################################
54
55
# Vigiboard version
56 ef31cc13 Francois POIROTTE
base_config['vigilo_version'] = u'2.0-pre0.1'
57 0f56fff9 Francois POIROTTE
58 228aad1c Francois POIROTTE
# Configuration des liens
59 a2a22ade Francois POIROTTE
# Les elements suivants peuvent etre utilises dans la chaine de formatage :
60 a45763b4 Francois POIROTTE
# - idcorrevent : identifiant de l'aggregat (alerte correlee)
61 a2a22ade Francois POIROTTE
# - host : le nom de l'hote concerne par l'alerte
62
# - service : le nom du service concerne par l'alerte
63 08d86103 Francois POIROTTE
# - message : le message transmis par Nagios dans l'alerte
64 0f56fff9 Francois POIROTTE
base_config['vigiboard_links.eventdetails'] = {
65 a45763b4 Francois POIROTTE
    'nagios': ['Nagios host details', 'http://example1.com/%(idcorrevent)d'],
66
    'metrology': ['Metrology details', 'http://example2.com/%(idcorrevent)d'],
67
    'security': ['Security details', 'http://example3.com/%(idcorrevent)d'],
68
    'servicetype': ['Service Type', 'http://example4.com/%(idcorrevent)d'],
69 08d86103 Francois POIROTTE
    'documentation': ['Documentation', 'http://doc.example.com/?q=%(message)s'],
70 0f56fff9 Francois POIROTTE
}
71
72 228aad1c Francois POIROTTE
# URL des tickets, possibilités:
73
# - %(idaggregate)s
74
# - %(host)s
75
# - %(service)s
76
# - %(tt)s
77
base_config['vigiboard_links.tt'] = 'http://example4.com/%(idcorrevent)d/%(tt)s'
78
79 0f56fff9 Francois POIROTTE
# Plugins to use
80
base_config['vigiboard_plugins'] = [
81
    ['shn', 'PluginSHN'],
82
]
83
84 398c727b Francois POIROTTE
base_config['vigiboard_refresh_times'] = (
85
    (0, l_('Never')),
86
    (30, l_('30 seconds')),
87
    (60, l_('1 minute')),
88
    (300, l_('5 minutes')),
89
    (600, l_('10 minutes')),
90
)