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!

Splunk App Dev Quarterly Roundup: AI, Agents, and Innovation!

Another quarter, another wave of innovation. From complex integrations to pushing the limits ...

Federated Search for Dynamic Data Self Storage Is Now Generally Available on Splunk ...

 Splunk is excited to announce the General Availability of Federated Search for Dynamic Data Self Storage ...

Index This | What has many keys but can’t unlock a door?

July 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...