Splunk AppDynamics

Building a Monitoring Extension Using Scripts

Predrag_Spasic
New Member

Hi,

Trying to create POC for building custom monitoring extension from (custom written) scripts.

  • Created <machine_agent_home>/monitors/<custom_extension_directory>, in my case that is <machine_agent_home>/monitors/CustomMonitor”.
  • In this directory CustomMonitor created two files. First file is shell script that prints stdout in the format of "name=Custom Metrics|Hardware Resources|$ZONE|$server_name conntrack utilization percent,value="$Ctrack_utilization. This works just fine, tested it by running from the server directly, from command prompt.
  • created file “monitor.xml” with the following content …

    <monitor>

                   <name>Hardware Resources</name>

                   <type>managed</type>

                   <description>Monitor open file count </description>

                   <monitor-configuration>

                   </monitor-configuration>

                   <monitor-run-task>

                                  <execution-style>continuous</execution-style>

                                  <name>Run</name>

                                  <type>executable</type>

                                  <task-arguments>

                                  </task-arguments>

                                  <executable-task>

                                                 <type>file</type>

                                                 <file><shell_script_file_name></file>

                                  </executable-task>

                   </monitor-run-task>

    </monitor>
  • restarted machine agent

My data is not visible if i go to Servers > Metric Browser.

Tried modifying monitor.xml to use periodic (since i read somewhere that for "continuous" script needs to run in infinite loop like this ...

<execution-style>periodic</execution-style>
<execution-frequency-in-seconds>60</execution-frequency-in-seconds>
<execution-timeout-in-secs>30</execution-timeout-in-secs>

but my data is still not visible in Metric Browser.

Tried with different format of stdout like this ...

name=Hardware Resources|$ZONE|$server_name conntrack utilization percent,value="$Ctrack_utilization

but that did not help neither.

Just to mentioned that in Metric Browser I see relevant server with default metrics, this is what i see under this server (did not include it in the image in order not to reveille the actual server name)

image.png

I was hoping to have another expandable folder with the caption of the value of variable $ZONE.

Has anyone successfully managed to get this running?

Labels (1)
0 Karma

iamryan
Community Manager
Community Manager

Hi @sathishkumar.R,

Can you share any insight on what you did or what happened for the issue to be resolved?

0 Karma

sathishkumar_R
New Member

Its resolved

0 Karma

sathishkumar_R
New Member

Hi @Predrag.Spasic  

Am facing the very same issue and followed the exact same steps as you from this Appdynamics help Page  but even i cant see my custom metrcs

0 Karma

sathishkumar_R
New Member

Any luck if this issue is resolved ?

0 Karma

iamryan
Community Manager
Community Manager

Hi @Predrag.Spasic,

Since the community did not jump in, you may want to contact AppD Support for this one. How do I submit a Support ticket? An FAQ 

0 Karma
Get Updates on the Splunk Community!

The OpenTelemetry Certified Associate (OTCA) Exam

What’s this OTCA exam? The Linux Foundation offers the OpenTelemetry Certified Associate (OTCA) credential to ...

From Manual to Agentic: Level Up Your SOC at Cisco Live

Welcome to the Era of the Agentic SOC   Are you tired of being a manual alert responder? The security ...

Splunk Classroom Chronicles: Training Tales and Testimonials (Episode 4)

Welcome back to Splunk Classroom Chronicles, our ongoing series where we shine a light on what really happens ...