network map

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

what is hj3 version?
I just start to install weathermap and first I install your script only.
I didnt install weathermap .
Because I dont know how can I install weathermap. I cant find libgd and how can i isntall overlib.
if you know, can u tell me step by step?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

TFC wrote:what is hj3 version?
I just start to install weathermap and first I install your script only.
I didnt install weathermap .
Because I dont know how can I install weathermap. I cant find libgd and how can i isntall overlib.
if you know, can u tell me step by step?
I'm confused. It's all on the same web page at thingy.com... with instructions, and a tar.gz to download.

My advice would be to install the PHP version on my page (see my sig), as it's easier to install if you don't know what you are doing, but wait for the next version of php-weathermap as it has a couple of important bugfixes. This is ready, and will be available in the next day or so.

You will need the gd extension for PHP to use that version. You can find out if you have this by typing

Code: Select all

php -m
and looking for 'gd' in the list. If you don't have it then you will either need to re-compile php to include it, or install a seperate package or port. It depends on what OS you are using (you didn't say).
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
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

I use fedora core 3
and i installed my php like this:
./configure --prefix=/www/php --with-apxs2=/www/bin/apxs --with-config-filepath=/
www/php --enable-sockets --with-mysql=/usr/local/mysql --with-zlibdir=/
usr/include –with-gd but i cant find when I run php -m command
[PHP Modules]
bcmath
bz2
calendar
ctype
curl
dba
dbx
dio
exif
ftp
gettext
gmp
iconv
mime_magic
openssl
overload
pcre
posix
pspell
session
shmop
sockets
standard
sysvsem
sysvshm
tokenizer
wddx
xml
yp
zlib

[Zend Modules]
as you see there is not gd module..
how can add it?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

TFC wrote:how can add it?
You still didn't say what operating system this is... the short answer is "I don't know, and I can't do support for your operating system problems".

I just googled for "how to install php gd module" and found plenty of results, but it depends on your OS! If it uses RPMs or something like that, then it might be very easy, but you didn't say.[/url]
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
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

Fedora Core 3 ... Redhat Linux
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

TFC wrote:Fedora Core 3 ... Redhat Linux
So I searched google for "installing php gd on fedora", and I got this page

It looks like you need to install the php-gd RPM, if you used Redhat's php RPM.
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
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

Ok.
I download your php version. and move as /www/htdocs/weathermap.
Then I run

Code: Select all

php weathermap.php
and i give that result:
[root@cacti-test weathermap]# php weathermap.php
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/gd.so' - /usr/lib/php4/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: dl(): Unable to load dynamic library '/usr/lib/php4/gd.so' - /usr/lib/php4/gd.so: cannot open shared object file: No such file or directory in /www/htdocs/weathermap/weathermap.php on line 10
PHP Warning: dl(): Unable to load dynamic library '/usr/lib/php4/gd.dll' - /usr/lib/php4/gd.dll: cannot open shared object file: No such file or directory in /www/htdocs/weathermap/weathermap.php on line 10
Content-type: text/html
X-Powered-By: PHP/4.3.11
But, my gd.so is located in
/usr/lib/php/extensions/gd.so
Unfortunately i have not gd.dll
SO, clearly problem is about gd.
Now problem is how can configure my php with gd module???
My php version is php-4.3.10.
AFTER THAT ...
I reconfigure my php and make, make install
Then i copy php.ini.dist as php.ini
After that I delete comma in php.ini:
extension=php_gd2.dll
then i run php weathermap.php
I give this:
[root@cacti-test weathermap]# /www/php/bin/php weathermap.php

Warning: fopen(weathermap.conf): failed to open stream: No such file or directory in /www/htdocs/weathermap/Weathermap.class.php on line 685
Couldn't open config file weathermap.conf for reading
is there any suggestion??
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

:oops: :oops: :oops:
I configure gd with
--prefix=/usr/local/gd
..
[root@cacti-test gd]# ls -la
total 24
drwxr-xr-x 5 root root 4096 Jun 16 15:57 .
drwxr-xr-x 18 root root 4096 Jun 16 15:57 ..
drwxr-xr-x 2 root root 4096 Jun 16 15:57 bin
drwxr-xr-x 2 root root 4096 Jun 16 15:57 include
drwxr-xr-x 2 root root 4096 Jun 16 15:57 lib
then
I reconfigure my phpwith
--with-gd=/usr/local/gd
after that
[root@cacti-test gd]# find / -name gd.so
/usr/lib/php/extensions/gd.so
After that:
i copied gd.so to /usr/lib/php4.
Then I run ./weathermap , here is the result:
[root@cacti-test weathermap]# ./weathermap.php
PHP Warning: Unknown(): (null): Unable to initialize module
Module compiled with module API=20041030, debug=0, thread-safety=0
PHP compiled with module API=20020429, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: dl(): (null): Unable to initialize module
Module compiled with module API=20041030, debug=0, thread-safety=0
PHP compiled with module API=20020429, debug=0, thread-safety=0
These options need to match
in /www/htdocs/weathermap/weathermap.php on line 10
PHP Warning: dl(): Unable to load dynamic library '/usr/lib/php4/gd.dll' - /usr/lib/php4/gd.dll: cannot open shared object file: No such file or directory in /www/htdocs/weathermap/weathermap.php on line 10
Content-type: text/html
X-Powered-By: PHP/4.3.11



