View Weathermap outside of Cacti

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

bdearlove
Posts: 19
Joined: Thu Jun 09, 2005 8:51 am

View Weathermap outside of Cacti

Post by bdearlove »

Good Day All,

I am running weathermap, great product integrated with Cacti. Is it possible to display this outside of Cacti?

I have for example on Occasion added Cacti graphs via Guest to the Intranet, is it possible to do this with Weathermap and have it still get updated?

Thanks!
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: View Weathermap outside of Cacti

Post by Howie »

bdearlove wrote:Good Day All,

I am running weathermap, great product integrated with Cacti. Is it possible to display this outside of Cacti?

I have for example on Occasion added Cacti graphs via Guest to the Intranet, is it possible to do this with Weathermap and have it still get updated?

Thanks!
Access to the actual weathermap images isn't really controlled by Cacti. If you link directly to one of those .png files, it will work from anywhere. Possibly I should make the filenames less guessable, actually... :roll:

I use exactly this myself to add the thumbnail of one of our overview maps to the intranet.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
bdearlove
Posts: 19
Joined: Thu Jun 09, 2005 8:51 am

Post by bdearlove »

Actually, the PNG files I found no problem, I didnt know if it was possible to see the PNG files with the ability to hover over them outside if Cacti. My guess is yes if you didn't install the Cacti add-on...

Did you create the weathermap? If so, THANKS! It is amazing!
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

bdearlove wrote:Actually, the PNG files I found no problem, I didnt know if it was possible to see the PNG files with the ability to hover over them outside if Cacti. My guess is yes if you didn't install the Cacti add-on...

Did you create the weathermap? If so, THANKS! It is amazing!
OK... the html (which contains the imagemap hover stuff) is also in the output folder. It's a partial HTML page (no BODY or HEAD) for each map, but if you fetch it across to your intranet server with something like wget, or use server-side includes (mod_include) if the intranet is on the same server as cacti, then that would work.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
bdearlove
Posts: 19
Joined: Thu Jun 09, 2005 8:51 am

Post by bdearlove »

Awsome. Thats where I got mixed up, the HTML file, if clicking on it references the image, but with an extra output folder thats why it wasn't displaying correctly.
gkhnyldrm
Posts: 12
Joined: Wed Apr 30, 2008 8:16 am
Location: Denizli,Turkey

Re: View Weathermap outside of Cacti

Post by gkhnyldrm »

bdearlove wrote:Good Day All,

I am running weathermap, great product integrated with Cacti. Is it possible to display this outside of Cacti?

I have for example on Occasion added Cacti graphs via Guest to the Intranet, is it possible to do this with Weathermap and have it still get updated?

Thanks!
i need the same thing with bdearlove,i need to view my weathermaps without logging on the cacti web console. it is possible using the weathermap.html file in /cacti/plugings/weathermap/output/ directory but there is no weathermap.html file in my /weathermap/output/ directory. i'm using cacti 0.8.6j version and weathermap plugin version 0.95 how can i create weathermap.html file or how can i view my maps anonymously? any ideas?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

You can use weathermap without Cacti altogether, from a command-line:

Code: Select all

php weathermap --config /path/to/cacti/plugins/weathermap/configs/blah.conf --output /var/www/html/weathermap.png --htmloutput /var/www/html/weathermap.html
as long as your TARGET paths are full paths. Don't forget to copy overlib.js into the directory on your webserver where the maps are going. You'd need a cron job to do these regularly.

or you could enable the Guest user in Cacti, and then give that user access to your weathermaps (or the ones you want to publish at least), same as for graphs.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
gkhnyldrm
Posts: 12
Joined: Wed Apr 30, 2008 8:16 am
Location: Denizli,Turkey

Post by gkhnyldrm »

thank you for your reply howie,i used the code below

Code: Select all

php weathermap --config /usr/share/cacti/site/plugins/weathermap/configs/kampus.conf --output /var/www/weathermap.png --htmloutput /var/www/weathermap.html
and i get the following error;
Could not open input file: weathermap

