Monitoring Network

This article will help you get the Network plugin for sd-agent configured and returning metrics

Installing the network plugin package

Install the network plugin on Debian/Ubuntu:

sudo apt-get install sd-agent-network

Install the network plugin on RHEL/CentOS:

sudo yum install sd-agent-network

Read more about agent plugins.

Configuring the agent to monitor Network

The network check is automatically installed and configured with the agent, however there are some additional configuration options to exclude certain network adaptors from being reported. It's also possible to enable collection of connection state metrics.

1. Configure /etc/sd-agent/conf.d/network.yaml

Example config to exclude lo & lo0 interfaces:

init_config:

instances:
  # Network check only supports one configured instance
  - collect_connection_state: false
    excluded_interfaces:
      - lo
      - lo0
    # Optionally completely ignore any network interface
    # matching the given regex:
    # excluded_interface_re: my-network-interface.*

    # Do not combine connection states
    # By default we combine states like fin_wait_1 and fin_wait_2
    # together into one state: 'closing'
    # For some people, this is fine, but others need more granular data
    # enable this option to get more granular data
    # combine_connection_states: no

Example config to exclude lo & lo0 interfaces via regex:

init_config:

instances:
  # Network check only supports one configured instance
  - collect_connection_state: false
    # Optionally completely ignore any network interface
    # matching the given regex:
    excluded_interface_re: lo*

    # Do not combine connection states
    # By default we combine states like fin_wait_1 and fin_wait_2
    # together into one state: 'closing'
    # For some people, this is fine, but others need more granular data
    # enable this option to get more granular data
    # combine_connection_states: no

Example config to exclude lo & lo0 interfaces and enable connection state metrics:

init_config:

instances:
  # Network check only supports one configured instance
  - collect_connection_state: true
    excluded_interfaces:
      - lo
      - lo0
    # Do not combine connection states
    # By default we combine states like fin_wait_1 and fin_wait_2
    # together into one state: 'closing'
    # For some people, this is fine, but others need more granular data
    # enable this option to get more granular data
    # combine_connection_states: no

2. Restart the agent

sudo /etc/init.d/sd-agent restart

or

sudo systemctl restart sd-agent

Verifying the configuration
Execute info to verify the configuration with the following:

sudo /etc/init.d/sd-agent info 

or

/usr/share/python/sd-agent/agent.py info

If the agent has been configured correctly you'll see an output such as:

network
-----
  - instance #0 [OK]
  - Collected * metrics

You can also view the metrics returned with the following command:

sudo -u sd-agent /usr/share/python/sd-agent/agent.py check network

Configuring graphs

Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the network metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.

Screen_Shot_2018-01-18_at_11.46.12.png

Monitored metrics

MetricValues
system.net.bytes_rcvd

byte / second
Type: float
system.net.bytes_sent

byte / second
Type: float
system.net.packets_in.count

/
Type: float
system.net.packets_in.error

/
Type: float
system.net.packets_out.count

/
Type: float
system.net.packets_out.error

/
Type: float
system.net.tcp.in_segs

/
Type: float
system.net.tcp.out_segs

/
Type: float
system.net.tcp.retrans_segs

/
Type: float
system.net.tcp4.closing

/
Type: float
system.net.tcp4.established

/
Type: float
system.net.tcp4.listening

/
Type: float
system.net.tcp4.opening

/
Type: float
system.net.tcp4.time_wait

/
Type: float
system.net.tcp6.closing

/
Type: float
system.net.tcp6.established

/
Type: float
system.net.tcp6.listening

/
Type: float
system.net.tcp6.opening

/
Type: float
system.net.tcp6.time_wait

/
Type: float
system.net.udp.in_datagrams

datagram / second
Type: float
system.net.udp.in_errors

datagram / second
Type: float
system.net.udp.no_ports

datagram / second
Type: float
system.net.udp.out_datagrams

datagram / second
Type: float
system.net.udp.rcv_buf_errors

error / second
Type: float
system.net.udp.snd_buf_errors

error / second
Type: float
system.net.udp4.connections

/
Type: float
system.net.udp6.connections

/
Type: float
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.