vigiboard / vigiboard / config / app_cfg.py @ 6f89d8f8
History | View | Annotate | Download (2.7 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 |
# Configure the authentication backend
|
27 |
base_config.auth_backend = 'sqlalchemy'
|
28 |
|
29 |
# override this if you would like to provide a different who plugin for
|
30 |
# managing login and logout of your application
|
31 |
base_config.sa_auth.form_plugin = None
|
32 |
|
33 |
# You may optionally define a page where you want users to be redirected to
|
34 |
# on login:
|
35 |
base_config.sa_auth.post_login_url = '/post_login'
|
36 |
|
37 |
# You may optionally define a page where you want users to be redirected to
|
38 |
# on logout:
|
39 |
base_config.sa_auth.post_logout_url = '/post_logout'
|
40 |
|
41 |
|
42 |
##################################
|
43 |
# Settings specific to Vigiboard #
|
44 |
##################################
|
45 |
|
46 |
# Configuration des liens
|
47 |
# Les elements suivants peuvent etre utilises dans la chaine de formatage :
|
48 |
# - %(idcorrevent)d : identifiant de l'aggregat (alerte correlee)
|
49 |
# - %(host)s : le nom de l'hote concerne par l'alerte
|
50 |
# - %(service)s : le nom du service concerne par l'alerte
|
51 |
# - %(message) : le message transmis par Nagios dans l'alerte
|
52 |
#
|
53 |
# Permet de satisfaire l'exigence VIGILO_EXIG_VIGILO_BAC_0130.
|
54 |
base_config['vigiboard_links.eventdetails'] = {
|
55 |
'nagios': [u'Nagios host details', '/nagios/%(host)s/cgi-bin/status.cgi?host=%(host)s'], |
56 |
'metrology': [u'Metrology details', 'http://example.com/?host=%(host)s'], |
57 |
'security': [u'Security details', 'http://security.example.com/?host=%(host)s'], |
58 |
'inventory': [u'Inventory', 'http://cmdb.example.com/?host=%(host)s'], |
59 |
'documentation': [u'Documentation', 'http://doc.example.com/?q=%(message)s'], |
60 |
} |
61 |
|
62 |
# URL des tickets, possibilités:
|
63 |
# - %(idcorrevent)d
|
64 |
# - %(host)s
|
65 |
# - %(service)s
|
66 |
# - %(tt)s
|
67 |
base_config['vigiboard_links.tt'] = 'http://bugs.example.com/?ticket=%(tt)s' |
68 |
|
69 |
# Plugins to use
|
70 |
base_config['vigiboard_plugins'] = [
|
71 |
('details', 'PluginDetails'), |
72 |
('date', 'PluginDate'), |
73 |
('priority', 'PluginPriority'), |
74 |
('occurrences', 'PluginOccurrences'), |
75 |
('hostname', 'PluginHostname'), |
76 |
('servicename', 'PluginServicename'), |
77 |
('output', 'PluginOutput'), |
78 |
('hls', 'PluginHLS'), |
79 |
('status', 'PluginStatus'), |
80 |
] |
81 |
|