|query_ifSpeed| returns the wrong value

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

That is really strange. The query that I had you execute is very similar to what is used to retrieve the value for the ifSpeed variable on the graph. Therefore having the correct value in the 'host_snmp_cache' table should imply a correct value on the graph as well...

If you notice anything else odd, let me know.

-Ian
jas0420
Cacti User
Posts: 91
Joined: Thu Jan 13, 2005 3:58 pm
Location: College Station, TX - USA

Post by jas0420 »

I'll keep an eye on it as I add hosts and holler if I can add anything more to it.

Jason
jas0420
Cacti User
Posts: 91
Joined: Thu Jan 13, 2005 3:58 pm
Location: College Station, TX - USA

Post by jas0420 »

Hey Ian, more brain-teasers for you... I just thought of something else that makes this all the stranger... This never sunk in with me before, but I've been doing a |query_ifSpeed| in the legend in the graphs this whole time, and it has been correct both before and after the "verbose snmp query" workaround. Check these out. The line that I use to list the speed in the legend is:

Code: Select all

CIRCUIT SPEED:         |query_ifSpeed| bits per second
Here's the graph 4 or 5 poller cycles after creating a host. Notice the correct interface speed, but the way-off percentages because it was calculated using the index # rather than the speed. It is not charting because it exceeds my "90 - 100%" if-then CDEF.

Before:
Image


I do the verbose query (it was only two polling cycles after the first graph), and the "circuit speed" shows the same correct number, and now the percentages are correct too (plus it started charting).

After:
Image

So.......... I don't know why, but |query_ifSpeed| works fine when it is entered as a comment Graph Item Type, but not when it is used in a CDEF string (until after a verbose query). Annnnnnd.... it only seems to happen on my servers. All routers using a copy of the same template worked like a charm.............

Jason
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Refresh the data query?

Clear the poller cache?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
jas0420
Cacti User
Posts: 91
Joined: Thu Jan 13, 2005 3:58 pm
Location: College Station, TX - USA

Post by jas0420 »

I added another server to the graphs to get another one to play with... I verified that it was graphing wrong and then cleared the poller cache. No change on the graph.

Not quite sure what you mean by refresh the data query... Sorry. I'll be glad to try it though if you could give me a push in the right direction. FWIW, I'm using the standard "SNMP - Interface Statistics" data query.

When I went in to clear the poller cache I noticed the option to view the SNMP cache. I took a peek there before clearing the poller cache and found the server in question and see that it has the correct value there....

Code: Select all

Host: SVR-******* 10.x.x.x, SNMP Query: SNMP - Interface Statistics  
Index: 16777219, Field Name: ifSpeed, Field Value: 100000000  
OID: .1.3.6.1.2.1.2.2.1.5.16777219  
jas
shanali
Posts: 20
Joined: Thu Feb 20, 2003 11:45 am

Post by shanali »

hi folks,

i am observing that with Cacti-0.8.6f whenever i add a host with interfaces other then FE (such as GE) the max_rrd value gets fixed at 100000000 instead of learning from snmp (which is correctly reported in verbose_query) and thus it create graphs which are representing wrong information.

any help to fix this would be much appreciated!

regards.
krackerbelin
Posts: 8
Joined: Fri Jul 22, 2005 6:23 am

Post by krackerbelin »

shanali wrote:hi folks,

i am observing that with Cacti-0.8.6f whenever i add a host with interfaces other then FE (such as GE) the max_rrd value gets fixed at 100000000 instead of learning from snmp (which is correctly reported in verbose_query) and thus it create graphs which are representing wrong information.

any help to fix this would be much appreciated!

regards.
I have the same problem and i think this is a bug/missing feature.

I'm using "SNMP - Interface Statistics" data query to build the "In/Out Bits" graph.

In "Suggested Values", i can read for "Data Template - Interface - Traffic" : rrd_maximum |query_ifSpeed|

But when i create the graph |query_ifSpeed| is not applied.

I've looked at the source code and i found that SQL table "data_template_data" (which represents "Data Sources") have no rrd_maximum field.

In fact rrd_maximum is defined in SQL table "data_template_rrd" which represents "Data Source Items".

So what we need is a way to defined suggested values for "Data Source Item Fields"
jas0420
Cacti User
Posts: 91
Joined: Thu Jan 13, 2005 3:58 pm
Location: College Station, TX - USA

Post by jas0420 »

FWIW, I'm on 8.6f too. I had considered the gigabit ints being the problem since almost all of the server NIC's I had been talking about were gig. I have noticed my prob above on at least one 100Mb NIC though. Definitely most were gigs however.

Jason
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Have you attempted to manualy re-index the devices interfaces in Cacti?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
shanali
Posts: 20
Joined: Thu Feb 20, 2003 11:45 am

Post by shanali »

does cacti update the rrd file if i manually re-index the affected interfaces?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

the results from |query_ifSpeed| come from the database and not the RRD file.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
disorganizer
Cacti User
Posts: 68
Joined: Thu Aug 04, 2005 8:34 am

Post by disorganizer »

[quote="shanali"]hi folks,

i am observing that with Cacti-0.8.6f whenever i add a host with interfaces other then FE (such as GE) the max_rrd value gets fixed at 100000000 instead of learning from snmp (which is correctly reported in verbose_query) and thus it create graphs which are representing wrong information.

any help to fix this would be much appreciated!

regards.[/quote]

i have got exactly the same problem. when i delete the rrd and create it completely new, it also uses 100mbit instead of gigabit.

as such imho it cant be a reindex problem.

nevertheless, the output of ifspeed correctly reports gbit on the graph.
but as rrd-max is set wrong, all calculations with rrd_max will result in error. also the graphs can only get values of max. 100mbit.

seems to me like a bug in cacti. if i manually correct the value in the data source all works ok, but this is not how it should be.


EDIT:
second research showed me that it DEFNITELY always uses 100mbit no matter what the speed is. even 10mbit interfaces are entered as 100mbit in the database.

another question would be: isnt the calculation wrong anyways? imho the database itself holds the values in BYTE/s. so the value should in fact imho be ifSpeed (which is imho mbit/s) / 8 (to get Byte/s out of that).
invaliduser
Posts: 11
Joined: Fri Apr 23, 2004 12:37 pm

Post by invaliduser »

I have similar problems with the Broadcom driver under Linux. It's running at GB speed (switch verifies that and I can get gb speed through the interface using netperf), but snmp reports that the interface is running at 100mb.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Remember, the results of the snmpquery are in Octets, the speed is in Bits which are 1/8th of Octets.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
disorganizer
Cacti User
Posts: 68
Joined: Thu Aug 04, 2005 8:34 am

Post by disorganizer »

[quote="TheWitness"]Remember, the results of the snmpquery are in Octets, the speed is in Bits which are 1/8th of Octets.

TheWitness[/quote]

nevertheless, 100000000 is not 1000000000/8 *g*
i believe something is going wrong with determining IfSpeed (so it uses the default 100000000 which is setup).

the value should indeed be set to "query_ifSpeed/8" and not "query_ifSpeed", which is the default.
Anyways, as long as the setting off rra_maximum using query_ifSpeed does not work, this has to be set for each datasource manually anyways.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests