network map
Moderators: Developers, Moderators
Hi
I've tried running cacti2weathermap.pl and the weathermap.pl scripts and have the html files generated, however my .png file appears broken. I cant open it.
I'm running windows 2000 and cacti 0.8.6c No perl errors, so I'm a little confused. Is this a basic windows/linux compatibility thing? Do I need to do something imaginative with GD?
Any thoughts greatfully received.
Cheers
Ross
I've tried running cacti2weathermap.pl and the weathermap.pl scripts and have the html files generated, however my .png file appears broken. I cant open it.
I'm running windows 2000 and cacti 0.8.6c No perl errors, so I'm a little confused. Is this a basic windows/linux compatibility thing? Do I need to do something imaginative with GD?
Any thoughts greatfully received.
Cheers
Ross
I'm in the exact same boat as Rossco... Win2K, 0.8.6c, HTML's generated fine, no Perl errors... It creates a .png output file that won't open. The output file is oddly 11k smaller than the original, so it's evidently not completing the file.
Can't seem to get the -v debug switch to display anything more than "Network Wearthermap v1.1.1 - http://netmon.grnet.gr/weathermap/"
Was just trying to start simple with two sites and one link. I can paste the HTTP TARGET link to the data file into a browser and it comes up fine (and has in & out data like it should).
My weathermap.conf file:
...and the config section of the weathermap file:
Anyone got this to run from a Windows box yet?
Thanks,
Jason
[/b]
Can't seem to get the -v debug switch to display anything more than "Network Wearthermap v1.1.1 - http://netmon.grnet.gr/weathermap/"
Was just trying to start simple with two sites and one link. I can paste the HTTP TARGET link to the data file into a browser and it comes up fine (and has in & out data like it should).
My weathermap.conf file:
BACKGROUND us.png
KEYPOS 1 520
# low high red green blue
SCALE 1 10 140 0 255
SCALE 10 25 32 32 255
SCALE 25 40 0 192 255
SCALE 40 55 0 240 0
SCALE 55 70 240 240 0
SCALE 70 85 255 192 0
SCALE 85 100 255 0 0
NODE CollegeStation
POSITION 320 365
LABEL CLL
NODE Raleigh
POSITION 400 365
LABEL RAL
LINK CLL-RAL
NODES CollegeStation Raleigh
TARGET http://10.80.100.102/graphs/weatherm/we ... in_26.html
BANDWIDTH 70656
...and the config section of the weathermap file:
If I had to guess, I would say that I screwed up the in GD Graphics Library since I wasn't quiiiiiiite sure exactly what to do with it on a Windows system.################################################################
#
# Configuration parameters
#
$WGET = "../wget/wget -qO -";
$CONFIG = "weathermap.conf";
$OUTPUT = "weathermap.png";
$DEBUG = 0;
$WIDTH = 900;
$HEIGHT = 700;
#
################################################################
Anyone got this to run from a Windows box yet?
Thanks,
Jason
[/b]
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Try addingjas0420 wrote:The output file is oddly 11k smaller than the original, so it's evidently not completing the file.
Code: Select all
binmode(PNG);
Code: Select all
open(PNG,">$OUTPUT")||die("$OUTPUT: $!\n");
Windows Perl opens files in ascii mode by default, if I remember correctly, which will silently break any binary file saved (like a PNG).
Check output
Hi,Anonymous wrote:I got 104 rrd-files in my /rra dir, but the script posted by David R. only makes 57 .html files. Anyone know why?
what do you get when you run the script by hand in debug mod (removing the comment line in the script to see the output when a rrd file is not treated.
Regarding the cron proble I had an issue also on RH ES, when I did try to get the script run evry 5 minutes, don't know why, putting it to 3, worked.... weird.
Heres' my cron (located in cron.d directory):
Code: Select all
[admin@webutil admin]$ cat /etc/cron.d/weathermap
*/3 * * * * apache ( /usr/local/bin/c2weather 2>&1 && /usr/local/bin/weathermap -c /usr/local/etc/weathermap.conf &>/dev/null )
David.
ps: first remove all the wea_* files
PNG's now working :-)
Howie, you da man!
Graphics now outputting correctly - links dont work, but I'm certain thats my mistake.
Thanks for your help.
Kind Regards
Rossco
Graphics now outputting correctly - links dont work, but I'm certain thats my mistake.
Thanks for your help.
Kind Regards
Rossco
Woo hoo!!! Howie, that did it! Thank you!!!
Jason
Jason
Howie wrote:Try addingjas0420 wrote:The output file is oddly 11k smaller than the original, so it's evidently not completing the file.directly after theCode: Select all
binmode(PNG);
line.Code: Select all
open(PNG,">$OUTPUT")||die("$OUTPUT: $!\n");
Windows Perl opens files in ascii mode by default, if I remember correctly, which will silently break any binary file saved (like a PNG).
Make sure you have a directory inside your graphs directory called "weatherm". Create it if not. By default, graphs go to wherever/cacti/graphs/weatherm/Anonymous wrote:Hi,
Could you help me i'm a bit confused!!
I'm running the cacti2weatermap.pl
with no errors
but i'm not getting anything in my graphs directory!
Any suggestions??
thanks in advance
Good luck!
Re: Works... confirmed!
Sorry, another "bump" for help. I'm just getting back to this after the long weekend, and I'm still having trouble getting this to run in cron.madjeff wrote: I can run cacti2weathermap.pl from the command line and it creates the files perfectly. But when I run it via cron, it doesn't create/update the files. Any idea what might be causing this?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Works... confirmed!
What use do you run the cron job as? Is it the same use that owns the directory and the files that you are trying to create?madjeff wrote:Sorry, another "bump" for help. I'm just getting back to this after the long weekend, and I'm still having trouble getting this to run in cron.madjeff wrote: I can run cacti2weathermap.pl from the command line and it creates the files perfectly. But when I run it via cron, it doesn't create/update the files. Any idea what might be causing this?
If you tested it as root, then added a cron job for your cactiuser for example, then it will indeed fail. In that case:
Code: Select all
chown -R cactiuser /var/www/directory_with_weathermap_data
ought to fix it for you.
Who is online
Users browsing this forum: No registered users and 3 guests