@@ -10,7 +10,7 @@ def __init__(self, config):
1010
1111 self .targets = [
1212 {
13- 'match' : prefix + '(?P<server>[^\.]+)\.(?P<collectd_plugin>cpu)\. (?P<core>[^\.]+)\.cpu\. (?P<type>[^\.]+)$' ,
13+ 'match' : prefix + '(?P<server>[^\.]+)\.(?P<collectd_plugin>cpu)[\-\.] (?P<core>[^\.]+)\.cpu[\-\.] (?P<type>[^\.]+)$' ,
1414 'target_type' : 'gauge_pct' ,
1515 'tags' : {
1616 'unit' : 'Jiff' ,
@@ -23,28 +23,116 @@ def __init__(self, config):
2323 'configure' : lambda self , target : self .fix_load (target )
2424 },
2525 {
26- 'match' : prefix + '(?P<server>[^\.]+)\.interface\. (?P<device>[^\.]+)\.if_(?P<wt>[^\.]+)\.(?P<dir>[^\.]+)$' ,
26+ 'match' : prefix + '(?P<server>[^\.]+)\.interface[\-\.] (?P<device>[^\.]+)\.if_(?P<wt>[^\.]+)\.(?P<dir>[^\.]+)$' ,
2727 'target_type' : 'counter' ,
2828 'tags' : {'collectd_plugin' : 'network' },
2929 'configure' : lambda self , target : self .fix_network (target )
3030 },
3131 {
32- 'match' : prefix + '(?P<server>[^\.]+)\.memory\.memory\. (?P<type>[^\.]+)$' ,
32+ 'match' : prefix + '(?P<server>[^\.]+)\.memory\.memory[\-\.] (?P<type>[^\.]+)$' ,
3333 'target_type' : 'gauge' ,
3434 'tags' : {
3535 'unit' : 'B' ,
3636 'where' : 'system_memory'
3737 }
3838 },
3939 {
40- 'match' : prefix + '(?P<server>[^\.]+)\.df\. (?P<mountpoint>[^\.]+)\.df_complex\. (?P<type>[^\.]+)$' ,
40+ 'match' : prefix + '(?P<server>[^\.]+)\.df[\-\.] (?P<mountpoint>[^\.]+)\.df_complex[\-\.] (?P<type>[^\.]+)$' ,
4141 'target_type' : 'gauge' ,
4242 'tags' : {'unit' : 'B' }
4343 },
4444 {
45- 'match' : prefix + '(?P<server>[^\.]+)\.(?P<collectd_plugin>disk)\. (?P<device>[^\.]+)\.disk_(?P<wt>[^\.]+)\.(?P<operation>[^\.]+)$' ,
45+ 'match' : prefix + '(?P<server>[^\.]+)\.(?P<collectd_plugin>disk)[\-\.] (?P<device>[^\.]+)\.disk_(?P<wt>[^\.]+)\.(?P<operation>[^\.]+)$' ,
4646 'configure' : lambda self , target : self .fix_disk (target )
47- }
47+ },
48+ {
49+ 'match' : prefix + '(?P<server>.+?)\.(?P<collectd_plugin>irq)\.irq[\-\.](?P<wt>.*)$' ,
50+ 'target_type' : 'counter' ,
51+ 'tags' : {
52+ 'unit' : 'calls' ,
53+ 'what' : 'irq_calls'
54+ }
55+
56+ },
57+ {
58+ 'match' : prefix + '(?P<server>.+?)\.(?P<collectd_plugin>processes)\.ps_state[\-\.](?P<state>.*)$' ,
59+ 'target_type' : 'gauge' ,
60+ 'tags' : {
61+ 'unit' : 'procs' ,
62+ 'what' : 'procs_in_state'
63+ }
64+
65+ },
66+ {
67+ 'match' : prefix + '(?P<server>.+?)\.(?P<collectd_plugin>processes)\.(?P<value>fork_rate)$' ,
68+ 'target_type' : 'counter' ,
69+ 'tags' : {
70+ 'unit' : 'procs' ,
71+ 'what' : 'fork_rate'
72+ }
73+
74+ },
75+ {
76+ 'match' : prefix + '(?P<server>[^\.]+)\.swap\.swap[\-\.](?P<type>[^\.]+)$' ,
77+ 'target_type' : 'gauge' ,
78+ 'tags' : {
79+ 'unit' : 'B' ,
80+ 'where' : 'swap'
81+ }
82+ },
83+ {
84+ 'match' : prefix + '(?P<server>[^\.]+)\.swap\.swap_io[\-\.](?P<dir>[^\.]+)$' ,
85+ 'target_type' : 'counter' ,
86+ 'tags' : {
87+ 'unit' : 'B' ,
88+ 'where' : 'swap_io'
89+ }
90+ },
91+ {
92+ 'match' : prefix + '(?P<server>.+?)\.(?P<collectd_plugin>tcpconns)[\-\.](?P<port>\d+)[\-\.]local\.tcp_connections[\-\.](?P<state>.*)$' ,
93+ 'target_type' : 'gauge' ,
94+ 'tags' : {
95+ 'unit' : 'connections' ,
96+ 'what' : 'tcp_connections_in_state'
97+ }
98+
99+ },
100+ {
101+ 'match' : prefix + '(?P<server>.+?)\.(?P<collectd_plugin>contextswitch)\.(?P<value>contextswitch)$' ,
102+ 'target_type' : 'counter' ,
103+ 'tags' : {
104+ 'unit' : 'fork/s' ,
105+ 'what' : 'contextswitch'
106+ }
107+
108+ },
109+ {
110+ 'match' : prefix + '(?P<server>.+?)\.(?P<collectd_plugin>users)\.(?P<value>users)$' ,
111+ 'target_type' : 'gauge' ,
112+ 'tags' : {
113+ 'unit' : 'users' ,
114+ 'what' : 'users_logged'
115+ }
116+
117+ },
118+ {
119+ 'match' : prefix + '(?P<server>.+?)\.(?P<collectd_plugin>entropy)\.(?P<value>entropy)$' ,
120+ 'target_type' : 'gauge' ,
121+ 'tags' : {
122+ 'unit' : 'bits' ,
123+ 'what' : 'entropy'
124+ }
125+
126+ },
127+ {
128+ 'match' : prefix + '(?P<server>.+?)\.(?P<collectd_plugin>conntrack)\.(?P<value>conntrack)$' ,
129+ 'target_type' : 'gauge' ,
130+ 'tags' : {
131+ 'unit' : 'entries' ,
132+ 'what' : 'conntrack'
133+ }
134+
135+ },
48136 ]
49137 super (CollectdPlugin , self ).__init__ (config )
50138
0 commit comments