Weathermap html output error?
Moderators: Developers, Moderators
Weathermap html output error?
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
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
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Weathermap html output error?
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.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
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!)
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!)
Re: Weathermap html output error?
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.Howie wrote: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.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
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Weathermap html output error?
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'.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.
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!)
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!)
"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
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
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
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?).NHDave wrote: If I open http://mycactiserver/cacti/plugins/weat ... map_2.html
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!)
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!)
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.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.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
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 twoNHDave wrote: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.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.
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!)
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!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
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!)
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!)
Sorry for the delay (can't stay out of the new car.. )Howie wrote:In fact, if you'd like to try it, the line to change is line 295 in setup.phpCode: Select all
$wmap->imageuri = $config["url_path"].'plugins/weathermap/output/weathermap_'.$map['id'].".png";
That works like a charm! Thanks again Howie
Who is online
Users browsing this forum: No registered users and 1 guest