Splunk AppDynamics

Windows file monitoring extension

Paul_Szoke
Explorer

Looking to use a script file to retrieve file size, and creation date (or Last modified)

Client has a requirement whereby a batch file is received that is sometimes empty, we need to check when file was received and baseline the file sizes.

Batch file I've got so long:

FOR %%? IN (speed.txt) DO (
    ECHO File Name Only       : %%~n?
    ECHO File Size            : %%~z?
    ECHO Last-Modified Date   : %%~t?
    
)

How would I add this to monitor.xml and ensure the metrics pull through?

Labels (1)
0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Pauls,

The link below is your friend.

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

First, you need to update the script to echo/output the values in the metric format.

Like include the details of the tree where you would like the metric to be reported.

E.g.:

Standard Form

Hardware Resources| Instrument Name=Instrument Value

Fully Qualified Form

Hardware Resources| <metric name>,value=<long value>

Once that is done, you can the include the script details in monitor.xml as per the instructions on this page.

Refer Step 4: https://docs.appdynamics.com/display/PRO44/Build+a+Monitoring+Extension+Using+Scripts#BuildaMonitori...

Please post here if you have any further questions.

Thanks.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...