23 Sep 2022 02:38 PM
Is it possible to monitor a keyword in a certain file located on the server via OneAgent?
For Example
monitor specific file location like this "/xyz /application/jrtemp", and any anomaly ("jretemp" has the word offline) happens it will be generate a alert.
Solved! Go to Solution.
23 Sep 2022 02:44 PM
Hi @ashiD
Could you please check this? Maybe you can use it for the above mentioned purposes.
Filesystem monitoring | Dynatrace Hub
Br, Mizső
23 Sep 2022 02:57 PM
The Plugin @Mizső mentioned is good, but doesn't work for your exact use case as it can't look into the files.
But you can adapt it or write a custom plugin that scans a file and looks for your key word.
23 Sep 2022 03:02 PM
@pahofmann I am very new to dynatrace, are there guidelines on how to write a custom plugin that scans a file and looks for your key word and then deploy it ?
23 Sep 2022 04:10 PM
Hi @ashiD,
You can use this links from the documentation:
OneAgent extensions tutorial | Dynatrace Docs
ActiveGate extensions tutorial | Dynatrace Docs
Br, Mizső
23 Sep 2022 06:01 PM
There is a general tutorial for OneAgent extensions. As they are written in python, you can use any python tutorial for the file handling and scanning parts.
The dynatrace parts should be straight forward and can be taken from the tutorial or any other plugin. You can just unzip them and have a look if you want to see how they work.