Skip to content
New issue

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

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

Already on GitHub? # to your account

cacti check fails to detect network hardware that doesn't report an interface name #404

Closed
xcolour opened this issue Mar 12, 2013 · 1 comment
Assignees

Comments

@xcolour
Copy link
Contributor

xcolour commented Mar 12, 2013

For example, we do this query:

            SELECT
                h.hostname as hostname,
                hsc.field_value as device_name,
                dt.data_source_path as rrd_path
            FROM data_local dl
                JOIN host h on dl.host_id = h.id
                JOIN data_template_data dt on dt.local_data_id = dl.id
                LEFT JOIN host_snmp_cache hsc on h.id = hsc.host_id
                    AND dl.snmp_index = hsc.snmp_index
            WHERE dt.data_source_path IS NOT NULL
            AND dt.data_source_path != ''
            AND (hsc.field_name = 'ifName' OR hsc.field_name = 'dskDevice' OR hsc.field_name is NULL)

On data that looks like:

mysql> 
SELECT h.hostname as hostname
     , hsc.field_value as device_name
     , dt.data_source_path as rrd_path
     , hsc.field_name
  FROM data_local dl
  JOIN host h on dl.host_id = h.id
  JOIN data_template_data dt on dt.local_data_id = dl.id
  LEFT JOIN host_snmp_cache hsc on h.id = hsc.host_id AND dl.snmp_index = hsc.snmp_index;
+-----------------------------+----------------------+-----------------------------------------------+--------------+
| hostname                    | device_name          | rrd_path                                      | field_name   |
+-----------------------------+----------------------+-----------------------------------------------+--------------+
| procurve01.ams02.example.com |                      | <path_rra>/procurve01_ams02_traffic_in_25.rrd | ifAlias      |
| procurve01.ams02.example.com | A1                   | <path_rra>/procurve01_ams02_traffic_in_25.rrd | ifDescr      |
| procurve01.ams02.example.com | 10000                | <path_rra>/procurve01_ams02_traffic_in_25.rrd | ifHighSpeed  |
| procurve01.ams02.example.com | 2C:27:D7:78:63:0F    | <path_rra>/procurve01_ams02_traffic_in_25.rrd | ifHwAddr     |
| procurve01.ams02.example.com | 49                   | <path_rra>/procurve01_ams02_traffic_in_25.rrd | ifIndex      |
| procurve01.ams02.example.com | A1                   | <path_rra>/procurve01_ams02_traffic_in_25.rrd | ifName       |
| procurve01.ams02.example.com | Up                   | <path_rra>/procurve01_ams02_traffic_in_25.rrd | ifOperStatus |
| procurve01.ams02.example.com | 4294967295           | <path_rra>/procurve01_ams02_traffic_in_25.rrd | ifSpeed      |
| procurve01.ams02.example.com | ethernetCsmacd(6)    | <path_rra>/procurve01_ams02_traffic_in_25.rrd | ifType       |
| procurve01.ams.example.com   | 52                   | <path_rra>/procurve01_ams_traffic_in_41.rrd   | ifIndex      |
| procurve01.ams.example.com   | 4294967295           | <path_rra>/procurve01_ams_traffic_in_41.rrd   | ifSpeed      |
| procurve01.ams.example.com   | ethernetCsmacd(6)    | <path_rra>/procurve01_ams_traffic_in_41.rrd   | ifType       |

procurve01.ams.example.com doesn't have a ifName field_name, but there's plenty of information to tell us that it's a real piece of hardware with a real interface and a real rrd file. We should be smarter about this query.

@ghost ghost assigned xcolour Mar 12, 2013
@ghost ghost assigned remh Mar 29, 2013
@remh
Copy link

remh commented Apr 12, 2013

Fixed by 9d55d9f

@remh remh closed this as completed Apr 12, 2013
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants