3802768b010bf03bdc50e7407def1d50b42e04a7
[barometer.git] / docker / ansible / roles / config_files / templates / experimental / logparser.conf.j2
1 # Copyright 2019 OPNFV
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 LoadPlugin logparser
16
17 <Plugin logparser>
18   <Logfile "/var/log/syslog">
19     FirstFullRead false
20     <Message "pcie_errors">
21       DefaultType "pcie_error"
22       DefaultSeverity "warning"
23       <Match "aer error">
24         Regex "AER:.*error received"
25         SubmatchIdx -1
26       </Match>
27       <Match "incident time">
28         Regex "(... .. ..:..:..) .* pcieport.*AER"
29         SubmatchIdx 1
30         IsMandatory false
31       </Match>
32       <Match "root port">
33         Regex "pcieport (.*): AER:"
34         SubmatchIdx 1
35         IsMandatory true
36       </Match>
37       <Match "device">
38         PluginInstance true
39         Regex " ([0-9a-fA-F:\\.]*): PCIe Bus Error"
40         SubmatchIdx 1
41         IsMandatory false
42       </Match>
43       <Match "severity_mandatory">
44         Regex "severity="
45         SubMatchIdx -1
46       </Match>
47       <Match "nonfatal">
48         Regex "severity=.*\\([nN]on-[fF]atal"
49         TypeInstance "non_fatal"
50         IsMandatory false
51       </Match>
52       <Match "fatal">
53         Regex "severity=.*\\([fF]atal"
54         Severity "failure"
55         TypeInstance "fatal"
56         IsMandatory false
57       </Match>
58       <Match "corrected">
59         Regex "severity=Corrected"
60         TypeInstance "correctable"
61         IsMandatory false
62       </Match>
63       <Match "error type">
64         Regex "type=(.*),"
65         SubmatchIdx 1
66         IsMandatory false
67       </Match>
68      <Match "id">
69         Regex ", id=(.*)"
70         SubmatchIdx 1
71       </Match>
72     </Message>
73   </Logfile>
74 </Plugin>