Howie wrote:lorcs wrote:I didn't get any error from Cacti log or Apache. However, I do find out the png file generated has no content. Is it possible because of configuration ? If the configuration is incorrect, does weathermap still generate png file except html ?
Has no content as in blank, or 0 bytes?
Most configuration errors cause an error in the Cacti log, and usually they only affect the node or link that it is within. You would have to have an error in ALL the nodes to get a blank map... (that would make the links break too, because the nodes were ignored).
You may want to turn DEBUG on for one poller cycle in Cacti, and look at the logs then. You might also try using the command-line tool from the plugins/weathermap directory:
Code: Select all
php ./weathermap --config configs/yourmap.conf
and if you don't get any errors:
Code: Select all
php ./weathermap --config configs/yourmap.conf --debug
If there's still nothing, then I'd like a copy of your config, please
(either PM me or e-mail)
You should still get two PNG files, though: weathermap_1.png and weathermap_thumb_1.png
Here is the log from cacti.log
04/10/2006 03:09:57 AM - SYSTEM STATS: Time:293.1732 Method:cactid Processes:1 Threads:20 Hosts:9 HostsPerProcess:9 DataSources:70 RRDsProcessed:3
04/10/2006 03:09:57 AM - WEATHERMAP: Poller[0] Weathermap 0.8 in da house
04/10/2006 03:09:57 AM - WEATHERMAP: Poller[0] Map: /var/www/html/cacti/plugins/weathermap/configs//test.conf -> /var/www/html/cacti/plugins/weathermap/output//weathermap_8.html & /var/www/html/cacti/plugins/weathermap/output//weathermap_8.png
04/10/2006 03:09:58 AM - WEATHERMAP: Poller[0] Weathermap 0.8 in da house
04/10/2006 03:09:58 AM - WEATHERMAP: Poller[0] Map: /var/www/html/cacti/plugins/weathermap/configs//test.conf -> /var/www/html/cacti/plugins/weathermap/output//weathermap_8.html & /var/www/html/cacti/plugins/weathermap/output//weathermap_8.png
And the debug from execute ./weathermap
Setting bandwidth (100M, 100M)
Saving Default Link: DEFAULT
Saving Node: eah
Saving Node: core
Saving Node: liatt
Setting bandwidth (512k, 512k)
RRDTOOL check triggered
Saving Link: eah-core
Setting bandwidth (512K, 512K)
Saving Link: liatt-core
Adding default SCALE set.
================== ReadData: Updating link data for all links
ReadData for Link eah-core:
New Target: /var/www/html/cacti/rra/eah_traffic_in_125.rrd (/var/www/html/cacti/rra/eah_traffic_in_125.rrd)
ReadData: Updating link eah-core from RRD Target /var/www/html/cacti/rra/eah_traffic_in_125.rrd
ReadFromRRD: Target DS names are traffic_in and traffic_out
ReadFromRRD: Running: /usr/local/rrdtool-1.2.12/bin/rrdtool fetch /var/www/html/cacti/rra/eah_traffic_in_125.rrd AVERAGE --start now-400
> 1144609200: 1.3512094968e+02 1.5279578662e+01
> 1144609500: nan nan
> --
--1144609500: nan nan
ReadFromRRD: 1: This isn't a number: [nan]
ReadFromRRD: 2: This isn't a number: [nan]
--1144609200: 1.3512094968e+02 1.5279578662e+01
ReadFromRRD: Found a good line: 1144609200: 1.3512094968e+02 1.5279578662e+01
( traffic_in traffic_out
)
ReadFromRRD: Our line is 1144609200: 1.3512094968e+02 1.5279578662e+01
ReadFromRRD: Returning (1080.96759744,122.236629296)
ReadData: Setting 1080.96759744,122.236629296
ReadData for Link liatt-core:
New Target: /var/www/html/cacti/rra/liatt_traffic_in_126.rrd (/var/www/html/cacti/rra/liatt_traffic_in_126.rrd)
ReadData: Updating link liatt-core from RRD Target /var/www/html/cacti/rra/liatt_traffic_in_126.rrd
ReadFromRRD: Target DS names are traffic_in and traffic_out
ReadFromRRD: Running: /usr/local/rrdtool-1.2.12/bin/rrdtool fetch /var/www/html/cacti/rra/liatt_traffic_in_126.rrd AVERAGE --start now-400
> 1144609200: 2.8310012333e+01 1.5865853176e+02
> 1144609500: nan nan
> --
--1144609500: nan nan
ReadFromRRD: 1: This isn't a number: [nan]
ReadFromRRD: 2: This isn't a number: [nan]
--1144609200: 2.8310012333e+01 1.5865853176e+02
ReadFromRRD: Found a good line: 1144609200: 2.8310012333e+01 1.5865853176e+02
( traffic_in traffic_out
)
ReadFromRRD: Our line is 1144609200: 2.8310012333e+01 1.5865853176e+02
ReadFromRRD: Returning (226.480098664,1269.26825408)
ReadData: Setting 226.480098664,1269.26825408
ReadData Completed.
--------------
AllocateScaleColours: KEYTEXT (0,0,0)
AllocateScaleColours: KEYBG (255,255,255)
AllocateScaleColours: BG (255,255,255)
AllocateScaleColours: TITLE (0,0,0)
AllocateScaleColours: TIME (0,0,0)
AllocateScaleColours: 1:10 (140,0,255)
AllocateScaleColours: 10:25 (32,32,255)
AllocateScaleColours: 25:40 (0,192,255)
AllocateScaleColours: 40:55 (0,240,0)
AllocateScaleColours: 55:70 (240,240,0)
AllocateScaleColours: 70:85 (255,192,0)
AllocateScaleColours: 85:100 (255,0,0)
Clipped 211.126483875% to 100%
Adding Poly imagemap for eah-core
Adding Poly imagemap for eah-core
Adding Poly imagemap for liatt-core
Adding Poly imagemap for liatt-core
Node->Draw: Metrics are: 3 21 x 13 -> 21 x 13
Node->Draw: Metrics are: 3 28 x 13 -> 28 x 13
Node->Draw: Metrics are: 3 35 x 13 -> 35 x 13