How to read this value in the weathermap????

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
polletj
Cacti User
Posts: 54
Joined: Wed Aug 30, 2006 1:18 am
Location: Antwerp/Belgium

How to read this value in the weathermap????

Post by polletj »

Sounds stupid but what is now the actual value for this

478.9K

This is shown in the traffic label of the link.

Actual traffic on that link is 4789000 Bits/s

I would expect to read one of the following values:

4789000
4789K
4,789M

Is this my bug or weathermap bug?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: How to read this value in the weathermap????

Post by Howie »

polletj wrote:Sounds stupid but what is now the actual value for this

478.9K

This is shown in the traffic label of the link.

Actual traffic on that link is 4789000 Bits/s

I would expect to read one of the following values:

4789000
4789K
4,789M

Is this my bug or weathermap bug?
How do you know it's 4789000? I agree that should show as 4789K...

If you are getting data from an rrd file, then weathermap will be multiplying values by 8, since it assumes that they are from a standard SNMP byte-counter. If you have some unusual piece of kit where the counters are truly bits-per-second, then you would get values that are out by a factor of 8, but not 10... :-?
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!)
polletj
Cacti User
Posts: 54
Joined: Wed Aug 30, 2006 1:18 am
Location: Antwerp/Belgium

Post by polletj »

:oops:

Well value read from graph is 4789000.

I leave the bits and bytes for what they are.

Do not take into account only the value.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

polletj wrote: Well value read from graph is 4789000.

I leave the bits and bytes for what they are.

Do not take into account only the value.
Fair enough. Do you believe the graph is correct then? I don't know of any bugs in this part of weathermap, but I'm happy to look if you think it's definitely a 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!)
polletj
Cacti User
Posts: 54
Joined: Wed Aug 30, 2006 1:18 am
Location: Antwerp/Belgium

Post by polletj »

Howie,

As it's still early in the morning, just went out in the snow...
to wake up a bit.... :lol:

The value represented in the traffic graph is multiplied by 8 to get the
bits/s.

So the same is done for the weathermap.

Then I assume the values should be the same right?

eg in the graph showing 4789000 should be represented in the weathermap
as either:

4789000
4789K
4,789M (, is used in Belgium)


Correct me if i'm wrong.

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

Post by Howie »

polletj wrote:As it's still early in the morning, just went out in the snow...
to wake up a bit.... :lol:
Yeah, I was blessed with white stuff today too. :-)
polletj wrote: The value represented in the traffic graph is multiplied by 8 to get the
bits/s.

So the same is done for the weathermap.

Then I assume the values should be the same right?
Usually, yes. Unless you are using a funny graph template, for some unusual device where it stores the counters as bits, or ATM cells or something else, and the graph template has some CDEFs to calculate the right value. What's the interface you are looking at?
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!)
polletj
Cacti User
Posts: 54
Joined: Wed Aug 30, 2006 1:18 am
Location: Antwerp/Belgium

Post by polletj »

I use the simple normal template for traffic in bits/sec

no fancy hocus pocus...
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

polletj wrote:I use the simple normal template for traffic in bits/sec

no fancy hocus pocus...
Then would you please run a poller cycle with DEBUG logging turned on, and paste the appropriate part of the Cacti log?

It will be the ReadDataFromRRD lines for the line that has the problem. And let me know what you think the bandwidth should be for the time when the poller ran, too.
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!)
polletj
Cacti User
Posts: 54
Joined: Wed Aug 30, 2006 1:18 am
Location: Antwerp/Belgium

Found it.......

Post by polletj »

Howie,

Thanks for youre time but :

:oops:

My copy paste mistake in a coding part.

:oops: :cry:

Corrected the lazy copy paste and YES it works again....

I have added this in order to be able to weather the link status:

for ($i=0, $cnt=count($cols); $i < $cnt; $i++)
{
$values[$heads[$i]]=$cols[$i];
}

// as long as no-one actually manages to create an RRD with a DS of '-', //then this will just fall through to 0 for '-'

=> next part is added to cope with link status and connections

stmt 1763 switch ($in_ds)
{
case 'traffic_in':
$inbw=$values[$in_ds] * 8;
break;
default:
$inbw=$values[$in_ds] *1;
break;
}
switch ($out_ds)
{
case 'traffic_out':
$outbw=$values[$out_ds] * 8;
break;
default:
$outbw=$values[$out_ds] * 1;
break;
}


Cheers
Johan

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

Re: Found it.......

Post by Howie »

polletj wrote:Howie,

Thanks for youre time but :

:oops:

My copy paste mistake in a coding part.

:oops: :cry:
Aaah. D'oh! :roll:

For the future, in version 0.9 you won't need that tweak. There is a seperate 'rrd gauge' DS format without the x8 built in.
polletj wrote: PS: Enjoy the weekend


You too!
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 4 guests