Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


I cannot get weathermap to work
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map)
Author Message
abdulcc
Cacti User


Joined: 14 Jul 2006
Posts: 52

PostPosted: Fri Oct 26, 2007 7:56 am    Post subject: I cannot get weathermap to work Reply with quote

I am using weathermap 0.93 with cacti

Host Information
Cacti Version 0.8.7
Plugin Architecture 1.2
Poller Type CMD.php
Server Info Linux 2.6.22.9-61.fc6
Web Server Apache/2.2.6 (Fedora)
PHP Version 5.1.6
PHP Extensions libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, SimpleXML, sockets, SPL, shmop, session, Reflection, pspell, posix, mime_magic, iconv, hash, gmp, gettext, ftp, exif, date, curl, ctype, calendar, bz2, zlib, pcre, openssl, apache2handler, gd, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, snmp
MySQL Version 5.0.27
RRDTool Version 1.2.23
SNMP Version 5.3.1
Plugins Host Info (hostinfo - v0.1)
Global Plugin Settings (settings - v0.2)
Network Tools (tools - v0.2)
Update Checker (update - v0.3)
Thresholds (thold - v0.3.5.2)
PHP Network Weathermap (weathermap - v0.93)
IP subnet Calculator IPv4 IPv6 (ipsubnet - v.4c)



This is the content of my weathermap-cacti-plugin.php and I remove the
^M, the page does not apear

<?php^M
^M
chdir('../../');^M
include_once("./include/auth.php");^M
include_once("./include/config.php");^M
^M
include_once($config["library_path"] . "/database.php");^M
^M
$weathermap_confdir = realpath(dirname(__FILE__).'/configs');^M

// include the weathermap class so that we can get the version
include_once(dirname(__FILE__)."/Weathermap.class.php");

^M
$action = "";^M
if (isset($_POST['action'])) {^M
$action = $_POST['action'];^M
} else if (isset($_GET['action'])) {^M
$action = $_GET['action'];^M
}^M
^M
switch ($action) {^M
case 'perms_add_user':^M
if( isset($_REQUEST['mapid']) && is_numeric($_REQUEST['mapid'])^M
&& isset($_REQUEST['userid']) && is_numeric($_REQUEST['userid'])^M
)^M
{^M
perms_add_user($_REQUEST['mapid'],$_REQUEST['userid']);^M
header("Location: weathermap-cacti-plugin-mgmt.php?action=perms_edit&id=".$_REQUEST['mapid']);^M
}^M
break;^M
case 'perms_delete_user':^M
if( isset($_REQUEST['mapid']) && is_numeric($_REQUEST['mapid'])^M
&& isset($_REQUEST['userid']) && is_numeric($_REQUEST['userid'])^M
)^M
{^M
perms_delete_user($_REQUEST['mapid'],$_REQUEST['userid']);^M
header("Location: weathermap-cacti-plugin-mgmt.php?action=perms_edit&id=".$_REQUEST['mapid']);^M
}^M
break;^M
case 'perms_edit':^M
if( isset($_REQUEST['id']) && is_numeric($_REQUEST['id']) )^M
{^M
include_once($config["base_path"]."/include/top_header.php");^M
perms_list($_REQUEST['id']);^M
include_once($config["base_path"]."/include/bottom_footer.php");^M
}^M
else^M
{^M
print "Something got lost back there.";^M





What is wrong with my settings? Please help
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2167
Location: United Kingdom

PostPosted: Fri Oct 26, 2007 8:25 am    Post subject: Reply with quote

Does http://www.yourhost.com/cacti/plugins/check.php show anything?
Back to top
abdulcc
Cacti User


Joined: 14 Jul 2006
Posts: 52

PostPosted: Fri Oct 26, 2007 9:18 am    Post subject: Yes it does Reply with quote

This is the PHP version that is responsible for

* The web-based editor
* Building maps with Rebuild Now from Cacti

This is PHP Version 5.1.6 running on "Linux syslog.ikatelnet.net 2.6.22.9-61.fc6 #1 SMP Thu Sep 27 17:45:57 EDT 2007 i686" with a memory_limit of '32M'.

The php.ini file was /etc/php.ini

The following additional ini files were read: /etc/php.d/gd.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/snmp.ini
PHP Functions

Some parts of Weathermap need special support in your PHP installation to work.
This PHP uses the 'bundled' GD library, which doesn't have alpha-blending bugs. That's good!
imagepng() YES
imagecreatetruecolor() YES
imagealphablending() YES
imageSaveAlpha() YES
preg_match() YES
imagecreatefrompng() YES
imagecreatefromjpeg() YES
imagecreatefromgif() YES
imagejpeg() YES
imagegif() YES
imagecopyresampled() YES
imagettfbbox() YES
memory_get_usage() YES
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2167
Location: United Kingdom

PostPosted: Fri Oct 26, 2007 9:27 am    Post subject: Reply with quote

OK. That seems alright.

I'm a bit puzzled by all the ^Ms though. Are you unpacking this on DOS and then FTPing it in binary mode or something?

Best to unzip on the server if you can, or upload the .php files (only) in ASCII mode.
Back to top
abdulcc
Cacti User


Joined: 14 Jul 2006
Posts: 52

PostPosted: Fri Oct 26, 2007 9:38 am    Post subject: I have unzipped on windows Reply with quote

I have unzipped on windows


I run [root@syslog weathermap]# php ./weathermap --config configs/simple.conf --debug

------------------------------------
Starting PHP-Weathermap run, with config: configs/simple.conf
Failed to load ttf font Vera - at config line 6
[WMWARN30]Setting bandwidth (100 -> 100 bps, 100 -> 100 bps, KILO = 1000)
Saving Default Node: DEFAULT
Setting bandwidth (1M -> 1000000 bps, 1M -> 1000000 bps, KILO = 1000)
Saving Default Link: DEFAULT
Saving Node: node1
Saving Node: node2
Saving Node: node
Saving Link: node1-node2
Setting bandwidth (2M -> 2000000 bps, 2M -> 2000000 bps, KILO = 1000)
Saving Link: node2-node
Already have 7 scales, no defaults added.
Cycle 100 - set 0 and Skipped 0 for unresolved dependencies
Running Pre-Processing Plugins...
Running WeatherMapPreProcessorTest->run()
Test Preprocessor in the hizouse
Finished Pre-Processing Plugins...
Running Init() for Data Source Plugins...
Running WeatherMapDataSource_rrd->Init()
RRD DS: Can't find RRDTOOL. Check line 29 of the 'weathermap' script.
RRD-based TARGETs will fail. [WMRRD02]
Removing WeatherMapDataSource_rrd from Data Source list, since Init() failed
Running WeatherMapDataSource_static->Init()
Running WeatherMapDataSource_mrtg->Init()
Running WeatherMapDataSource_external->Init()
Running WeatherMapDataSource_tabfile->Init()
Running WeatherMapDataSource_snmp->Init()
Running WeatherMapDataSource_cactihost->Init()
ReadData CactiHost: Can only run from Cacti environment.
Removing WeatherMapDataSource_cactihost from Data Source list, since Init() failed
Running WeatherMapDataSource_dbsample->Init()
Finished Initialising Plugins...
================== ReadData: Updating link data for all links and nodes


ReadData for LINK node1-node2:
ReadData: New Target: static:20M:10M
ReadData: Matched for WeatherMapDataSource_static. Calling WeatherMapDataSource_static->ReadData()
Static ReadData: Returning (20000000,10000000,1193409305)
ColourFromPercent: Clipped node1-node2 2000% to 100%
ColourFromPercent: Clipped node1-node2 1000% to 100%
ReadData: Setting 20000000,10000000


ReadData for LINK node2-node:
ReadData: No targets for LINK node2-node
ReadData: Setting 0,0


ReadData for NODE node1:
ReadData: No targets for NODE node1
ReadData: Setting 0,0


ReadData for NODE node2:
ReadData: No targets for NODE node2
ReadData: Setting 0,0


ReadData for NODE node:
ReadData: No targets for NODE node
ReadData: Setting 0,0

ReadData Completed.
--------------
Running Post-Processing Plugins...
Running WeatherMapPostProcessorTest->run()
WeatherMapPostProcessorTest Not Enabled
Finished Post-Processing Plugins...
Your background image file could not be read. Check the filename, and permissions, for images/fresh.png
AllocateScaleColours: DEFAULT KEYTEXT (0,0,0)
AllocateScaleColours: DEFAULT KEYBG (255,255,255)
AllocateScaleColours: DEFAULT BG (255,255,255)
AllocateScaleColours: DEFAULT TITLE (0,0,0)
AllocateScaleColours: DEFAULT TIME (0,0,0)
AllocateScaleColours: DEFAULT 1_10 (140,0,255)
AllocateScaleColours: DEFAULT 10_25 (32,32,255)
AllocateScaleColours: DEFAULT 25_40 (0,192,255)
AllocateScaleColours: DEFAULT 40_55 (0,240,0)
AllocateScaleColours: DEFAULT 55_70 (240,240,0)
AllocateScaleColours: DEFAULT 70_85 (255,192,0)
AllocateScaleColours: DEFAULT 85_100 (255,0,0)
Using a non-existent special font (100) - falling back to internal GD fonts
Node->pre_render: Label Metrics are: 54 x 15 -> 58 x 19
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Using a non-existent special font (100) - falling back to internal GD fonts
Node->pre_render: Label Metrics are: 54 x 15 -> 58 x 19
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Using a non-existent special font (100) - falling back to internal GD fonts
Node->pre_render: Label Metrics are: 54 x 15 -> 58 x 19
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
ColourFromPercent: Clipped node1-node2 2000% to 100%
ColourFromPercent: Clipped node1-node2 1000% to 100%
Adding Poly imagemap for LINK:node1-node2:1
Adding Poly imagemap for LINK:node1-node2:0
Bandwidth is 20000000
Using a non-existent special font (100) - falling back to internal GD fonts
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Bandwidth is 10000000
Using a non-existent special font (100) - falling back to internal GD fonts
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Adding Poly imagemap for LINK:node2-node:1
Adding Poly imagemap for LINK:node2-node:0
Bandwidth is 0
Using a non-existent special font (100) - falling back to internal GD fonts
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Bandwidth is 0
Using a non-existent special font (100) - falling back to internal GD fonts
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Drawing KEY for DEFAULT if necessary.
Drawing 7 colours into SCALE
Using a non-existent special font (100) - falling back to internal GD fonts
Using a non-existent special font (100) - falling back to internal GD fonts
Using a non-existent special font (100) - falling back to internal GD fonts
AllocateScaleColours: DEFAULT KEYTEXT (0,0,0)
AllocateScaleColours: DEFAULT KEYBG (255,255,255)
AllocateScaleColours: DEFAULT BG (255,255,255)
AllocateScaleColours: DEFAULT TITLE (0,0,0)
AllocateScaleColours: DEFAULT TIME (0,0,0)
AllocateScaleColours: DEFAULT 1_10 (140,0,255)
AllocateScaleColours: DEFAULT 10_25 (32,32,255)
AllocateScaleColours: DEFAULT 25_40 (0,192,255)
AllocateScaleColours: DEFAULT 40_55 (0,240,0)
AllocateScaleColours: DEFAULT 55_70 (240,240,0)
AllocateScaleColours: DEFAULT 70_85 (255,192,0)
AllocateScaleColours: DEFAULT 85_100 (255,0,0)
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
Writing PNG file to weathermap.png


which seems ok. How do I get the http://10.1.12.2/cacti/plugins/weathermap/weathermap-cacti-plugin.php to show the page It just created

Thanks
Back to top
abdulcc
Cacti User


Joined: 14 Jul 2006
Posts: 52

PostPosted: Fri Oct 26, 2007 9:47 am    Post subject: also when I run poller .php Reply with quote

It does not seem to be running the weathermap plugin

Is that normal?
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2167
Location: United Kingdom

PostPosted: Fri Oct 26, 2007 10:05 am    Post subject: Re: also when I run poller .php Reply with quote

abdulcc wrote:
It does not seem to be running the weathermap plugin

Is that normal?


But you DO get the Weathermap tab?
Back to top
abdulcc
Cacti User


Joined: 14 Jul 2006
Posts: 52

PostPosted: Fri Oct 26, 2007 10:06 am    Post subject: Yes Reply with quote

I get the weathermap tab but I see no picture of the map I created
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2167
Location: United Kingdom

PostPosted: Fri Oct 26, 2007 10:22 am    Post subject: Reply with quote

abdulcc wrote:
I get the weathermap tab but I see no picture of the map I created


The map you created with the command-line tool will never appear in the Cacti tab. You should go to the Weathermaps option in Cacti's Manage menu, and add the config in there. Then Cacti's poller will create the map for you, once every five minutes.
Back to top
abdulcc
Cacti User


Joined: 14 Jul 2006
Posts: 52

PostPosted: Fri Oct 26, 2007 10:33 am    Post subject: I have a map created under simple.Conf Reply with quote

I can view and edit it with the weathermap menu in cacti.


But it does not run in my poller

Regards
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2167
Location: United Kingdom

PostPosted: Fri Oct 26, 2007 10:35 am    Post subject: Re: I have a map created under simple.Conf Reply with quote

abdulcc wrote:
I can view and edit it with the weathermap menu in cacti.


But it does not run in my poller

Regards


And what do you see in the cacti.log file?
Back to top
abdulcc
Cacti User


Joined: 14 Jul 2006
Posts: 52

PostPosted: Fri Oct 26, 2007 10:43 am    Post subject: I get a lot of logs Reply with quote

But no logs for weathermap

What Files do I need to edit in the weathermap directory?



0/26/2007 03:40:54 PM - SYSTEM STATS: Time:8.2392 Method:cmd.php Processes:1 Threads:N/A Hosts:23 HostsPerProcess:23 DataSources:901 RRDsProcessed:482
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc1sup2_5min_cpu_437.rrd --template 5min_cpu 1193413252:52
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup1_traffic_in_380.rrd --template traffic_out:traffic_in 1193413253:3897103021:1127699122
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup1_traffic_in_381.rrd --template traffic_out:traffic_in 1193413253:3530191200:2134415060
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup1_traffic_in_382.rrd --template traffic_out:traffic_in 1193413253:3239110877:3963519165
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup1_traffic_in_383.rrd --template traffic_out:traffic_in 1193413253:0:0
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup1_traffic_in_384.rrd --template traffic_out:traffic_in 1193413253:2026757130:3249884932
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup1_5min_cpu_438.rrd --template 5min_cpu 1193413253:22
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_385.rrd --template traffic_out:traffic_in 1193413253:754894893:4214802689
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_386.rrd --template traffic_out:traffic_in 1193413253:2873742804:582551202
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_387.rrd --template traffic_out:traffic_in 1193413253:1029850731:4134602686
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_388.rrd --template traffic_out:traffic_in 1193413253:1742592444:2569362973
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_389.rrd --template traffic_out:traffic_in 1193413253:551169832:1764596144
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_390.rrd --template traffic_out:traffic_in 1193413253:0:0
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_391.rrd --template traffic_out:traffic_in 1193413253:3956876:3418591
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_392.rrd --template traffic_out:traffic_in 1193413253:1178123257:4175504884
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_393.rrd --template traffic_out:traffic_in 1193413253:794729129:3132562697
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc1sup2_traffic_in_379.rrd --template traffic_in:traffic_out 1193413252:3234362265:3966597206
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_394.rrd --template traffic_out:traffic_in 1193413253:477274535:1589540962
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_395.rrd --template traffic_out:traffic_in 1193413253:0:2937695172
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_396.rrd --template traffic_out:traffic_in 1193413253:1793969808:1546721089
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_397.rrd --template traffic_out:traffic_in 1193413253:0:0
10/26/2007 03:40:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/msc2sup2_traffic_in_398.rrd --template traffic_out:traffic_in 1193413253:1444756619:298022666
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2167
Location: United Kingdom

PostPosted: Fri Oct 26, 2007 10:49 am    Post subject: Reply with quote

You don't need to edit any files.

You should always see at least 1 or 2 lines with WEATHERMAP in the log. I can't think of a reason why you wouldn't, if the weathermap plugin is enabled. And it must be enabled, or you would not see the tab.
Back to top
abdulcc
Cacti User


Joined: 14 Jul 2006
Posts: 52

PostPosted: Fri Oct 26, 2007 11:13 am    Post subject: I do sometime have blank lines in my log file Reply with quote

but it does not show more

I have thold plugin working with alarms
Back to top
abdulcc
Cacti User


Joined: 14 Jul 2006
Posts: 52

PostPosted: Fri Oct 26, 2007 11:16 am    Post subject: I found something Reply with quote

10/26/2007 04:14:35 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update weathermap_maps set sortorder=id where sortorder is null or sortorder=0;"
10/26/2007 04:14:35 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update weathermap_maps set sortorder=id where sortorder is null;"
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map) All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group