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.
Note: Please avoid using tab (\t) when editing yaml files. You may want to validate the yaml file using a yaml validator.
|networkInterfaces||The network interface to monitor. To monitor multiple interfaces, separate the values using comma, e.g. eth0, eth1, eth2|
|overrideMetricsUsingScriptFile||If set to true, it will execute the defined script for the OS to retrieve metrics. Default value is false.|
|scriptTimeoutInSec||The 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.|
|deltaMetrics||Comma separated full path of the metrics for which delta (present - previous) needs to be computed.|
|metricPrefix||The 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:
#In case of linux, networkInterface names are of the form eth* # In Windows, please use the network full name from Device Manager ("Intel(R) PRO/1000 MT Desktop Adapter") networkInterfaces: [ "eth0", "eth1", "Intel(R) PRO/1000 MT Desktop Adapter" ] overrideMetricsUsingScriptFile: true scriptTimeoutInSec: 60 scriptFiles: - osType: windows filePath: monitors/NetworkMonitor/scripts/windows-metrics.bat - osType: unixBase filePath: monitors/NetworkMonitor/scripts/unix-base-metrics.sh # 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|"
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:
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 unix-base-metrics.sh:
... 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:
Note: <network_interface> is replaced with the actual network interface name, e.g eth0
|<network_interface>|RX KiloBytes||The total kilo bytes received|
|<network_interface>|RX Dropped||The number of dropped packets due to reception errors|
|<network_interface>|RX Errors||The number of damaged packets received|
|<network_interface>|RX Frame||The number received packets that experienced frame errors|
|<network_interface>|RX Overruns||The number of received packets that experienced data overruns|
|<network_interface>|RX Packets||The number of packets received|
|<network_interface>|Speed||The speed in bits per second|
|<network_interface>|TX KiloBytes||The total kilo bytes transmitted|
|<network_interface>|TX Carrier||The number received packets that experienced loss of carriers|
|<network_interface>|TX Collision||The number of transmitted packets that experienced Ethernet collisions|
|<network_interface>|TX Dropped||The number of dropped transmitted packets due to transmission errors|
|<network_interface>|TX Errors||The number of packets that experienced transmission error|
|<network_interface>|TX Overruns||The number of transmitted packets that experienced data overruns|
|<network_interface>|TX Packets||The number of packets transmitted|
|TCP|Active Opens||The number of active opens|
|TCP|Attempt Fails||The number of attempted connection failed|
|TCP|Conn Established||The number of connection established|
|TCP|Resets Received||The number of resets received|
|TCP|Bad Segments||The number of bad segments|
|TCP|Segments Received||The number of segments received|
|TCP|Inbound Total||Total number of TCP inbound connections|
|TCP|Resets Sent||The number of resets sent|
|TCP|Segments Sent||The number of segments sent|
|TCP|Outbound Total||Total number of TCP outbound connections|
|TCP|Passive Opens||The number of passive opens|
|TCP|Segments Retransmitted||The number of segments retransmitted|
|TCP|State|Bound||The number of bound connections|
|TCP|State|Close Wait||The number of connections waiting for termination request from the local user|
|TCP|State|Closed||The number of closed connections|
|TCP|State|Closing||The number of connections waiting for termination acknowledgment|
|TCP|State|Establised||The number of open connections|
|TCP|State|Fin Wait1||The number of connections waiting for termination requests from the remote TCP or acknowledgment of termination request previously sent|
|TCP|State|Fin Wait2||The number of connections waiting for termination requests from the remote TCP|
|TCP|State|Idle||The number of connections in idle|
|TCP|State|Last Ack||The number of connections waiting for lask acknowledgment of termination request sent to remote TCP|
|TCP|State|Listen||The number of listening for connections|
|TCP|State|Syn Recv||The number of confirming connection requests acknowledgment after having both received and sent a connection request|
|TCP|State|Syn Sent||The number of waiting for a matching connection request after having sent a connection request|
|TCP|State|Time Wait||The 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 Total||Total number of incoming connections|
|All Outbound Total||Total number of outgoing connections|
java.lang.NoClassDefFoundError: org/hyperic/sigar/SigarExceptionin machine-agent.log, please copy all the sigar libraries/dependencies from
MachineAgent_Home/monitorsLibsincluding sigar.jar and .so files to avoid this error
<MachineAgent>/conf/logging/log4j.xmland update the level of the appender "com.appdynamics" to debug
1.0.4 4th Aug, 2016 - Support for configurable delta metrics
1.0.5 9th Nov, 2017 - Support for n/w interface names in Windows
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.