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

Dynatrace Full Stack 1.202.80 - Windows Server - Folder checker

dimitar_petkov
Newcomer

Hi,

I would like to know if there is a way to natively monitor a directory and weather it contains any files or not on a Windows Server 2016 host which has the following monitoring agents installed:

DT Agent

  • Dynatrace OneAgent - "C:/Program Files/dynatrace/oneagent/agent/lib64/oneagentwatchdog.exe" -service

(Not Infrastructure mode, but Full Stack)


Lets say I have a Windows Server 2016 with folder F:\MonitorMe

And a software that keeps this folder empty, unless there is something wrong. Only then an XML file gets saved in the folder MonitorMe.

I want to know can i create a dashboard that lets me know

  • Are there files in my folder
  • How many files are there
  • What is their age


Which tool / module / filter do i need to use to see if my folder is empty or not on my dashboard?

I saw some people refer to third party plugins like FTP File Checker

Also found some answers but I am wary those are not related to my version (1.202.80.20200921-133947) of DynaTrace, as they are very old from 2014 and 2016:

Also sort of (maybe wrongly) I assume that monitoring a folder is pretty trivial activity and ought to be present as a baseline vanilla native functionality, rather than having to rely on some third party plugin, that is not even meant for this and has to be modified ( I have no FTP and just a local folder).

I also found this article. But there is no RuxItAgentLogAnalytics.conf file in my

C:\ProgramData\dynatrace\oneagent\agent\conf\runtime\ folder

There is a directory called 0x1xxyyxx_loganalytics_S-x-y-z though


I apologize if my question is amateurish and/or redundant / stupid in advance.

Thank you!


Nota Bene

I have working custom PowerShell, batch scripts (and also a Splunk configuration + daemon) that do the same. I want to know if i can do it in DynaTrace.

3 REPLIES 3

r_weber
Pro

Hi @Dimitar P.,

it's not an amateurish question, it's a valid usecase, but its best adressed via a custom oneagent plugin - https://dynatrace.github.io/plugin-sdk/readme.html

The plugin code in python (the oneagent ships with a python runtime so no need to install extra on your monitored hosts) would be rather straight forward, similar to your PowerShell script it would go to the directory and check the number of files and report it back to Dynatrace as a custom metric. based on that you can then create custom alerts.

Reinhard

dimitar_petkov
Newcomer

Greetings @Reinhard W.,


Thank you sincerely for the provided guidance and link.


WBR,

Dimitar

r_weber
Pro

Hi @Dimitar P.,

here is a very quick implementation (counts files on Linux /tmp directory): countplugin.zip


Of course very rudimentary, one might add the directories to scan via config, etc..

Regards,

Reinhard