No image (gd) extension was found, or could be loaded. This is required by weathermap.
then I check the my php
[root@cacti-test weathermap]# php -m
PHP Warning: Unknown(): (null): Unable to initialize module
Module compiled with module API=20041030, debug=0, thread-safety=0
PHP compiled with module API=20020429, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[PHP Modules]
bcmath
bz2
calendar
ctype
curl
dba
dbx
dio
exif
ftp
gettext
gmp
iconv
mime_magic
openssl
overload
pcre
posix
pspell
session
shmop
sockets
standard
sysvsem
sysvshm
tokenizer
wddx
xml
yp
zlib

[Zend Modules]
still I cant load gd module for php :( :(
I dont understand where the problem is
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

pHP Weathermap v0.5 pre-release out

Post by Howie »

Pre-release v0.5 is out now:
http://wotsit.thingy.com/haj/cacti/php-weathermap/

Mainly it's bugfixes including:
Getting the right most-recent value :oops:
Windows/RRD bugfixes
other smaller ones

Other new features are the ability to use non-Cacti RRD files, and also to specify decimal bandwidths, both in SCALE and BANDWIDTH.

Tested on RH9 and OS X as usual. Let me know if something's wrong.

Next stop: editor :lol:
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
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

OK i solve problem about php gd module. and download howie's php weathermap version 5
But another problem is here..
I rename example.conf as weathermap.conf
then I modify something in it.
I run command. And get this:
[root@cacti-test weathermap5]# ./weathermap.php
ERROR: opening 'davutpasa_1a_7206_traffic_in_23.rrd': No such file or directory
ReadData: Link davutpasa_1a_7206-maltepe_2d_7507 had no valid data
ERROR: opening 'data/sync_traffic_in_257.rrd': No such file or directory
ReadData: Link sync-site1 had no valid data

Warning: imagecreatefrompng(background.png): failed to open stream: No such file or directory in /www/htdocs/weathermap5/Weathermap.class.php on line 1068
Failed to open background image
As you see there is a "data" directory. where is it?
I think data folder is my rra folder. how can modify this?
And how can I solve background problem?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

TFC wrote: ERROR: opening 'data/sync_traffic_in_257.rrd': No such file or directory
ReadData: Link sync-site1 had no valid data

As you see there is a "data" directory. where is it?
I think data folder is my rra folder. how can modify this?
And how can I solve background problem?
The 'data' one is easy - you still have an example TARGET line from the example.conf. It is looking for a file that only exists on my Cacti system. Change the TARGET to be the rrd file that you want to use from your system :)

As for the background, is the background.png file in the same directory as you are running weathermap.php from?
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
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

Howie wrote:
TFC wrote: ERROR: opening 'data/sync_traffic_in_257.rrd': No such file or directory
ReadData: Link sync-site1 had no valid data

As you see there is a "data" directory. where is it?
I think data folder is my rra folder. how can modify this?
And how can I solve background problem?
The 'data' one is easy - you still have an example TARGET line from the example.conf. It is looking for a file that only exists on my Cacti system. Change the TARGET to be the rrd file that you want to use from your system :)

As for the background, is the background.png file in the same directory as you are running weathermap.php from?
I think I solve some problem like this:
Target is point my rra directory...OK
I copy background from your example to weathermap directory..OK
Last problem !!!
I run:
[root@cacti-test htdocs]# cd weathermap5/
[root@cacti-test weathermap5]# ./weathermap.php
then i go to using my browser:
http://X.X.X.X/weathermap5/weathermap.php
then I get a message:
#!/www/php/bin/php
Warning: imagepng() [function.imagepng]: Unable to open 'weathermap.png' for writing in /www/htdocs/weathermap5/Weathermap.class.php on line 1119
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

TFC wrote:
Howie wrote: I run:
[root@cacti-test htdocs]# cd weathermap5/
[root@cacti-test weathermap5]# ./weathermap.php
then i go to using my browser:
http://X.X.X.X/weathermap5/weathermap.php
then I get a message:
#!/www/php/bin/php
Warning: imagepng() [function.imagepng]: Unable to open 'weathermap.png' for writing in /www/htdocs/weathermap5/Weathermap.class.php on line 1119
That's because you shouldn't do that. The weathermap.php is not a normal php web page. If you want to have an HTML page to hold the PNG file, use the --htmloutput commandline option to produce an HTML file as well as the 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
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

so I have to advice this link to my customer?
http://X.X.X.X:/weathermap5/weathermap.png
is it correct?
and why dont see any arrow ?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

TFC wrote:so I have to advice this link to my customer?
http://X.X.X.X:/weathermap5/weathermap.png
is it correct?
It depends.

Yes, if you only want to have the image.

If you want to use the overlib HTML features (when you hold the mousepointer over a link, you see the cacti graph), then you'd need to add in some extra configuration (INFOURL and OVERLIBGRAPH for each link), and use the --htmloutput command-line option to produce an HTML file as well as a PNG. It's more effort, but the result is quite nice.
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!)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests