Netstat plugin provided through IA reports error in EP Agent log
search cancel

Netstat plugin provided through IA reports error in EP Agent log

book

Article ID: 187997

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) CA Application Performance Management (APM / Wily / Introscope) INTROSCOPE DX Application Performance Management

Issue/Introduction

Netstat plugin provided through IA  reports error in EP Agent log
 
9/26/19 07:59:21 AM CEST [ERROR] [EPAgent.EPAPluginProcessor] Metric name from plugin 'Plugin NETSTAT' is invalid: Metric_Name_Is_Badly_Formed[OSResource-Linux|Network|Network Interface|]
9/26/19 07:59:21 AM CEST [ERROR] [EPAgent.EPAPluginProcessor] Metric name from plugin 'Plugin NETSTAT' is invalid: Metric_Name_Is_Badly_Formed[OSResource-Linux|Network|Network Interface|]

Environment

Release : 10.7.0

Component : APM IA Agents

Cause

Netstat plugin when run from the command line we can see the invalid metrics reported. Reason for this was metric path was badly formed.
We get "Metric_Name_Is_Badly_Formed" exception.

The reason for this was the split function which was used in the plugin was not assigned to any variable to capture the split values. 

Attached the modified netstat plugin (netstat.pl)

Resolution

Provided the fixed version of Netstat plugin (Netstat.pl). Attached netstat.pl

Additional Information

Line 122 was changed from split; to my @spl = split;

And assigned value as @spl instead of $_

Please go through the attached file from Line 122 onwards.

Attachments

1585899903740__netstat.pl get_app