WeatherMap Not Updating

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

humanlock
Posts: 10
Joined: Fri Nov 13, 2009 3:32 am
Location: France

WeatherMap Not Updating

Post by humanlock »

Hi,

First, I apologize for my poor english, it is not my native language.

I have just updated and installed Cacti with WeatherMap.

I have start from a running Linux Box Debian Etch,

Then, I update it to Debian Lenny, remove the Cacti installed by apt-get, and install it manually from tar.

Every things works fine, Traffic from my router, and switch are correctly polled.

I've installed then the PA 2.5 and WeatherMap Plugin.

My poller is executed every 5 min, WeatherMap at the same time.

All the graph are nice no problem.

Now here is my trouble. Maps are generated without data.

So, I have modified some things for permission and use www-data as cacti users, change ownership of directory and try with the Forbiden Button.

It worked, but sometimes not. And I realise that the problem is present only If I tried to update map just after the poller.

If I update 2 min after, no problem. It's like data are not complete when you launch map generation just after the poller.

And, the best for the end, the CPU USAGE is not affected by this problem, onlye the network traffic. My Label are changing color correctly.


Do you have experienced any similar issue ?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Stop using the Rebuild Now option. Cacti will update the map by itself if your use the weathermap plugin.
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!)
humanlock
Posts: 10
Joined: Fri Nov 13, 2009 3:32 am
Location: France

Post by humanlock »

I aren't using it since severals days, I have purge the directory (remove all maps) and waiting.

I have no data for the link, but the CPU label is working.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

humanlock wrote:I aren't using it since severals days, I have purge the directory (remove all maps) and waiting.
OK.
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!)
Tommy_dk
Posts: 8
Joined: Wed Nov 18, 2009 4:45 pm

Post by Tommy_dk »

humanlock wrote:I aren't using it since severals days, I have purge the directory (remove all maps) and waiting.

I have no data for the link, but the CPU label is working.
Hello!

Just a quick heads up from someone who've used a fair amount of time trying to figure out the exact same thing on a Debian 5 (lenny) system: Why does the "Recalculate now" button work, but not when it is updated from the poller/cli?

Actually I don't have an answer to my own question .... 'cause I really don't know why Debian won't draw all the right link colors and other nifty things in my Weathermaps when it is not being updated from the web gui.

I've upgraded to the latest versions of php5 and php5-gd from http://www.dotdeb.org. I've installed the newest gd-lib (2.0.36) and I've run the script from Howie's weathermap plugin "check.php" - and it all says the same in both cli and via www: ALL OK! But it just doesn't work from the cli!

The way I've done this in Debian is to set the weathermap to never update the maps under "Settings" and instead i've created a new entry in my /etc/cron.d/cacti:

Code: Select all

*/5 * * * * /usr/bin/curl http://localhost/cacti/plugins/weathermap/weathermap-cacti-rebuild.php
This way the maps are being redrawn every 5 minutes via the gd-lib from the web-gui (mod_php) and not the non-working gd-lib from cli.

Off course you have to fix the above URL if it doesn't match your cacti's installation.

I hope this helps anyone that faced the same problem as I did.... :wink:

Regards,
Tommy
humanlock
Posts: 10
Joined: Fri Nov 13, 2009 3:32 am
Location: France

Post by humanlock »

Thank you for your answer,

I'll try it now.
Tommy_dk
Posts: 8
Joined: Wed Nov 18, 2009 4:45 pm

Post by Tommy_dk »

humanlock wrote:Thank you for your answer,

I'll try it now.
You are welcome.

Let me know how it goes.

/Tommy
humanlock
Posts: 10
Joined: Fri Nov 13, 2009 3:32 am
Location: France

Post by humanlock »

Code: Select all

