Skip to content

Commit c620308

Browse files
committed
Add configurable metric group
1 parent 5451447 commit c620308

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

apache_status/conf.d/apache_status.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@ modules {
55
param url {
66
value = "http://localhost/server-status?auto"
77
}
8+
89
param virtual_host {
910
value = "health"
1011
}
12+
13+
# Which metric group should these metrics be put into
14+
param metric_group {
15+
value = "apache"
16+
}
17+
1118
}
1219
}
1320

apache_status/python_modules/apache_status.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ def metric_init(params):
134134
print '[apache_status] Received the following parameters'
135135
print params
136136

137+
if "metric_group" not in params:
138+
params["metric_group"] = "apache"
139+
137140
Desc_Skel = {
138141
'name' : 'XXX',
139142
'call_back' : process_status_of,
@@ -143,7 +146,7 @@ def metric_init(params):
143146
'slope' : 'both',
144147
'format' : '%d',
145148
'description' : 'XXX',
146-
'groups' : 'apache',
149+
'groups' : params["metric_group"],
147150
}
148151

149152
if "refresh_rate" not in params:

0 commit comments

Comments
 (0)