vigiboard / vigiboard / config / app_cfg.py @ 858d88aa
History | View | Annotate | Download (2.77 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.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 |
|
35 |
# Configure the authentication backend
|
36 |
base_config.auth_backend = 'sqlalchemy'
|
37 |
|
38 |
# 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 |
|
50 |
|
51 |
##################################
|
52 |
# Settings specific to Vigiboard #
|
53 |
##################################
|
54 |
|
55 |
# Vigiboard version
|
56 |
base_config['vigilo_version'] = u'2.0-pre0.1' |
57 |
|
58 |
# Configuration des liens
|
59 |
# Les elements suivants peuvent etre utilises dans la chaine de formatage :
|
60 |
# - idcorrevent : identifiant de l'aggregat (alerte correlee)
|
61 |
# - host : le nom de l'hote concerne par l'alerte
|
62 |
# - service : le nom du service concerne par l'alerte
|
63 |
# - message : le message transmis par Nagios dans l'alerte
|
64 |
base_config['vigiboard_links.eventdetails'] = {
|
65 |
'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 |
'documentation': ['Documentation', 'http://doc.example.com/?q=%(message)s'], |
70 |
} |
71 |
|
72 |
# 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 |
# Plugins to use
|
80 |
base_config['vigiboard_plugins'] = [
|
81 |
['shn', 'PluginSHN'], |
82 |
] |
83 |
|
84 |
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 |
) |
91 |
|