Adding pages inside Cacti
nov 21st, 2007 by Prune
When you are talking of monitoring, you often end with many tools, like Nagios, Cacti or others. But none of them are interconnected.
There was a solution to add external pages inside Cacti, bythe aim of the Links plugin.
While migrating to Cacti 0.8.7a, I checked back the validity of this plugin with the new version. I ended with the new version : SuperLinks
This version adds many new things, like many tabs, authorization management and such.
As for now, the only problem I got is an error with the generation of the tab icon. I emailed the author about that.
On the same website, you will find the Weathermap plugins, which I still have to test with Cacti 0.8.7a.
[EDIT]
I got an answer from the author, and the bug is a known bug. It seems to be dependent of your config. You only have to add one line to the code. In the meantime, I also found a limitation in the URL size you can add, which wad 60. I set it to 512.
Here is the diff of the file :
diff -bur superlinks-old/superlinks-mgmt.php superlinks/superlinks-mgmt.php --- superlinks-old/superlinks-mgmt.php Fri Nov 9 16:52:19 2007 +++ superlinks/superlinks-mgmt.php Wed Nov 21 16:25:01 2007 @@ -561,6 +561,7 @@ { $orig_cwd = getcwd(); chdir(dirname(__FILE__)); + putenv('GDFONTPATH=' . realpath('.')); $possibles = array( array("DejaVuSans-Bold.ttf",10,false), @@ -646,7 +647,7 @@ "style" => array("friendly_name" => "Style", "method" => "drop_array", "array" => array( "TAB" => "Top Tab", "CONSOLE"=>"Console Menu", "FRONT" => "Front Cacti Page"), "description" => "Where should this page appear?", "value"=>$data[0]['style'] ) , "title" => array("friendly_name" => "Tab/Menu Name", "method" => "textbox", "max_length"=>20, "description"=>"The text that will appear in the tab or menu. This should be all lower-case for tabs, to match Cacti tabs", "value"=>$data[0]['title']) , - "filename" => array("friendly_name" => "Content File/URL", "method" => "textbox", "max_length"=>60,"description"=>"The file that contains the content for this page. This can be a file in the content/ directory or a valid URL.", "value"=>$data[0]['contentfile']) + "filename" => array("friendly_name" => "Content File/URL", "method" => "textbox", "max_length"=>512,"description"=>"The file that contains the content for this page. This can be a file in the content/ directory or a valid URL.", "value"=>$data[0]['contentfile']) ); html_start_box("<strong>Edit SuperLinks Page $id: ".$data[0]['title']."</strong>", "98%", $colors["header"], "3", "center", "");