Skip to content

fibre channel: symbolic_name attribute is not exposed to sysfs by all drivers #2919

@machine424

Description

@machine424

Host operating system: output of uname -a

node_exporter version: output of node_exporter --version

node_exporter command line flags

node_exporter log output

Are you running node_exporter in Docker?

What did you do that produced an error?

Used a driver that doesn't set the optional symbolic_name attribute:
Drivers can choose not to expose attributes to sysfs: https://github.com/torvalds/linux/blob/047371968ffc470769f541d6933e262dc7085456/include/scsi/scsi_transport_fc.h#L721-L764

Apart of symbolic_name, other attributes may not be exposed (see link above), we should take that into consideration.

This will need changes at https://github.com/prometheus/procfs/blob/dd493f45ddad658c99c4e58989222082cc0a0a96/sysfs/class_fibrechannel.go#L92-L134

What did you expect to see?

node_fibrechannel_info exposed without the non existing attributes (set them to empty string).
the others netrics exposed.

What did you see instead?

The collector fails with:

caller=collector.go:169 level=error msg="collector failed" name=fibrechannel duration_seconds=0.000490402 err="error obtaining FibreChannel class info: failed to read file \"/host/sys/class/fc_host/host0/symbolic_name\": open /host/sys/class/fc_host/host0/symbolic_name: no such file or directory"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions