HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Integrate munin into ISPConfig3 (http://www.howtoforge.com/forums/showthread.php?t=55677)

osterhase 8th January 2012 19:55

Integrate munin into ISPConfig3
 
Hi there,

I'm running munin to mointor some servers. I would like to integrate munin into ispconfig. I would like to add a Link in "Tools". After clicking this link the munin-page should be shown within the ispconfig-frame.

Is this possible and how can this be achieved? I would appreciate any help.

Best regards
osterhase

till 9th January 2012 09:38

Add a file in the menu directory /usr/local/ispconfig/interface/web/tools/lib/menu.d/

Example:

create a new file like google.menu.php with this content:

Code:

<?php


// Menu

if($app->auth->is_admin()) {

$items = array();

$items[] = array( 'title'        => 'Google',
                                  'target'        => 'content',
                                  'link'        => 'http://www.google.com');


$module['nav'][] = array(        'title'        => 'Import',
                                                        'open'        => 1,
                                                        'items'        => $items);

unset($items);
}

?>


osterhase 9th January 2012 16:15

Thanks Till - that was what I was looking for.

From there I decided to integrate Munin into the "Monitoring" tab which seems to fit better for a Server-Monitoring-Tool. So the path would be rather "/usr/local/ispconfig/interface/web/monitor/lib/module.conf.php".

There I had the option to integrate the main Munin-Page under the menu-point "All Servers" or to kick the user directly to the selected server:

Code:

/*
 * Clear and set the Navigation-Items
 */
unset($items);

$items[] = array( 'title'        => "Show CPU info",
        'target'        => 'content',
        'link'        => 'monitor/show_data.php?type=cpu_info',
        'html_id' => 'cpu_info');

/* Munin added admin_nw */                                 
$items[] = array( 'title'        => 'Munin',
                                  'target'        => 'content',
                                  'link'        => '/munin/example.com/' .$_SESSION['monitor']['server_name']. '/index.html');
/* End admin_nw */               
               
$module["nav"][] = array(        'title'        => 'Hardware-Information',
        'open'        => 1,
        'items'        => $items);

/*

The bold part of the code is my try to let the user select the server and then come directly to the server. Obviously I'm just running into the first server of the array. Is there an easy way to adapt changes in the Dropdown-Menu to the link?

I'm not quite sure if the next question is in the right spot: Due to the fact that munin is working with relative paths no graphs are shown in the content-view of ispconfig because they try to be loaded from the ispconfig-Panel Domain which won't work. I have a couple of ideas to solve this but all of them are connected with a lot of hard coding. Any suggestions what the best way would be to fix this?

Best regards
osterhase

osterhase 20th January 2012 14:37

...ok. Too stupid question.

So I'm asking for a workaround. Is it possible to open the content in a new tab like "_blank"?

I'm thankful for your help.


All times are GMT +2. The time now is 03:27.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.