cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom Extension Not Reporting...

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>

 

1 REPLY 1

Nawaz Ali.Mohammad
AppDynamics Team

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