Network Monitoring Extension

Use Case

Use for monitoring network related metrics.

It uses the machine agent's Sigar library to retrieve the metrics, however these metrics (all or partial) can be overriden through scripting if required.

This extension works only with standalone machine agent.

Note : By default, the Machine agent and AppServer agent can only send a fixed number of metrics to the controller. To change this limit, please follow the instructions mentioned here.


  1. Download and unzip it to <machine_agent_dir>/monitors/
  2. Edit config.yaml file and provide the required configuration (see Configuration section)
  3. Restart the Machine Agent.



Note: Please avoid using tab (\t) when editing yaml files. You may want to validate the yaml file using a yaml validator.

networkInterfacesThe network interface to monitor. To monitor multiple interfaces, separate the values using comma, e.g. eth0, eth1, eth2
overrideMetricsUsingScriptFileIf set to true, it will execute the defined script for the OS to retrieve metrics. Default value is false.
scriptTimeoutInSecThe timeout in seconds of script execution.
scriptFiles (osType)Type of OS: It's either 'windows' for Windows or 'unixBase' for other OS such as Linux, MAC, Solaris, etc.
scriptFiles (filePath)The path of the script file. Either provide a relative path from the machine agent's installation dir or an absolute path. Two script templates are provided, one for each osType.
deltaMetricsComma separated full path of the metrics for which delta (present - previous) needs to be computed.
metricPrefixThe path prefix for viewing metrics in the metric browser. Default is "Custom Metrics|Network|"


Below is an example config for monitoring multiple interfaces with enabled metrics scripting override:

networkInterfaces: [ eth0, eth1

overrideMetricsUsingScriptFile: true

scriptTimeoutInSec: 60

  - osType: windows
    filePath: monitors/NetworkMonitor/scripts/windows-metrics.bat
  - osType: unixBase
    filePath: monitors/NetworkMonitor/scripts/

# Comma separated full path of the metrics for which delta (present - previous) needs to be computed.
# For eg. deltaMetrics: ["TCP|State|Bound", "TCP|Segments Retransmitted"]
deltaMetrics: []

metricPrefix:  "Custom Metrics|Network|"

Script File

There maybe cases where Sigar doesn't work on your environment or you've a preferred way of retrieving the metrics. In any case, you have the flexibility to override some or all metrics using scripting.

There are two script templates provided:

  1. for non-windows environment
  2. windows-metrics.bat for windows environment

Update the relevant script template by uncommenting out the metrics you wish to override and provide the value.

Below is an example override on some TCP State metrics in

echo "name=TCP|State|Close Wait,value=" `netstat -an | grep -i CLOSE_WAIT | wc -l`
echo "name=TCP|State|Establised,value=" `netstat -an | grep -i ESTABLISHED | wc -l`
echo "name=TCP|State|Fin Wait1,value=" `netstat -an | grep -i FIN_WAIT_1 | wc -l`
echo "name=TCP|State|Fin Wait2,value=" `netstat -an | grep -i FIN_WAIT_2 | wc -l`
echo "name=TCP|State|Listen,value=" `netstat -an | grep -i LISTEN | wc -l`


Below is an example override on custom metrics in windows-metrics.bat:

set cmd="netstat -an | find "192.168.31" /c"
FOR /F %%i IN (' %cmd% ') DO SET val=%%i
echo name=Autotrader^|Listen,value=%val%


Metric path is typically: Application Infrastructure Performance|<Tier>|Custom Metrics|Network| followed by the individual metrics below:

Network Interface

Note: <network_interface> is replaced with the actual network interface name, e.g eth0

<network_interface>|RX KiloBytesThe total kilo bytes received
<network_interface>|RX DroppedThe number of dropped packets due to reception errors
<network_interface>|RX ErrorsThe number of damaged packets received
<network_interface>|RX FrameThe number received packets that experienced frame errors
<network_interface>|RX OverrunsThe number of received packets that experienced data overruns
<network_interface>|RX PacketsThe number of packets received
<network_interface>|SpeedThe speed in bits per second
<network_interface>|TX KiloBytesThe total kilo bytes transmitted
<network_interface>|TX CarrierThe number received packets that experienced loss of carriers
<network_interface>|TX CollisionThe number of transmitted packets that experienced Ethernet collisions
<network_interface>|TX DroppedThe number of dropped transmitted packets due to transmission errors
<network_interface>|TX ErrorsThe number of packets that experienced transmission error
<network_interface>|TX OverrunsThe number of transmitted packets that experienced data overruns
<network_interface>|TX PacketsThe number of packets transmitted


TCP|Active OpensThe number of active opens
TCP|Attempt FailsThe number of attempted connection failed
TCP|Conn EstablishedThe number of connection established
TCP|Resets ReceivedThe number of resets received
TCP|Bad SegmentsThe number of bad segments
TCP|Segments ReceivedThe number of segments received
TCP|Inbound TotalTotal number of TCP inbound connections
TCP|Resets SentThe number of resets sent
TCP|Segments SentThe number of segments sent
TCP|Outbound TotalTotal number of TCP outbound connections
TCP|Passive OpensThe number of passive opens
TCP|Segments RetransmittedThe number of segments retransmitted

TCP State

TCP|State|BoundThe number of bound connections
TCP|State|Close WaitThe number of connections waiting for termination request from the local user
TCP|State|ClosedThe number of closed connections
TCP|State|ClosingThe number of connections waiting for termination acknowledgment
TCP|State|EstablisedThe number of open connections
TCP|State|Fin Wait1The number of connections waiting for termination requests from the remote TCP or acknowledgment of termination request previously sent
TCP|State|Fin Wait2The number of connections waiting for termination requests from the remote TCP
TCP|State|IdleThe number of connections in idle
TCP|State|Last AckThe number of connections waiting for lask acknowledgment of termination request sent to remote TCP
TCP|State|ListenThe number of listening for connections
TCP|State|Syn RecvThe number of confirming connection requests acknowledgment after having both received and sent a connection request
TCP|State|Syn SentThe number of waiting for a matching connection request after having sent a connection request
TCP|State|Time WaitThe number of connections waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its connection termination request


All Inbound TotalTotal number of incoming connections
All Outbound TotalTotal number of outgoing connections

Custom Dashboard


Platform Tested

Ubuntu12.04 LTS
Mac OSX10.9.1


1.0.4 4th Aug, 2016 - Support for configurable delta metrics


Always feel free to fork and contribute any changes directly here on GitHub


For any questions or feature request, please contact AppDynamics Center of Excellence.