Undefined index in setup.php - Weathermap 0.96a

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
Dwarf
Posts: 14
Joined: Wed Jul 09, 2008 2:38 am

Undefined index in setup.php - Weathermap 0.96a

Post by Dwarf »

Hello there,

I tried to find a topic with the same problem but didn't find it.

I use cacti 0.8.7c with PIA 2.3 and Weathermap 0.96a.

My maps are only automatically updated if I use the option rrd_use_poller_output 1 into my config files.

If I don't use this option, the maps are created but all links indicate 0.00%

With this option, the weathermap process updates my maps automatically when the cacti poller runs, but I've got some 'Notice' into the logs with undefined indexes.

[quote]Notice: Undefined index: /var/www/cacti-dev/rra/ugitech-sw-catalyst-4507_traffic_in_1756.rrd in /var/www/cacti-dev/plugins/weathermap/setup.php on line 621
Notice: Undefined index: /var/www/cacti-dev/rra/ugitech-sw-catalyst-4507_traffic_in_1756.rrd in /var/www/cacti-dev/plugins/weathermap/setup.php on line 621
Notice: Undefined index: /var/www/cacti-dev/rra/sw-bourg-1_traffic_in_1700.rrd in /var/www/cacti-dev/plugins/weathermap/setup.php on line 621
Notice: Undefined index: /var/www/cacti-dev/rra/sw-bourg-1_traffic_in_1700.rrd in /var/www/cacti-dev/plugins/weathermap/setup.php on line 621
Notice: Undefined index: /var/www/cacti-dev/rra/sw-brionne-1_traffic_in_1720.rrd in /var/www/cacti-dev/plugins/weathermap/setup.php on line 621
Notice: Undefined index: /var/www/cacti-dev/rra/sw-brionne-1_traffic_in_1720.rrd in /var/www/cacti-dev/plugins/weathermap/setup.php on line 621
Notice: Undefined index: /var/www/cacti-dev/rra/sw-brionne-1_traffic_in_1721.rrd in /var/www/cacti-dev/plugins/weathermap/setup.php on line 621
Notice: Undefined index: /var/www/cacti-dev/rra/sw-brionne-1_traffic_in_1721.rrd in /var/www/cacti-dev/plugins/weathermap/setup.php on line 621
Notice: Undefined index: /var/www/cacti-dev/rra/sw-grigny-3_traffic_in_1719.rrd in /var/www/cacti-dev/plugins/weathermap/setup.php on line 621
Notice: Undefined index: /var/www/cacti-dev/rra/sw-grigny-3_traffic_in_1719.rrd in /var/www/cacti-dev/plugins/weathermap/setup.php on line 621
etc... [/quote]


Each line comes 2 times.

The maps seem to be OK, I can see the different colors on the links.


If I remove the 'rrd_use_poller_output' option from my config files and empty the 'weathermap_data' table into the Cacti mysql DB, theses notice messages disappear, but the links in the maps are not correctly calculated

Have you got any ideas for theses messages ?

What about my issue if I don't use the option 'rrd_use_poller_output' ?

thx.

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

Post by Howie »

I don't know why you should get different results unless you are using some strange rrd settings, or trying to produce maps for some time in the past. With poller_output, weathermap is doing the calculations itself, and without it, rrdtool is providing the data. I would look at DEBUG output and look for lines with ReadData in them. Then you can see what rrdtool is returning.

The other problem (undefined index) is more simple... please try replacing the line on line 621 of setup.php with this one:

Code: Select all

if( isset($rrd_update_array[$file]) && is_array($rrd_update_array[$file]) && isset($rrd_update_array[$file]['times']) && is_array($rrd_update_array[$file]['times']) && isset( $rrd_update_array{$file}['times'][key($rrd_update_array[$file]['times'])]{$dsname} ) )
hopefully that should be enough checking to stop the warning.
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!)
Dwarf
Posts: 14
Joined: Wed Jul 09, 2008 2:38 am

Post by Dwarf »

Hi Howie,

Thanks for your answer.


I'll try your fix for the "setup.php" file and let you know if the problem is solved.

Regards,

Dwarf
Dwarf
Posts: 14
Joined: Wed Jul 09, 2008 2:38 am

Post by Dwarf »

Hi there,

Just a little message to say that your fix solved the problem for the logs.

They are now clean of any "Notice" messages.

Thanks !



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

Post by Howie »

Cool :-)

So how about the different values part?
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!)
Dwarf
Posts: 14
Joined: Wed Jul 09, 2008 2:38 am

Post by Dwarf »

I got some other problems with another plugin.. so didn't test yet.

For the moment I leave the option "rrd_use_poller_output" into my config files, because it works like that.

When I got some time, I'll test this part and come back here :)


Dwarf
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests