Weathermap html output error?

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Weathermap html output error?

Post by NHDave »

Howie,
All the maps appear correct within the plugin however the generated html page does not show the generated png file. The source of that page shows the png path as output/output/wmap.png and if I manually edit the html source (before it gets regenerated again) the image will show up correctly.

And as always it's a great addition to a great tool.

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

Re: Weathermap html output error?

Post by Howie »

NHDave wrote:Howie,
All the maps appear correct within the plugin however the generated html page does not show the generated png file. The source of that page shows the png path as output/output/wmap.png and if I manually edit the html source (before it gets regenerated again) the image will show up correctly.

And as always it's a great addition to a great tool.

Dave
If you mean the HTML generated by the command-line tool, then have a look at --image-uri in the manual... It's usually best to stick with one or the other, I find.
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!)
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Re: Weathermap html output error?

Post by NHDave »

Howie wrote:
NHDave wrote:Howie,
All the maps appear correct within the plugin however the generated html page does not show the generated png file. The source of that page shows the png path as output/output/wmap.png and if I manually edit the html source (before it gets regenerated again) the image will show up correctly.
Dave
If you mean the HTML generated by the command-line tool, then have a look at --image-uri in the manual... It's usually best to stick with one or the other, I find.
Nothing is configured to run from the cli, all the work is being done by the poller. It is the html that is created when the poller runs that is generating the incorrect path for the image.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap html output error?

Post by Howie »

NHDave wrote: Nothing is configured to run from the cli, all the work is being done by the poller. It is the html that is created when the poller runs that is generating the incorrect path for the image.
OK - then which version of weathermap is this? I only ask because the standard format for the names of the output files is weathermap_3.png (not wmap.png). It also sets the image-uri to 'output/weathermap_3.png'.

Although it does that before the file is parsed... do you have an IMAGEOUTPUTFILE line in your config? You might want to try with that removed. I'll change this in 0.9 so that it really ignores that line when running from the poller.
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!)
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

"Powered by PHP Weathermap version 0.82"

My bad on the file name, I just shortened it for bravety sake. It is weathermap_2.png.
If I open http://mycactiserver/cacti/plugins/weat ... map_2.html no image is displayed and it gives the path to the image in the source html as http://mycactiserver/cacti/plugins/weat ... rmap_2.png

I do not have IMAGEOUTPUTFILE in the config file
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Aaah. OK. Don't do that. The html files in the output file are not complete HTML files, and they are intended to be included into the page of the plugin in the weathermap directory, which is why they have output/weathermap_2.png in the source (they don't actually say output/output/weathermap_2.png in the IMG SRC tag do they?).

If you want to have a view of one map, then there is a plugin URL that does that ( http://yourserver/cacti/plugins/weather ... ewmap&id=2 ). If you need to be able to link to maps from outside of Cacti's auth system, then you need to either enable Guest access to Cacti, or use the command line tool to produce a complete HTML page with the right URI in it.
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!)
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

Howie wrote:If you need to be able to link to maps from outside of Cacti's auth system, then you need to either enable Guest access to Cacti, or use the command line tool to produce a complete HTML page with the right URI in it.
Ok, thanks for the info. I did have a seperate weathermap cli running but disabled it when I went to the plugin in hopes I could link them without having 'guest'. Guess I'll reenable it. :wink:
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

NHDave wrote:
Howie wrote:If you need to be able to link to maps from outside of Cacti's auth system, then you need to either enable Guest access to Cacti, or use the command line tool to produce a complete HTML page with the right URI in it.
Ok, thanks for the info. I did have a seperate weathermap cli running but disabled it when I went to the plugin in hopes I could link them without having 'guest'. Guess I'll reenable it. :wink:
Yeah, for now. I think it might not be a bad idea to make that HTML use a full URL for the image, which would solve your problem, and do no harm for anyone else - the plugin does know that URL. I have a day off tomorrow, so maybe 0.9 will move forward an inch or two :-)
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!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

In fact, if you'd like to try it, the line to change is line 295 in setup.php

Code: Select all

$wmap->imageuri = $config["url_path"].'plugins/weathermap/output/weathermap_'.$map['id'].".png";
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!)
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

Howie wrote:In fact, if you'd like to try it, the line to change is line 295 in setup.php

Code: Select all

$wmap->imageuri = $config["url_path"].'plugins/weathermap/output/weathermap_'.$map['id'].".png";
Sorry for the delay (can't stay out of the new car.. :wink: )
That works like a charm! Thanks again Howie
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests