host-network-interface datasource
The host-network-interface datasource collects information about network interfaces from the operating system and creates metric data points, entities, and events.
Metrics
Name | Units | Description |
---|---|---|
net.data_recv | kbps | The rate of bytes being received |
net.data_sent | Kbps | The rate of bytes being sent |
net.drop_in | count | Count of lost inbound packets |
net.drop_out | count | Count of lost outbound packets |
net.err_in | count | Count of inbound packet errors |
net.err_out | count | Count of outbound packet errors |
net.fifo_in | octets | Size of inbound FIFO buffer |
net.fifo_out | octets | Size of outbound FIFO buffer |
net.packets_recv | count | Count of received packets that always increases |
net.packets_sent | count | Count of sent packets that always increases |
net.rx_utilization | percent | Percent of utilized inbound capacity |
net.tx_utilization | percent | Percent of utilized outbound capacity |
Name styles
This datasource supports two mutually exclusive naming styles for the metrics that it collects:
- canonical: The default style, which features namespace prefixes.
- linuxMonitorZenPack: The legacy style, used in the Linux Monitor ZenPack.
To change the default style, set the metric-names-variant
property in
the datasource section to linuxMonitorZenPack
.
Canonical style | ZenPack style |
---|---|
net.data_recv | intf_ifInOctets |
net.data_sent | intf_ifOutOctets |
net.drop_in | intf_ifInDropped |
net.drop_out | intf_ifOutDropped |
net.err_in | intf_ifInErrors |
net.err_out | intf_ifOutErrors |
net.fifo_in | intf_ifFifoIn |
net.fifo_out | intf_ifFifoOut |
net.packets_sent | intf_ifOutPackets |
net.packets_recv | intf_ifInPackets |
net.rx_utilization | intf_ifInUtilization |
net.tx_utilization | intf_ifOutUtilization |
Entities
Property | Description |
---|---|
name | A network interface name |
ifindex | The unique number of an interface |
ips | A list IP addresses assigned to an interface |
flags | A list of symbols that represent the state and capabilities of an interface |
macaddress | The unique hardware address of an interface |
mtu | The maximum transmission unit an interface can transmit, in bytes |
speed | The maximum possible speed of an interface, in bytes |
Example
{
"flags": [
"up",
"broadcast",
"multicast"
],
"ifindex": "2",
"ips": [
"203.0.113.0/24",
"2001:0db8:85a3:0000:0000:8a2e:0370:7334"
],
"macaddress": "00:00:00:87:08:00",
"mtu": "1500",
"name": "ens32",
"speed": 1000000000
}
Events
For normal changes, events are severity INFO; otherwise, they are severity WARNING.
Host Network Interface Operational Status_Event
- An event is based on the value of "flags" property of Network Interface. Particularly, it seeks for "up" flag and it is not present, the datasource generates an error event.
Host Network Interface 75 percent receive utilization_event
- The value of net.rx_utilization is greater than 75%.
Host Network Interface 75 percent transmit utilization_event
- The value of net.tx_utilization is greater than 75%.
Example
{
"name": "Host Network Interface Operational Status_Event",
"component": "ens32",
"device": "ServerStation1",
"source": "example_server_zdm_host",
"eventClass": "/Status",
"type": "Host Network Interface Operational Status_Event",
"summary": "Host Network Interface 'ens32' is up.",
"body": "Host Network Interface 'ens32' is up.",
"severity": "SEVERITY_INFO",
"status": "STATUS_CLOSED"
}
Configuration
If you specify the host-network-interface datasource during installation, its configuration file is placed in the following location:
/etc/zendatamon-configs/configs/host-network-interface.config.yaml
Otherwise, you must copy it from the templates directory:
cp /etc/zendatamon-configs/.templates/.configs/host-network-interface.config.yaml \
/etc/zendatamon-configs/configs/host-network-interface.config.yaml
The Zenoss Cloud agent service monitors the /etc/zendatamon-configs/configs
directory
and loads any new or changed configuration files immediately.
Properties
interval
(number)- The number of seconds to wait between collection attempts.
This value overrides the
defaultInterval
value in the Zenoss Cloud agent service configuration file. timeout
(number)- The number of seconds to wait before dropping a collection attempt.
metric-names-variant
(string, default =canonical
)- The metric name style, either
canonical
orlinuxMonitorZenPack
. protocol
(string, default =local
)- Collection type; only
local
is supported, so this key can be omitted. exclude-names
-
A list of regular expressions identifying the names of interfaces not to collect.
- All matching interfaces are excluded from collection.
- If empty or omitted, all interfaces are collected.
use-sudo
(boolean, default =false
)- Whether to use
sudo
to run thehead
command.
Example
apiVersion: v1
kind: datasource
name: host-network-interface
spec:
type: host-network-interface
datasource:
interval: 60
timeout: 30
metric-names-variant: canonical
protocol: ""
exclude-names:
- ens*
use-sudo: false
ZenPack compatibility
For compatibility with the Linux Monitor ZenPack, use the action service to create a metric trigger or event trigger (and accompanying destination and rule) for net.rx_utilization or net.tx_utilization data points that are greater than 75%.