hrdevice processors cleanup (strip vendor id, strip (TM) and (R))

git-svn-id: http://www.observium.org/svn/observer/trunk@1011 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-03-12 02:35:38 +00:00
parent b230457eb7
commit 950cf4e7a4

View File

@ -17,6 +17,15 @@
$descr = $entry['hrDeviceDescr'];
$descr_array = explode(":",$entry['hrDeviceDescr']);
if($descr_array['1']) { $descr = $descr_array['1']; } else { $descr = $descr_array['0']; }
$descr = str_replace("CPU ", "", $descr);
$descr = str_replace("(TM)", "", $descr);
$descr = str_replace("(R)", "", $descr);
$old_rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("hrProcessor-" . $index . ".rrd");
$new_rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("processor-hr-" . $index . ".rrd");