Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to default an interface speed when ifSpeed and ifHighSpeed come back as zero #2362

Closed
kruegerj opened this issue Jan 31, 2019 · 11 comments
Labels
resolved A fixed issue

Comments

@kruegerj
Copy link
Contributor

original forum post:

Hello,

in my Data Queries "SNMP - Interface Statistics" is configured if i use Associated Graph Templates "In/Out Bits (64-bit Counters)", that the Suggested Values - Data Sources "rrd_maximum" should set with Equation |query_ifHighSpeed|. But it looks like that's not applied.

If i create graphs, with this Graph Templates, the rrd_maximum is set to "U".

Cacti Version: 1.2.1

ifHighSpeed is available:
Found item [ifHighSpeed='10'] index: 1 [from value]
Found item [ifHighSpeed='1000'] index: 2 [from value]

rrdtool will create rrd with "U":
/bin/rrdtool create \
/home/cacti/cacti-1.2.1/rra/1/83122.rrd \
--start -900 --step 300 \
DS:traffic_in:COUNTER:600:0:U \
DS:traffic_out:COUNTER:600:0:U \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \

Suggested Value Config:
rrd_max

@cigamit
Copy link
Member

cigamit commented Jan 31, 2019

The only case this should fail is if the values for those two items came back empty. Not likely unless there was some timeout issue. Might take a few days to get to this. In the mean time you should run the rrdtool tune command to fix the max values.

@cigamit
Copy link
Member

cigamit commented Feb 2, 2019

Do me a favor, goto the rra folder, move one of the broken RRDfiles to a new name, let the poller re-create it and tell us if the value is saved properly. Then, you can move the old file back and use the gap fill feature of spikekill to remove the gap.

@cigamit
Copy link
Member

cigamit commented Feb 3, 2019

Just about to make a change that will allow a user to specify a default interface speed if ifSpeed or ifHighSpeed come back zero. It'll be a system wide default.

@cigamit cigamit changed the title Suggested Value rrd_maximum not applied No way to default an interface speed when ifSpeed and ifHighSpeed come back as zero Feb 3, 2019
@cigamit cigamit added the resolved A fixed issue label Feb 3, 2019
cigamit added a commit that referenced this issue Feb 3, 2019
No way to default an interface speed when ifSpeed and ifHighSpeed come
back as zero
@kruegerj
Copy link
Contributor Author

kruegerj commented Feb 4, 2019

i've updated my local lab cacti to actual fetch from github, i see the settings in Device Defaults Section so i test the creation of a new graph, but i think it doesn't work:
image
we see, the values are present, 2Gbps Eth Trunk Interface, but for RRD it's applied the default Value 1Gbps:
image
do you need any additional informations?

@cigamit
Copy link
Member

cigamit commented Feb 5, 2019

Nope, can not believe this was not caught before today honestly. Thanks for reporting.

cigamit added a commit that referenced this issue Feb 5, 2019
No way to default an interface speed when ifSpeed and ifHighSpeed come
back as zero
@cigamit
Copy link
Member

cigamit commented Feb 5, 2019

Ok, reproduced, verified and resolved.

@kruegerj
Copy link
Contributor Author

kruegerj commented Feb 5, 2019

I'm really sorry, but i can't verify the state "resolved" :-(

actual fetch from develop branch, and create a new graph, but still the default value is taken.

image

to verified, the values are stored in DB i use the SELECT statement from api_data_source_get_interface_speed function with field_name column added:

SELECT field_value,field_name
		FROM host_snmp_cache
		WHERE host_id = 7 -- 7=core4.lab
		AND snmp_query_id = 1 -- 1=SNMP - Interface Statistics
		AND snmp_index = 6 -- ifIndex Eth-Trunk1

results in:

field_value, field_name
'ibgp-e-core4.lab-core5.lab-trunk1', 'ifAlias'
'Eth-Trunk1', 'ifDescr'
'2000', 'ifHighSpeed'
'00:E0:FC:8F:8B:9A', 'ifHwAddr'
'6', 'ifIndex'
'172.19.0.5', 'ifIP'
'Eth-Trunk1', 'ifName'
'Up', 'ifOperStatus'
'2000000000', 'ifSpeed'
'ethernetCsmacd', 'ifType'

so the values are stored correctly, i think. can i collect more debug informations that helps?

@cigamit
Copy link
Member

cigamit commented Feb 5, 2019

If you remember, you removed the suggested Data Source Name 'rrd_maximum' with a value of '|query_ifSpeed|', but that back and it should start to work. I've tested it locally and it works fine now.

@kruegerj
Copy link
Contributor Author

kruegerj commented Feb 5, 2019

no, nothing removed. look:
image
and adding of ifHighSpeed doesn't change:
image
image

@cigamit
Copy link
Member

cigamit commented Feb 9, 2019

You only need the |query_ifSpeed|.

@cigamit
Copy link
Member

cigamit commented Feb 9, 2019

I have confirmed a re-confirmed. This issue is resolved. Please wait for the update to 1.2.2.

@cigamit cigamit closed this as completed Feb 9, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants