2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# File 'manifests/plugin/logparser.pp', line 2
class collectd::plugin::logparser (
$ensure = 'present',
Array[Hash[String[1],Collectd::LOGPARSER::Logfile]] $logfile = [{
'/var/log/syslog' => {
'firstfullread' => false,
'message' => [
'pcie_errors' => {
'defaulttype' => 'pcie_error',
'defaultseverity' => 'warning',
'match' => [{
'aer error' => {
'regex' => 'AER:.*error received',
'submatchidx' => -1,
},
'incident time' => {
'regex' => '(... .. ..:..:..) .* pcieport.*AER',
'submatchidx' => 1,
'ismandatory' => false,
},
'root port' => {
'regex' => 'pcieport (.*): AER:',
'submatchidx' => 1,
'ismandatory' => true,
},
'device' => {
'plugininstance' => true,
'regex' => ' ([0-9a-fA-F:\\.]*): PCIe Bus Error',
'submatchidx' => 1,
'ismandatory' => false,
},
'severity_mandatory' => {
'regex' => 'severity=',
'submatchidx' => -1,
},
'nonfatal' => {
'regex' => 'severity=.*\\([nN]on-[fF]atal',
'typeinstance' => 'non_fatal',
'ismandatory' => false,
},
'fatal' => {
'regex' => 'severity=.*\\([fF]atal',
'severity' => 'failure',
'typeinstance' => 'fatal',
'ismandatory' => false,
},
'corrected' => {
'regex' => 'severity=Corrected',
'typeinstance' => 'correctable',
'ismandatory' => false,
},
'error type' => {
'regex' => 'type=(.*),',
'submatchidx' => 1,
'ismandatory' => false,
},
'id' => {
'regex' => ', id=(.*)',
'submatchidx' => 1,
},
}],
},
],
}
}]
) {
include collectd
collectd::plugin { 'logparser':
ensure => $ensure,
content => epp('collectd/plugin/logparser.conf.epp', {
'logfile' => $logfile,
}),
order => '06',
}
}
|