This guide assumes that you have a working installation of Observium already, preferably a installation that was done using the Debian/Ubuntu-guide.
1. Download the modified version of PHP Weathermap from github github: https://github.com/ZerxXxes/weathermap-for-observium and put it in your observium/html-directory.
The easiest way to do this is using git:
cd /opt/observium/html/
git clone https://github.com/ZerxXxes/weathermap-for-observium.git weathermap2. If you have used different paths for observium or the weathermap-plugin you will need to edit the variables in data-pick.php and map-poller.php, if you are following the installation guide then the default variables will work.
3. open the file editor.php and change the value in the beginning to:
$ENABLED=trueAs long as this value is true everyone who knows the right URL will be able to access the weathermap editor, its therefore recommended to change this value back to false as soon as you are done editing.
4. Make sure the directory configs/ is writable by your webserver, one way is to change to owner of the directory to the webserver-user: (in Ubuntu the webserver user is usually called www-data)
cd weathermap/
chown www-data:www-data configs/5. Create a new directory called maps/ and make the webserver-user the owner
mkdir maps/
chown www-data:www-data maps/6. Now use your webbrowser and access the editor in weathermap/editor.php (i.e. surf to observium.myurl.com/weathermap/editor.php)
7. Create a new map by writing a name and click create map. Note that the map name *must* end with .conf (i.e. networkmap.conf)
Edit your map, create nodes and draw links and then pick graphs from Observium to use with the links.
*NOTE* Under Map Properties, make sure to define Output HTML Filename to maps/<mapname>.html and Output Image Filename to <mapname>.png
8. Make the file map-poller.php executable for your system by doing:
chmod +x map-poller.php9. Add a new line in the cronjob at /etc/cron.d/observium after the Observium polling and discovery:
*/5 * * * * root /opt/observium/html/weathermap/map-poller.php >> /dev/null 2>&110. Move the file navbar-custom.inc.php in the observium/html/includes/-directory. This file does not exist by default in Observium but Observium looks for this file and include the code from it if it exists, this makes it possible to add custom menus that does not break when you upgrade you Observium installation.
mv navbar-custom.inc.php /opt/observium/html/includes/navbar-custom.inc.php*NOTE*
If you are using the current community edition (based on revision 5229) or any revision older than 5670 you should instead use the file navbar-custom-old.inc.php and rename it.
Now that's it!
All .html-files in the maps/-directory will be linked in a sub menu in the Observium GUI like this:
Clicking on one of them will take you to the rendered weathermap where you will get a nice overview of your networks load.
Hovering the mouse over a link will show the Observium graph for that link like this:
And clicking on a link will take you to the Observium-page for that link.
Hope this guide has been helpful for you and thank you for reading!
Thanks for this, great addition to Observium!
ReplyDeleteThanks mate, worked as described in your blog!
DeleteThis comment has been removed by the author.
ReplyDeleteThanks for the tutorial, I really like this! How did you add the Traffic Load legend? Also, are you actively working on this?
ReplyDeleteI'm not working on the PHP Weathermap or editor itself, its a whole different project which I have no part in found here: http://www.network-weathermap.com/
DeleteI only did some coding for having the gui in observium work with the weathermap.
Alright thanks!
DeleteDisregard my "Traffic Load legend" question, turns out it was simple enough :P
ReplyDeleteThis comment has been removed by the author.
ReplyDeletemap-poller.php is not generating any html file. When I run it from CLI; go the following output:
ReplyDeletePHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Console/Getopt.php on line 109
PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Console/Getopt.php on line 154
PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Console/Getopt.php on line 154
PHP Strict Standards: Non-static method PEAR::isError() should not be called statically in /opt/observium/html/weathermap/weathermap on line 60
WARNING: configs//networkmap.conf: OVERLIBGRAPH is used, but HTMLSTYLE is static. This is probably wrong. [WMWARN41]
Any clue?
Hi,
DeleteDid you ever figure out what the issue is by any chance. I am getting almost the exact error when I run it from cli and it doesn't generate any maps.
Thank you in advance.
you need to add a @ in the php files before the PEAR - meaning @PEAR::isError instead of PEAR::isError
DeleteGetting "This editor is not finished!" and won't create a new map, any ideas where to start here? Cheers
ReplyDeleteEverything's working for me except I don't get graphs when I hover over links. What might I be missing from the configuration, please? I can _click_ on a link and it takes me to that link's graph, but there's nothing on mouseover...
ReplyDeleteOK, I figured this one out. I needed to manually edit each of the .conf files to include the line "HTMLSTYLE overlib" somewhere near the top.
DeleteHey, I re-installed with git and grabbed the latest files and now my map-poller.php doesn't generate any maps! Also, when I run it I don't get any sort of output what so ever. Even when running with the "-d" option. Anybody seen this before? Any help would be greatly appreciated. Thanks
ReplyDeleteFYI I'm at the new CE Rev 6000 for Observium. I tried reverting to older code for weathermap but no dice. The map-poller.php just doesn't do anything :(. Heads up if anyone is upgrading to rev 6000.
ReplyDeleteWas anyone able to figure out the issue with graphs not being created? I am not getting any errors, see below.
ReplyDelete[root@observe weathermap]# /opt/observium/html/weathermap/map-poller.php -d
DEBUG!
Conf dir: configs/
Opened directory configs/
File to be run is lab.conf
Running php ./weathermap --config configs//lab.conf --base-href /weathermap/
Dear All,
ReplyDeleteI configured weathermap using the link
http://blog.best-practice.se/2014/07/using-php-weathermap-with-observium.html?m=1
But when I get to the observium GUI, I get the weathermap link under the
Overview but I don't get to see any graphs.
Hello,
Deletedid you create new maps from scratch or did you copy existing ones?
If you copied them from cacti make sure to modify them according to step 7.
I'm having the same issue, and I created a new map.
DeleteIn latest observium community edition (11.6000) html creation is not working..
ReplyDeleteYou have to comment out:
include("../../includes/functions.php"); in map-poller.php
replace PEAR::isError with @PEAR::isError in /usr/share/php/Console/Getopt.php
then the html files is generated..
Turn on debugging :
$weathermap_debugging=TRUE;
in /opt/observium/html/weathermap/weathermap
and run
php ./weathermap --config configs/networkmap.conf --base-href /weathermap/
//Magnus
I'm still getting errors with this. I have Weathermap in the Observium dropdown, however there are no maps to click on. When I run the last command you mention I get the following errors:
Deleteroot@server:/opt/observium/html/weathermap# php ./weathermap --config configs/networkmap.conf --base-href /weathermap/
PHP Warning: fopen(configs/networkmap.conf): failed to open stream: No such file or directory in /opt/observium/html/weathermap/lib/Weathermap.class.php on line 1789
PHP Warning: file_get_contents(configs/networkmap.conf): failed to open stream: No such file or directory in /opt/observium/html/weathermap/lib/Weathermap.class.php on line 3080
Hi Best Practice
ReplyDeleteI know nothing about PHP development management so i was wondering if you tell me how to display my maps in observium home page where the google maps appear with out going to a new page.
its bit tedious having to go back the whole time to view a new map?
i hope the above makes sense.
navbar-custom-old.inc.php
ReplyDeleteSomeone can share the link of this file?
http://best-practice.se/dump/navbar-custom-old.inc.php.txt
DeleteThanks best-practice for that file. I have created the file navbar-custom.php in the directory /opt/observium/html/includes/ and the sub-menu Weathermap appears now on observium web page
DeleteThis comment has been removed by the author.
ReplyDeleteI was attempting to follow along when I noticed that the repository was no longer being hosted by Neil. I searched through his similar repositories and it only applies to his new project.
ReplyDeleteDoes anyone have the original repository cloned/forked so that I can grab a copy of it?
Found this dump that someone did and don't see any issues: (Does this have changes listed above?)
Deletehttps://github.com/nicolasvion/weathermap-for-observium/
This version is working (and safe) as of commit "49bd19a".
DeleteI am however having the issue with graphs not appearing on hovering over links. I've set "HTMLSTYLE overlib" in the config but it doesn't seem to be resolving the issue. Any thoughts?
This comment has been removed by the author.
DeleteI needed to move overlib.js down a directory into /opt/observium/html/
DeleteAfter, I needed to fix the map-poller.php line about rrdcached as Magnus had above.
This comment has been removed by a blog administrator.
ReplyDeleteHello,
ReplyDeleteVery good article. Thanks a lot.
I was able to fully integrate weathermap with observium into a raspberry pi3
But i am wondering if it is possible to integrate the network weathermap plugin in observium in a way that is showed in the frontpage instead of the geomap
Thank you !
Hello,
ReplyDeleteVery good article. Thanks a lot.
I was able to fully integrate weathermap with observium into a raspberry pi3
But i am wondering if it is possible to integrate the network weathermap plugin in observium in a way that is showed in the frontpage instead of the geomap
Thank you !
Hi, I'd like to have the Weathermap on the frontpage instead too. I think this should be possible as you can configure the frontpage elements etc, but not sure if it works with a plugin.
Deletenot working on Observium CE 0.16.1.7533
ReplyDeleteStill working on 0.16.5.7863 (rolling). I installed it way back when I had the CE from the beginning of 2015.
ReplyDeletemaybe it works if you upgraded from earlier versions, but try to edit maps. On CE i'm trying a fresh install.
Deleteany news ?!
ReplyDeleteIs your project still available on GitHub? I'm getting an error when trying to pull it into the HTML directory.
ReplyDeletePHP Fatal error
ReplyDelete/opt/observium/html/weathermap# ./map-poller.php
ReplyDeletePHP Fatal error: require_once(): Failed opening required '/includes/db.inc.php' (include_path='.:/usr/share/php') in /opt/observium/includes/definitions.inc.php on line 438
I found a few alternatives to the non-working GIT respository in the doc: https://github.com/search?utf8=%E2%9C%93&q=observium+weathermap&type=Repositories&ref=searchresults
ReplyDeleteplease let the community know your successes & failures...
/opt/observium/html/weathermap# ./map-poller.php
ReplyDeletePHP Fatal error: require_once(): Failed opening required '/includes/db.inc.php' (include_path='.:/usr/share/php') in /opt/observium/includes/definitions.inc.php
can you help with this issue please ?
ReplyDeleteDid someone know how to put the Maximum Bandwidth legend on the map?
ReplyDeleteI have the weathermap installed and see it listed under the dropdown menu but when i create a new map with the editor and save it to maps/network.html there is nothing in the maps directory or nothing to view under weathermaps. If i manually create a .html file in the maps directory i see it listed when i select weather maps menu. Any ideas?
ReplyDeleteHi!
ReplyDeleteLate in the Game, but i wonder if you got some tip why nothing responds (error 500) when klicking the link object (the one that let you choose interface data-pck thingy) I got the Observium in the default setup but maybe i need to change a path somewhere or a userright on some folder!
Hi, its because php weathermap does not support PHP7 so if you run that you need to edit a file. There is a diff found here: http://pastebin.com/tT0KzMdt on what you need to edit. However its reversed so you need to add everything that begins with -.
DeleteBasically you need to replace all mysql_ functions with mysqli_
Dude, this is great which you have developed. But i am not able to find the repository in github...could you please help me here.
ReplyDeleteThis worked for me, GIT repository changed since document was posted:
Deletegit clone https://github.com/tobzsc/weathermap-for-observium.git weathermap
I could see the weathermaps and weather editor on the page, after I created the test.conf, it doesn't create the output files even I tried output file name "test.jpg" and output HTML filename "maps/test.html" with www-data write permission on "maps" folder. Any ideas?
ReplyDeletehi, i installed everything correctly (i think), but i get an error while using map-poller.php
ReplyDeletePHP Fatal error: require_once(): Failed opening required '/includes/db.inc.php' (include_path='.:/usr/share/php') in /opt/observium/includes/definitions.inc.php on line 475
is there someting i need to change?
After installing weathermap, i then tried to create a node and pick from observium. However, nothing is listed which obviously there should be something in the list but it says No results. Is it something that is missing from my config? Any help is highly appreciated.
ReplyDeleteThank you.
not working in turnkey linux ver 8128 the editor can be opened but weathermap bar not showing the maps and config
ReplyDeleteSince updating to r9294 my maps are no longer updating....
ReplyDeleteHow to upgrade observium weathermap from 9.7 to 9.8?
ReplyDeleteHowever, they also understand the fact that a function can be manipulated quickly by passing references instead of values. They can further avoid adding extra overheads by passing references to the function instead of values.plakatΕ³ spausdinimas
ReplyDeleteSports big news provide is a all type sports contents. In This portal is a sports all type content, For ex. Cricket, cwc19, UEFA, football, Copa America 2019 etc.
ReplyDeleteCricket
Cricket World Cup 2019
Live Streaming
World Cup 2019 Final
IPL 2020 Live Streaming
Copa America 2019 Venues
Tennis
Copa America 2019
Cricket World Cup Live
Football
This comment has been removed by the author.
ReplyDeleteJust followed the steps but when create nodes or links option pick from observium is not a clickable link. Is there any way to fix it?
ReplyDeleteHello,
ReplyDeleteIt doesn't open the maps page when i click on it.. it just reload the observium page.
Any help ?
Is this guide still valid with Observium CE 19.8.10000 ?
ReplyDeleteHi, When I add a new node and click on it nothing happens. I should see a list with all our devices and select the correct one. Any idea please
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHiya, friend! π€ Your post is simply fantastic! π Beautifully written and covering all the important bases. π It's a real masterpiece! π¨ Bookmarking your site and subscribing to the feeds pronto! π° Can't wait to devour more content like this! π½️ Let's concoct more strategies together. π Thanks a ton for sharing! π Saudi Arabia Introduces Expo 2030 Visa, facilitating travel for the global event. The visa aims to boost tourism and participation in the expo, fostering international engagement and collaboration.
ReplyDeleteπ What a thrill to have finally discovered what I've been searching for! You've successfully concluded my four-day quest. Bless you, my friend! Wishing you an amazing day ahead. This blog is outstanding! Your articles are so engaging. Keep up the wonderful work! Countless individuals are searching for this information, and your expertise could greatly benefit them. Turkish Visa for Algerian citizens streamlines travel with an easy online application process. It enhances accessibility and convenience, facilitating smoother entry into Turkey for Algerian travelers.
ReplyDeleteYour dedication to delivering a superior experience is evident, and you consistently push the boundaries of excellence. Through cutting-edge features, captivating content, and unparalleled customer service, you relentlessly seek to elevate the satisfaction of your audience. Azerbaijan visa uk/a>,
ReplyDeleteBefore traveling to Azerbaijan, UK citizens must secure an eVisa. Introduced by the Azerbaijani government, the eVisa system aims to simplify visa applications and boost tourism. It offers a smooth and swift application process, enabling travelers to acquire their visas online promptly, avoiding any unnecessary delays.
Your dedication to delivering a superior experience is evident, and you consistently push the boundaries of excellence. Through cutting-edge features, captivating content, and unparalleled customer service, you relentlessly seek to elevate the satisfaction of your audience. Azerbaijan visa uk, Before traveling to Azerbaijan, UK citizens must secure an eVisa. Introduced by the Azerbaijani government, the eVisa system aims to simplify visa applications and boost tourism. It offers a smooth and swift application process, enabling travelers to acquire their visas online promptly, avoiding any unnecessary delays.
ReplyDeleteI must say, this article really struck a chord with me! Your insights are like a breath of fresh air in a sea of generic content. I truly appreciate how you've managed to break down complex concepts, making them easily understandable for someone like me who's new to this topic. Do i need a transit visa for Benin Whether you need a transit Visa for Benin depends on your nationality and the length of your layover. Some travelers may require a transit visa if their layover exceeds a certain duration. It's advisable to check with Benin's immigration authorities for specific requirements.
ReplyDeleteI'm getting errors with this. I have Weathermap in the Observium dropdown, however there are no maps to click on. When I run the Debug command ( opt/observium/html/weathermap/map-poller.php -d)
ReplyDeletefollowing errors:
[root@localhost weathermap]# /opt/observium/html/weathermap/map-poller.php -d
DEBUG!
PHP Fatal error: require_once(): Failed opening required '/includes/common.inc.php' (include_path='.:/usr/share/pear:/usr/share/php') in /opt/observium/includes/functions.inc.php on line 15
Fatal error: require_once(): Failed opening required '/includes/common.inc.php' (include_path='.:/usr/share/pear:/usr/share/php') in /opt/observium/includes/functions.inc.php on line 15
I am getting fatel error in path on line 15 - /opt/observium/includes/functions.inc.php
ReplyDelete[root@localhost weathermap]# cat -n /opt/observium/includes/functions.inc.php
1 <?php
2 /**
3 * Observium
4 *
5 * This file is part of Observium.
6 *
7 * @package observium
8 * @subpackage functions
9 * @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2024 Observium Limited
10 *
11 */
12
13 // Observium Includes
14
15 require_once($config['install_dir'] . "/includes/common.inc.php"); // already included in observium.inc.php before definitions
16 include_once($config['install_dir'] . "/includes/http.inc.php");
17 include_once($config['install_dir'] . "/includes/encrypt.inc.php");
18 include_once($config['install_dir'] . "/includes/rrdtool.inc.php");
19 include_once($config['install_dir'] . "/includes/influx.inc.php");
20 include_once($config['install_dir'] . "/includes/syslog.inc.php");
21 include_once($config['install_dir'] . "/includes/rewrites.inc.php");
22 include_once($config['install_dir'] . "/includes/templates.inc.php");
23 include_once($config['install_dir'] . "/includes/snmp.inc.php");
24 include_once($config['install_dir'] . "/includes/entities.inc.php");
25 include_once($config['install_dir'] . "/includes/geolocation.inc.php");
26 include_once($config['install_dir'] . "/includes/alerts.inc.php");