_Dmitry_
Joined: 18 Sep 2007 Posts: 26 Location: DE
|
Posted: Fri Nov 16, 2007 4:58 am Post subject: Small Visual Fix for CACTI in "View Cacti Log File" |
|
|
Hello,
I've found small Visual BUG in CACTI.
If you go to CACTI Console -> System Utilities -> View Cacti Log File and you have "POLLER: Poller[0] WARNING: Poller Output Table not Empty. Potential Data Source Issues for Data Sources:" with more then 1 DS or Host then only the first one will receive HTTP link direct to Host/Datasolurce. All other DS/Hosts won't be parsed.
With the following fix all DS/Hosts in the Poller Warning receive HTTP link.
| Code: |
--- utilities.php.old 2007-11-15 13:52:57.000000000 +0100
+++ utilities.php 2007-11-16 10:49:38.579430377 +0100
@@ -775,23 +775,23 @@
if ((!$host_start) && (!$ds_start)) {
$new_item = $item;
}else{
- if ($host_start) {
+ while ($host_start) {
$host_end = strpos($item, "]", $host_start);
$host_id = substr($item, $host_start+5, $host_end-($host_start+5));
$new_item = $new_item . substr($item, 0, $host_start + 5) . "<a href='host.php?action=edit&id=" . $host_id . "'>" . substr($item, $host_start + 5, $host_end-($host_start + 5)) . "</a>";
$item = substr($item, $host_end);
+ $host_start = strpos($item, "Host[");
}
$ds_start = strpos($item, "DS[");
- if ($ds_start) {
+ while($ds_start) {
$ds_end = strpos($item, "]", $ds_start);
$ds_id = substr($item, $ds_start+3, $ds_end-($ds_start+3));
$new_item = $new_item . substr($item, 0, $ds_start + 3) . "<a href='data_sources.php?action=ds_edit&id=" . $ds_id . "'>" . substr($item, $ds_start + 3, $ds_end-($ds_start + 3)) . "</a>";
$item = substr($item, $ds_end);
- $new_item = $new_item . $item;
- }else{
- $new_item = $new_item . $item;
+ $ds_start = strpos($item, "DS[");
}
+ $new_item = $new_item . $item;
}
/* determine if we are to display the line */
|
|
|