summaryrefslogtreecommitdiff
path: root/munin/ipmi_sensor_
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-05-15 11:46:40 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2006-05-15 11:46:40 +0000
commit798f280bf992f66266140f12476a7ce1b4535633 (patch)
tree0c78a4f5a2e949d24ad5bcafea2df863534f3723 /munin/ipmi_sensor_
parentf64c5ab2ee858226edfece88038f6e1fba2e26a3 (diff)
map - to M and + to P
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@84 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'munin/ipmi_sensor_')
-rwxr-xr-xmunin/ipmi_sensor_7
1 files changed, 5 insertions, 2 deletions
diff --git a/munin/ipmi_sensor_ b/munin/ipmi_sensor_
index a4866a2..bda92c8 100755
--- a/munin/ipmi_sensor_
+++ b/munin/ipmi_sensor_
@@ -24,10 +24,13 @@ def bail_out(m)
exit 1
end
def normalize_sensor(s)
- s.downcase.tr('^a-z0-9-', '_')
+ s = s.downcase
+ s = s.tr('-', 'M')
+ s = s.tr('+', 'P')
+ s.tr('^a-zA-Z0-9', '_')
end
def normalize_unit(s)
- s.downcase.tr('^a-z0-9-', '_')
+ s.downcase.tr('^a-z0-9', '_')
end
def get_sensor_data
data = []