Back to the list of connectors[1]

Linux - Network (ifconfig)

Description

This connector enables the monitoring of active network cards on all Linux systems using ifconfig command.

This connector is superseded by:

community[4] hardware[5] linux[6]

Source[7]

Target

Typical platform: Any system

Operating system: Linux

Prerequisites

Leverages: Linux system commands (ifconfig)

Technology and protocols: Command Lines

This connector requires advanced privileges on the managed host for the command below:

  • ethtool

This connector therefore needs to run as root or you need to configure a privilege-escalation mechanism like sudo on the managed host to allow the monitoring account to run the command listed above.

Sample of /etc/sudoers to allow the above command to be run as root by the metricshub account:

metricshub ALL=(root) NOPASSWD: ethtool

Examples

CLI

metricshub HOSTNAME -t linux -c +LinuxIfConfigNetwork --ssh -u USER --sudo-command-list ethtool

metricshub.yaml

resourceGroups:
  <RESOURCE_GROUP>:
    resources:
      <HOSTNAME-ID>:
        attributes:
          host.name: <HOSTNAME> # Change with actual host name
          host.type: linux
        connectors: [ +LinuxIfConfigNetwork ] # Optional, to load only this connector
        protocols:
          ssh:
            username: <USERNAME> # Change with actual credentials
            password: <PASSWORD> # Encrypted using metricshub-encrypt
            useSudo: true
            useSudoCommands: [ "ethtool" ]

Connector Activation Criteria

The Linux - Network (ifconfig) connector will be automatically activated, and its status will be reported as OK if all the below criteria are met:

  • Operating System is Linux
  • The command below succeeds on the monitored host
    • Command: /sbin/ifconfig -a
    • Output contains: LOOPBACK (regex)

Metrics

Type Collected Metrics Specific Attributes
network
  • hw.errors{hw.type="network"}
  • hw.network.bandwidth.limit
  • hw.network.full_duplex
  • hw.network.io{direction="receive"}
  • hw.network.io{direction="transmit"}
  • hw.network.packets{direction="receive"}
  • hw.network.packets{direction="transmit"}
  • hw.network.up
  • hw.status{hw.type="network", state="present"}
  • hw.parent.type
  • id
  • logical_address
  • logical_address_type
  • name
  • physical_address
  • physical_address_type
No results.