mrtg:/usr/share/cacti/site/plugins/weathermap# /usr/bin/curl http://localhost/cacti/plugins/weathermap/weathermap-cacti-rebuild.php
Couldn't find a usable Cacti config<br />
<b>Warning</b>:  include_once(/database.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in <b>/usr/share/cacti/site/plugins/weathermap/setup.php</b> on line <b>233</b><br />
<br />
<b>Warning</b>:  include_once() [<a href='function.include'>function.include</a>]: Failed opening '/database.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in <b>/usr/share/cacti/site/plugins/weathermap/setup.php</b> on line <b>233</b><br />
<br />
<b>Fatal error</b>:  Call to undefined function read_config_option() in <b>/usr/share/cacti/site/plugins/weathermap/setup.php</b> on line <b>235</b><br />
Not Working.... So I tried with this one

Code: Select all

/usr/bin/curl http://localhost/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php?action=rebuildnow
And.... the authentication got me....

Code: Select all

<html>
<head>
        <title>Login to Cacti</title>
        <STYLE TYPE="text/css">
        <!--
                BODY, TABLE, TR, TD {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}
                A {text-decoration: none;}
                A:active { text-decoration: none;}
                A:hover {text-decoration: underline; color: #333333;}
                A:visited {color: Blue;}
        -->
        </style>
</head>
<body bgcolor="#FFFFFF" onload="document.login.login_username.focus()">
        <form name="login" method="post" action="weathermap-cacti-plugin-mgmt.php">
        <input type="hidden" name="action" value="login">
        <table align="center">
                <tr>
                        <td colspan="2"><center><img src="/images/auth_login.gif" border="0" alt=""></center></td>
                </tr>

                <tr height="10"><td></td></tr>
                <tr>
                        <td colspan="2">Please enter your Cacti user name and password below:</td>
                </tr>
                <tr height="10"><td></td></tr>
                <tr>
                        <td>User Name:</td>
                        <td><input type="text" name="login_username" size="40" style="width: 295px;" value=""></td>
                </tr>
                <tr>
                        <td>Password:</td>
                        <td><input type="password" name="login_password" size="40" style="width: 295px;"></td>
                </tr>
                                <tr height="10"><td></td></tr>
                <tr>
                        <td><input type="submit" value="Login"></td>
                </tr>
        </table>
        </form>
</body>
</html>
I'm still looking for another manner to make that works....
humanlock
Posts: 10
Joined: Fri Nov 13, 2009 3:32 am
Location: France

Post by humanlock »

Edit : I am wrong, even with the poller, the value are correct, but the drawing doesn't work


Lauched by the button

Code: Select all

11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:359] [Map 1] oc3-fr-dc-01.conf: RRD ReadData: traditional style
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:399] [Map 1] oc3-fr-dc-01.conf: RRD ReadData: Running: /usr/bin/rrdtool fetch /usr/share/cacti/site/rra/core1_traffic_in_801.rrd AVERAGE --start now-800 --end now
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] oc3-fr-dc-01.conf: > 1258623600: 4.6610777732e+05 2.6843193810e+03
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] oc3-fr-dc-01.conf: > 1258623900: 4.6610777732e+05 2.6843193810e+03
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] oc3-fr-dc-01.conf: > 1258624200: 4.7161814747e+05 2.6998169046e+03
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] oc3-fr-dc-01.conf: > 1258624500: nan nan
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] oc3-fr-dc-01.conf: >
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:427] [Map 1] oc3-fr-dc-01.conf: RRD ReadData: Read 5 lines from rrdtool
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:428] [Map 1] oc3-fr-dc-01.conf: RRD ReadData: Headings are:                      traffic_in         traffic_out
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:437] [Map 1] oc3-fr-dc-01.conf: --
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:437] [Map 1] oc3-fr-dc-01.conf: --1258624500: nan nan
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:437] [Map 1] oc3-fr-dc-01.conf: --1258624200: 4.7161814747e+05 2.6998169046e+03
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:458] [Map 1] oc3-fr-dc-01.conf: 4.7161814747e+05 is OK value for traffic_in
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:458] [Map 1] oc3-fr-dc-01.conf: 2.6998169046e+03 is OK value for traffic_out
Launched by the poller

Code: Select all

11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:492] [Map 1] oc3-fr-dc-01.conf: RRD ReadDataFromRealRRD: Returning (4,5630702333e+05,2,2208223333e+03,1258624500)
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:458] [Map 1] oc3-fr-dc-01.conf: 2,2208223333e+03 is OK value for traffic_out
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:458] [Map 1] oc3-fr-dc-01.conf: 4,5630702333e+05 is OK value for traffic_in
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:437] [Map 1] oc3-fr-dc-01.conf: --1258624500: 4,5630702333e+05 2,2208223333e+03
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:437] [Map 1] oc3-fr-dc-01.conf: --1258624800: nan nan
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:437] [Map 1] oc3-fr-dc-01.conf: --
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:428] [Map 1] oc3-fr-dc-01.conf: RRD ReadData: Headings are: traffic_in traffic_out
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:427] [Map 1] oc3-fr-dc-01.conf: RRD ReadData: Read 5 lines from rrdtool
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] oc3-fr-dc-01.conf: >
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] oc3-fr-dc-01.conf: > 1258624800: nan nan
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] oc3-fr-dc-01.conf: > 1258624500: 4,5630702333e+05 2,2208223333e+03
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] oc3-fr-dc-01.conf: > 1258624200: 4,7161814747e+05 2,6998169046e+03
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] oc3-fr-dc-01.conf: > 1258623900: 4,6610777732e+05 2,6843193810e+03
11/19/2009 10:55:52 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:399] [Map 1] oc3-fr-dc-01.conf: RRD ReadData: Running: /usr/bin/rrdtool fetch /usr/share/cacti/site/rra/core1_traffic_in_801.rrd AVERAGE 
Trying to find some difference between this two method....Something should be wrong somewhere.[/code]
Tommy_dk
Posts: 8
Joined: Wed Nov 18, 2009 4:45 pm

Post by Tommy_dk »

You need to edit your file weathermap-cacti-rebuild.php in the weathermap directory. In the file you need to set the correct $cacti_base according to your installation.

Mine is:

Code: Select all

$cacti_base = "/usr/share/cacti/site/";
You probably can't see any difference in the output between CLI and GUI. At least I couldn't.
humanlock
Posts: 10
Joined: Fri Nov 13, 2009 3:32 am
Location: France

Post by humanlock »

I found one !

I got it... It's not the library... but... Check the value return, major difference between the button, and the poller :

Launched by the poller
11/19/2009 11:05:58 AM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:837] [Map 1] oc3-fr-dc-01.conf: ReadData complete for LINK CORE-1-AS3215: 40 16
11/19/2009 11:05:58 AM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:831] [Map 1] oc3-fr-dc-01.conf: DataTime MINMAX: 1258625100 -> 1258625100
11/19/2009 11:05:58 AM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:824] [Map 1] oc3-fr-dc-01.conf: Aggregate so far: 40 16
11/19/2009 11:05:58 AM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_rrd.php:641] [Map 1] oc3-fr-dc-01.conf: RRD ReadData: Returning (40,16,1258625100)
11/19/2009 11:05:58 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:492] [Map 1] oc3-fr-dc-01.conf: RRD ReadDataFromRealRRD: Returning (5,3692278713e+05,2,5834688116e+06,1258625100)
And here, launched by the button :
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_rrd.php:641] [Map 1] oc3-fr-dc-01.conf: RRD ReadData: Returning (5023491.36792,16691471.208,1258624200)
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:824] [Map 1] oc3-fr-dc-01.conf: Aggregate so far: 5023491.36792 16691471.208
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:831] [Map 1] oc3-fr-dc-01.conf: DataTime MINMAX: 1258624200 -> 1258624200
11/19/2009 10:53:17 AM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:837] [Map 1] oc3-fr-dc-01.conf: ReadData complete for LINK CORE-1-AS3215: 5023491.36792 16691471.208
What does that mean ?
humanlock
Posts: 10
Joined: Fri Nov 13, 2009 3:32 am
Location: France

Post by humanlock »

Tommy_dk wrote:You need to edit your file weathermap-cacti-rebuild.php in the weathermap directory. In the file you need to set the correct $cacti_base according to your installation.

Mine is:

Code: Select all

$cacti_base = "/usr/share/cacti/site/";
You probably can't see any difference in the output between CLI and GUI. At least I couldn't.
Ok it's working now !

Thks for your help....

But, I will search around this problem....
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Tommy_dk wrote:Actually I don't have an answer to my own question .... 'cause I really don't know why Debian won't draw all the right link colors and other nifty things in my Weathermaps when it is not being updated from the web gui.
This sounds like you just need to check the cacti.log - if it's not collecting data, you'll be getting errors about that of some kind.
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!)
Tommy_dk
Posts: 8
Joined: Wed Nov 18, 2009 4:45 pm

Post by Tommy_dk »

Howie wrote:This sounds like you just need to check the cacti.log - if it's not collecting data, you'll be getting errors about that of some kind.
I get the same output when run from GUI and CLI. As i can see they both collect the data from the rrd-files correct.

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

Post by Howie »

Tommy_dk wrote:
Howie wrote:This sounds like you just need to check the cacti.log - if it's not collecting data, you'll be getting errors about that of some kind.
I get the same output when run from GUI and CLI. As i can see they both collect the data from the rrd-files correct.

/Tommy
And neither colour the link? :-? Could you paste the config for one of those links please?
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