AppD Archive

Writing my first extension - having issues

CommunityUser
Splunk Employee
Splunk Employee

Hi there.

I'm trying to write my first extension for AppD.  I have a Windows 2008 R2 server.  I have installed the AppD Machine Agent (4.2.7.1GA) and have created a powershell script and a monitor.xml file in the correct folder:  "./monitors/WindowsDiskUsage".

The agent log throws an error when trying to run this periodic monitor.

[Agent-Monitor-Scheduler-2] 14 Oct 2016 11:29:30,590 ERROR ExecTask - Error executing executable task java.io.IOException: Cannot run program "D:\AppTech\Utilities\AppDynamics\monitors\WindowsDiskMonitor\check_disk.ps1" (in directory "D:\AppTech\Utilities\AppDynamics\monitors\WindowsDiskMonitor"): CreateProcess error=193, %1 is not a valid Win32 application

I'm following the guidelines in the documentation:  https://docs.appdynamics.com/display/PRO42/Build+a+Monitoring+Extension+Using+Scripts#BuildaMonitori...

How do I inform the agent that my monitor is a script, and not a  Win32 application?

Thanks in advance!

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Could you share your script and the contents of your monitor.xml at all?

--

Mark

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Attached. Thanks in advance for your help!

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Damon, Can you please try this?

1. Create a .bat file...say check_disk.bat

2. Call your powershell script from that .bat file

3. Update <file os-type="windows">check_disk.bat</file> section in monitor.xml

4. Restart m/c agent and see how it goes

0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...