Oh, thats great! Was thinking of adding the editor too. I was gonna start look in to if it was easy to modify the editor to look for the authed user level in observium instead of the ENABLED=false/true-thing. Like you will only be able to access the editor if you are logged in as a level 10 user, and it will only appear in the menu then.
To hide it in the menu is pretty easy, I think you only need to add a: if ($_SESSION['userlevel'] >= 10) to your code and the menu will only appear for admin users :)
/Markus
2014-07-16 8:14 GMT+02:00 Erwin Heringa erwin.heringa@sidn.nl:
Hi Markus,
I did pretty much the same thing and added a link to the editor as well.
function make_menu_item($url,$name,$icon)
{
$string='<li><a href="' . $url . '"><span class="menu-icon ' .
$icon . '"></span> ' . $name . ' </a></li>';
return $string;
}
$data = file_get_contents('/opt/observium/html/weathermap/editor.php');
if(strpos($data, 'ENABLED=true;') !== FALSE)
{
echo make_menu_item('/weathermap/editor.php','Weathermap
editor','oicon-globe-model');
}
else
{
echo make_menu_item('https://observium.sidn.nl','Weathermap
editor disabled by config!','oicon-globe-model');
}
Met vriendelijke groet, kind regards,
Erwin Heringa
SIDN | Meander 501 | 6825 MD | Postbus 5022 | 6802 EA | ARNHEM
T +31 (0)26 352 55 59 | F +31 (0)26 352 55 05
erwin.heringa@sidn.nl | www.sidn.nl
*From:* observium [mailto:observium-bounces@observium.org] *On Behalf Of *Markus Klock *Sent:* dinsdag 15 juli 2014 21:17 *To:* Observium Network Observation System *Subject:* [Observium] Using PHP Weathermap with Observium
Hello!
We are migrating from Cacti to Observium and it was a great experience, the only thing we lacked were the weathermap plugin for getting that nice network overview.
I then found that Neil Lathwood wrote a modified version of the PHP Weathermap that works with Observium data, you can find it on his github: https://github.com/laf/weathermap
I wrote a quick and dirty script that adds the weathermaps to the Observium menu without modifying Observium-code so that it will not break when updating Observium.
It works really well so I wrote a little guide for how you get the weathermap to work with Observium and posted it here:
http://blog.best-practice.se/2014/07/using-php-weathermap-with-observium.htm...
In case there are more people interested in using the weathermap with Observium :)
/Markus
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium