[SOLVED] Problems with Weathermaps 0.95b with Config. Files

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

[SOLVED] Problems with Weathermaps 0.95b with Config. Files

Post by Lonlie »

Hello,

I would like to use the "example.conf" but when i click on "add" in the menu "Available Weathermap Configuration Files", i have this :

Warning: Invalid argument supplied for foreach() in C:\Apache2.2\htdocs\cacti\plugins\weathermap\weathermap-cacti-plugin-mgmt.php on line 165

Warning: Cannot modify header information - headers already sent by (output started at C:\Apache2.2\htdocs\cacti\plugins\weathermap\weathermap-cacti-plugin-mgmt.php:165) in C:\Apache2.2\htdocs\cacti\plugins\weathermap\weathermap-cacti-plugin-mgmt.php on line 105
Last edited by Lonlie on Mon Jun 16, 2008 3:34 am, edited 1 time in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Ooops. There's something making an assumption that's incorrect there. :oops:

However, I believe that it should still have added the map, if you check back in the management list?

(I'll fix the problem for 0.96 - I'm not sure why you have it and no-one else has had though)
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!)
Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

Post by Lonlie »

In the management list, i have "No Weathermaps Configured" .....
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Hmm. Do you have a weathermap_maps table in your cacti database?
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!)
Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

Post by Lonlie »

I don't have a weathermap_maps table in my cacti database.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Then the database creation stuff didn't work. Does the cacti database user have permission to create tables?
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!)
Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

Post by Lonlie »

Sorry, i think i didn't understand very well the next to last question ...
When you talk about "cacti database", you want to know if i have a computer tab "weathermap" in cacti ?

Yes i have.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Lonlie wrote:Sorry, i think i didn't understand very well the next to last question ...
When you talk about "cacti database", you want to know if i have a computer tab "weathermap" in cacti ?

Yes i have.
No, I meant in your Cacti mysql database - have a look with phpMyAdmin or whatever tool you use to admin your mysql.

In your cacti configuration, you created a mysql user called something like 'cacti' or 'cactiuser', and created the cacti mysql database, and then allowed that user to access the new database. Can that user also create tables?

Weathermap creates 3 or 4 tables when you install it. It looks like it was unable to do that in your system. So, do you have any tables called weathermap_(something) in your cacti database?
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!)
Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

Post by Lonlie »

Howie wrote:
No, I meant in your Cacti mysql database - have a look with phpMyAdmin or whatever tool you use to admin your mysql.

In your cacti configuration, you created a mysql user called something like 'cacti' or 'cactiuser', and created the cacti mysql database, and then allowed that user to access the new database. Can that user also create tables?
Yes I can.

Howie wrote: Weathermap creates 3 or 4 tables when you install it. It looks like it was unable to do that in your system. So, do you have any tables called weathermap_(something) in your cacti database?
No I haven't. To install Weathermap, I just put the Weathermap folder in Plugins folder, and in "User Management", I activated the plugins.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

That should be enough. The plugin creates the tables itself.

In your case, for some reason it didn't.

Some people have trouble with MySQL in 'strict mode', but that only affects one of the tables, not all of them. If you don't have weathermap_data, weathermap_maps, or weathermap_auth, then I would still guess that your cacti user is unable to create tables.

Have a look in cacti.log to see if there are any errors related to weathermap, I guess. If not, check your mysql error log.
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!)
Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

Post by Lonlie »

Correction : I have an other problem but not with the plugin. When i create a new host, and i want to save this, i have the message :
"Error: Save Failed."

I do nothing with my computer, and in the "Cacti log File" i have this :

06/12/2008 04:14:17 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null or sortorder=0;'
06/12/2008 04:14:17 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set filehash=LEFT(MD5(concat(id,configfile,rand())),20) where filehash = '';'
06/12/2008 04:14:17 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1101', SQL:"CREATE TABLE weathermap_maps ( id int(11) NOT NULL auto_increment, sortorder int(11) NOT NULL default 0, active set('on','off') NOT NULL default 'on', configfile text NOT NULL, imagefile text NOT NULL, htmlfile text NOT NULL, titlecache text NOT NULL, filehash varchar (40) NOT NULL default '', warncount int(11) NOT NULL default 0, config text NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM;'
06/12/2008 04:14:17 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null;'

I have this message each 30 seconds.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

And in the mysql log? You might get a clue why it is happening from there.
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!)
Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

Post by Lonlie »

I observed that :
When i put in comment all my plugins in the global.php , i can create a new host , save amendments ...
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Uncomment one by one then, to see which one is the problem.
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!)
Lonlie
Posts: 23
Joined: Thu Jun 05, 2008 3:36 am
Location: France

Post by Lonlie »

I uncommented one by one, but the problem is resolved when I comment all plugins. So I think that when I enable a plugin like "Superlinks", the plugin works. but when i want to modify cacti, like to create a new host or like to save modifications, it doesn't work ....
Then, when i enable "weathermaps" plugin, the plugin doesn't work and i can't modify cacti.

I think there is a problem when i modify the cacti database, i can't save the modifications when I use plugins ...
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests