ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.
Netstat plugin provided through IA reports error in EP Agent log
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|]
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)
Environment
Release : 10.7.0
Component : APM IA Agents
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.