You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking through the PHP code, we think the problem in both cases would be that the following database queries (lines 174, 216 and 217) are not responding correctly:
174 $snmp_index = db_fetch_cell("select snmp_index from host_snmp_cache where host_id = '$host_id' and field_value = '$oid_name[0]' and field_name = 'ifDescr'"); 216 $snmp_index = db_fetch_cell("select snmp_index from host_snmp_cache where host_id = '$host_id' and field_value = '$oid_name[0]' and field_name = 'ifDescr'"); 217 $alias = db_fetch_cell("select field_value from host_snmp_cache where snmp_index='$snmp_index' and host_id='$host_id' and field_name='ifDescr'");
That would be because the "ifDescr" field does not exist in that table for this type of devices. As we saw, the correct field would be "ifName".
The text was updated successfully, but these errors were encountered:
I'm seeing the same issue in our environment.
SFP Indexes created before 1.2.xx still works with the latest cacti release and the SFP statistics script.
But when querying devices for new SFP indexes I'm seeing the same issues you post here.
So, you could have it use either field to find the value, but not sure if that would have the desired effect. If not, you'd need some way to select which method is being used.
Hi all:
We are trying to use this code on a Cisco Catalyst 9400 (version 17.9.4a), and the "interface" and "descr" queries don't work:
Executing script query '"/usr/bin/php" -q /media/storage/cacti/site/scripts/ss_sfp.php xx.xx.xx.xx:199:2:161:1000:1:10:xxxxx:::::: query interface'
+ Found item [interface=''] index: 1090
+ Executing script query '"/usr/bin/php" -q /media/storage/cacti/site/scripts/ss_sfp.php xx.xx.xx.xx:199:2:161:1000:1:10:xxxxx:::::: query descr'
+ Found item [descr=''] index: 1090
Looking through the PHP code, we think the problem in both cases would be that the following database queries (lines 174, 216 and 217) are not responding correctly:
174 $snmp_index = db_fetch_cell("select snmp_index from host_snmp_cache where host_id = '$host_id' and field_value = '$oid_name[0]' and field_name = 'ifDescr'");
216 $snmp_index = db_fetch_cell("select snmp_index from host_snmp_cache where host_id = '$host_id' and field_value = '$oid_name[0]' and field_name = 'ifDescr'");
217 $alias = db_fetch_cell("select field_value from host_snmp_cache where snmp_index='$snmp_index' and host_id='$host_id' and field_name='ifDescr'");
That would be because the "ifDescr" field does not exist in that table for this type of devices. As we saw, the correct field would be "ifName".
The text was updated successfully, but these errors were encountered: