Set up file conditions for os-loganalyze

This will enable us to use different filters/views for various files.

By explicitly setting txt+html, we allow other formats (such as images
and tarballs) to be streamed from swift and hence downloaded.

Change-Id: I9cda9c05f42c5658d1c1dde8aa2efbc0abcc48a2
This commit is contained in:
Joshua Hesketh 2015-08-04 11:46:38 +10:00
parent 61096c4a08
commit 5b73b4d2a9
3 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,16 @@
conditions:
- filename_pattern: ^.*\.txt\.gz$
filter: SevFilter
view: HTMLView
- filename_pattern: ^.*\.txt?$
filter: SevFilter
view: HTMLView
- filename_pattern: ^.*\.html\.gz$
filter: SevFilter
view: HTMLView
- filename_pattern: ^.*\.html?$
filter: SevFilter
view: HTMLView
- filename_pattern: ^.*$
filter: NoFilter
view: PassthroughView

View File

@ -177,6 +177,15 @@ class openstackci::logserver (
require => File['/etc/os_loganalyze'],
}
file { '/etc/os_loganalyze/file_conditions.yaml':
ensure => present,
owner => 'root',
group => 'www-data',
mode => '0440',
source => 'puppet:///modules/openstackci/os-loganalyze-file_conditions.yaml',
require => File['/etc/os_loganalyze'],
}
vcsrepo { '/opt/devstack-gate':
ensure => latest,
provider => git,

View File

@ -1,3 +1,8 @@
[general]
filter = SevFilter
view = HTMLView
file_conditions = /etc/os_loganalyze/file_conditions.yaml
<% if @swift_authurl != "" -%>
[swift]
authurl=<%= @swift_authurl %>