is "weather" parameter wrong? or the paramater "weathermap" is a user name?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

gkhnyldrm wrote:thank you for your reply howie,i used the code below

Code: Select all

php weathermap --config /usr/share/cacti/site/plugins/weathermap/configs/kampus.conf --output /var/www/weathermap.png --htmloutput /var/www/weathermap.html
and i get the following error;
Could not open input file: weathermap

is "weather" parameter wrong? or the paramater "weathermap" is a user name?
You'd need to do that from within the weathermap directory. Didn't mention that, sorry. weathermap is the name of the command-line script. It assumes that all the other *.class.php files it needs are in the current directory, and the lib/datasources directory, so you need to cd to <cacti_dir>/plugins/weathermap first.

(You *might* need to use ./weathermap instead of weathermap, too, but I don't think so)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
gkhnyldrm
Posts: 12
Joined: Wed Apr 30, 2008 8:16 am
Location: Denizli,Turkey

Post by gkhnyldrm »

I run the following command in <cacti_path>/plugins/weathermap/ and I get the following error :(

Code: Select all

root@cacti:/usr/share/cacti/site/plugins/weathermap# php weathermap --config /usr/share/cacti/site/plugins/weathermap/configs/kampus.conf --output /var/www/weathermap.png --htmloutput /var/www/weathermap.html

Warning: require_once(Console/Getopt.php): failed to open stream: No such file or directory in /usr/share/cacti/site/plugins/weathermap/weathermap on line 8

Fatal error: require_once(): Failed opening required 'Console/Getopt.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/cacti/site/plugins/weathermap/weathermap on line 8
I didn't edited /usr/share/cacti/site/plugins/weathermap/weathermap file but it causes errors as above. do I need to edit line 8 manually?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

No, you need to install a PEAR module. How you do this varies a lot depending on your OS. It's a PHP thing and not a weathermap thing though.

The base PEAR install includes Console-Getopt, which is what is missing on your system. You might be able to install a package/RPM/deb/port/whatever to do this for you. Look for pear or php-pear in your packages.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
gkhnyldrm
Posts: 12
Joined: Wed Apr 30, 2008 8:16 am
Location: Denizli,Turkey

Post by gkhnyldrm »

thank you so much Howie,I'll work on it :)
gkhnyldrm
Posts: 12
Joined: Wed Apr 30, 2008 8:16 am
Location: Denizli,Turkey

Post by gkhnyldrm »

I installed pear module on my machine and run the command and get this output.

[/code]root@cacti:/usr/share/cacti/site/plugins/weathermap# php ./weathermap --config /usr/share/cacti/site/plugins/weathermap/configs/kampus.conf --output /var/www/weathermap.png --htmloutput /var/www/weathermap.html
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: RRD DS: Can't find RRDTOOL. Check line 29 of the 'weathermap' script.
RRD-based TARGETs will fail. [WMRRD02]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01213-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_91.rrd on config line 152 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09414-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_96.rrd on config line 158 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01220-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_86.rrd on config line 164 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09426-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_83.rrd on config line 170 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09447-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_84.rrd on config line 176 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09496-node09479, target: /usr/share/cacti/site/rra/8800_traffic_in_89.rrd on config line 182 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09489-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_90.rrd on config line 189 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01583-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_85.rrd on config line 195 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01583-node01588, target: /usr/share/cacti/site/rra/iibfa_blok_5500_traffic_in_112.rrd on config line 205 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01220-node01686, target: /usr/share/cacti/site/rra/fefa_blok_5500_traffic_in_111.rrd on config line 211 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01220-node01691, target: /usr/share/cacti/site/rra/fefa_blok_5500_traffic_in_110.rrd on config line 218 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01220-node01699, target: /usr/share/cacti/site/rra/fefa_blok_5500_traffic_in_109.rrd on config line 225 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02524, target: /usr/share/cacti/site/rra/3com6040_traffic_in_105.rrd on config line 232 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02484, target: /usr/share/cacti/site/rra/3com6040_traffic_in_103.rrd on config line 239 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02490, target: /usr/share/cacti/site/rra/3com6040_traffic_in_104.rrd on config line 246 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02498, target: /usr/share/cacti/site/rra/3com6040_traffic_in_102.rrd on config line 253 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02503, target: /usr/share/cacti/site/rra/3com6040_traffic_in_106.rrd on config line 260 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02509, target: /usr/share/cacti/site/rra/3com6040_traffic_in_107.rrd on config line 267 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02532, target: /usr/share/cacti/site/rra/3com6040_traffic_in_100.rrd on config line 274 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09496-node02771, target: /usr/share/cacti/site/rra/8800_traffic_in_93.rrd on config line 281 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02537, target: /usr/share/cacti/site/rra/3com6040_traffic_in_101.rrd on config line 289 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09431-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_98.rrd on config line 296 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09496-node09431, target: /usr/share/cacti/site/rra/8800_traffic_in_97.rrd on config line 303 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09420-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_95.rrd on config line 310 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02771-node02154, target: /usr/share/cacti/site/rra/3com6040_traffic_in_108.rrd on config line 316 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
root@cacti:/usr/share/cacti/site/plugins/weathermap#

Code: Select all


weathermap.html file is created in /var/www/ (my web root) directory. I copied the overlib.js file to /var/www/ directory,everything seems ok but when I try to reach weathermap.html  (http://mycactiserver/weathermap.html) no graphs are displayed,only a thin line and "Network Map created with PHP Network Weathermap v0.95b" string.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

gkhnyldrm wrote: /usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: RRD DS: Can't find RRDTOOL. Check line 29 of the 'weathermap' script.
RRD-based TARGETs will fail. [WMRRD02]
This line at the top explains all the other problems (which are just weathermap telling you that it *still* can't find rrdtool). Check the top of the 'weathermap' script and make sure that the path for rrdtool in there is correct.
weathermap.html file is created in /var/www/ (my web root) directory. I copied the overlib.js file to /var/www/ directory,everything seems ok but when I try to reach weathermap.html (http://mycactiserver/weathermap.html) no graphs are displayed,only a thin line and "Network Map created with PHP Network Weathermap v0.95b" string.
Did you get a .png file too? That's the actual map after all.

Ooh. You may need to add '--image-uri .' (that's a dot) to your command-line too, so that the IMG SRC in the HTML is correct.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
gkhnyldrm
Posts: 12
Joined: Wed Apr 30, 2008 8:16 am
Location: Denizli,Turkey

Post by gkhnyldrm »

yes there is 3 files total in /var/www/ directory. these are weathermap.html weathermap.png and overlib.js (overlib.js is the file that I copied there)

I edit weathermap file and correct rrdtool path line,I run the command without '--image-uri .' and browse site in internet explorr, png image shows with a broken image (X). Then I check the properties of the png image;image url is "http://mycactiserver/var/www/weathermap.png" it must be "http://mycactiserver/weathermap.png"

then I run the command with '--image-uri .' paramater and get the following error.

Code: Select all

root@cacti:/usr/share/cacti/site/plugins/weathermap# php ./weathermap --config --image-uri . /usr/share/cacti/site/plugins/weathermap/configs/kampus.conf --output /var/www/weathermap.png --htmloutput /var/www/weathermap.html

Warning: fopen(--image-uri): failed to open stream: No such file or directory in /usr/share/cacti/site/plugins/weathermap/Weathermap.class.php on line 1321
--image-uri: Couldn't open config file --image-uri for reading


Could not read Weathermap config file. No output produced. Maybe try --help?
root@cacti:/usr/share/cacti/site/plugins/weathermap# 
the problem is the url of the png image but I don't know how to fix it.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests