vigiboard / vigiboard / config / app_cfg.py @ f744bc14
History | View | Annotate | Download (3.12 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)d : identifiant de l'aggregat (alerte correlee)
|
61 |
# - %(host)s : le nom de l'hote concerne par l'alerte
|
62 |
# - %(service)s : le nom du service concerne par l'alerte
|
63 |
# - %(message) : le message transmis par Nagios dans l'alerte
|
64 |
#
|
65 |
# Permet de satisfaire l'exigence VIGILO_EXIG_VIGILO_BAC_0130.
|
66 |
base_config['vigiboard_links.eventdetails'] = {
|
67 |
'nagios': ['Nagios host details', 'http://example1.com/%(idcorrevent)d'], |
68 |
'metrology': ['Metrology details', 'http://example2.com/%(idcorrevent)d'], |
69 |
'security': ['Security details', 'http://example3.com/%(idcorrevent)d'], |
70 |
'servicetype': ['Service Type', 'http://example4.com/%(idcorrevent)d'], |
71 |
'documentation': ['Documentation', 'http://doc.example.com/?q=%(message)s'], |
72 |
} |
73 |
|
74 |
# URL des tickets, possibilités:
|
75 |
# - %(idcorrevent)d
|
76 |
# - %(host)s
|
77 |
# - %(service)s
|
78 |
# - %(tt)s
|
79 |
base_config['vigiboard_links.tt'] = 'http://example4.com/%(idcorrevent)d/%(tt)s' |
80 |
|
81 |
# Plugins to use
|
82 |
base_config['vigiboard_plugins'] = [
|
83 |
('details', 'PluginDetails'), |
84 |
('date', 'PluginDate'), |
85 |
('priority', 'PluginPriority'), |
86 |
('occurrences', 'PluginOccurrences'), |
87 |
('hostname', 'PluginHostname'), |
88 |
('servicename', 'PluginServicename'), |
89 |
('output', 'PluginOutput'), |
90 |
('hls', 'PluginHLS'), |
91 |
('status', 'PluginStatus'), |
92 |
] |
93 |
|
94 |
base_config['vigiboard_refresh_times'] = (
|
95 |
(0, l_('Never')), |
96 |
(30, l_('30 seconds')), |
97 |
(60, l_('1 minute')), |
98 |
(300, l_('5 minutes')), |
99 |
(600, l_('10 minutes')), |
100 |
) |
101 |
|