Splunk AppDynamics

Custom Extension Not Reporting...

Andrei-Dragos_M
Explorer

Hi,

I am new to this custom extensions.

I am trying to build just a dummy one to see how it works.

I have the folder in the machine-agent-home/monitors and just a simple script that does a simple echo with a predefine metric. I just want to see it in the Metric Browser under Custom Metrics.

This is all that the script contains : 

printf "name=Custom Metrics|Disks %s|KB written/sec,aggregator=OBSERVATION,value=%d\n" "/test" 2

So it just prints: name=Custom Metrics|Disks /test|KB written/sec,aggregator=OBSERVATION,value=2

But in the metric browser, custom metrics is not visible under my server path if I expand the tree...

I see this weird info in the log file "Forcing stop for Executable Command..."

Below is the snipped from the log file as well as what the monitors.xml file contains.

Can someone tell me what I am doing wrong ?

Thank you very much in advance !

[Agent-Monitor-Scheduler-1] 24 Nov 2020 17:29:27,308 INFO ContinuousTaskMonitor - Continuous Task [AndreiTestMonitor] Restarted
[Worker-10] 24 Nov 2020 17:29:27,308 INFO ExecTask - Initializing process for exec task
[Worker-10] 24 Nov 2020 17:29:27,308 INFO ExecTask - Running executable script on disk [test.sh]
[Worker-10] 24 Nov 2020 17:29:27,308 INFO ExecTask - Executing script [/opt/appdynamics/machine-agent/monitors/andrei_custom_ext/test.sh]
[Worker-10] 24 Nov 2020 17:29:27,327 INFO ExecTask - No task arguments to add
[Worker-10] 24 Nov 2020 17:29:27,328 INFO ExecTask - Initializing process builder with command list[/opt/appdynamics/machine-agent/monitors/andrei_custom_ext/test.sh]
[Worker-10] 24 Nov 2020 17:29:27,328 INFO ExecTask - Initializing process builder with enviornment variables {}
[Worker-10] 24 Nov 2020 17:29:27,328 INFO ExecTask - Running Executable Command [[/opt/appdynamics/machine-agent/monitors/andrei_custom_ext/test.sh]]
[Worker-10] 24 Nov 2020 17:29:27,333 INFO ExecTask - Forcing stop for Executable Command [[/opt/appdynamics/machine-agent/monitors/andrei_custom_ext/test.sh]]
[Worker-10] 24 Nov 2020 17:29:27,333 INFO MonitorStreamConsumer - Stopping monitored process

Monitor.xml :

<monitor>
<name>AndreiTestMonitor</name>
<type>managed</type>
<enabled>true</enabled>
<enable-override os-type="solaris">true</enable-override>
<enable-override os-type="sunos">true</enable-override>
<description>Test Andrei CUstom Extension
</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 os-type="linux">test.sh</file>
<file os-type="mac">test.sh</file>
<file os-type="windows">windows-stat.bat</file>
<file os-type="solaris">test.sh</file>
<file os-type="sunos">test.sh</file>
<file os-type="aix">aix-stat.sh</file>
<file os-type="z/os">zos-stat.sh</file>
<file os-type="hp-ux">hpux-stat.sh</file>
</executable-task>
</monitor-run-task>
</monitor>

Labels (1)

Nawaz_Ali_Moha1
Contributor

Hello Andrei,

Please review the following documentation to create custom metrics using script.

https://docs.appdynamics.com/display/PRO45/Build+a+Monitoring+Extension+Using+Scripts 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...