# Is it possible to monitor a keyword in a certain file located on the server via OneAgent?

**URL:** <https://community.dynatrace.com/t/is-it-possible-to-monitor-a-keyword-in-a-certain-file-located-on-the-server-via-oneagent/36637>\
**Category:** Alerting\
**Tags:** problem-detection, problem-notification, anomaly-detection, problems-classic\
**Created:** [September 23, 2022, 1:38pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-a-keyword-in-a-certain-file-located-on-the-server-via-oneagent/36637 "2022-09-23T13:38:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashiD](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ashid/32/15650_2.png) [@ashiD](https://community.dynatrace.com/u/ashiD)\
**Post date:** [September 23, 2022, 1:38pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-a-keyword-in-a-certain-file-located-on-the-server-via-oneagent/36637/1 "2022-09-23T13:38:15Z")

</div>

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&nbsp;**(“jretemp” has the word offline)**&nbsp;happens it will be generate a alert.

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [September 23, 2022, 1:44pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-a-keyword-in-a-certain-file-located-on-the-server-via-oneagent/36637/2 "2022-09-23T13:44:24Z")

</div>

Hi&nbsp;[@ashiD](https://community.dynatrace.com/user/55304)

Could you please check this? Maybe you can use it for the above mentioned purposes.

[Filesystem monitoring | Dynatrace Hub](https://www.dynatrace.com/hub/detail/filesystem-monitoring/?query=file)

Br, Mizső

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [September 23, 2022, 1:57pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-a-keyword-in-a-certain-file-located-on-the-server-via-oneagent/36637/3 "2022-09-23T13:57:20Z")

</div>

The Plugin&nbsp;[@Mizső](https://community.dynatrace.com/user/47783)&nbsp;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.

---

<div class="post-metadata">

**Author:** ![ashiD](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ashid/32/15650_2.png) [@ashiD](https://community.dynatrace.com/u/ashiD)\
**Post date:** [September 23, 2022, 2:02pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-a-keyword-in-a-certain-file-located-on-the-server-via-oneagent/36637/4 "2022-09-23T14:02:40Z")

</div>

[@pahofmann](https://community.dynatrace.com/user/22796)&nbsp; 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 ?

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [September 23, 2022, 3:10pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-a-keyword-in-a-certain-file-located-on-the-server-via-oneagent/36637/5 "2022-09-23T15:10:38Z")

</div>

Hi&nbsp;[@ashiD](https://community.dynatrace.com/user/55304),

You can use this links from the documentation:

[OneAgent extensions tutorial | Dynatrace Docs](https://www.dynatrace.com/support/help/extend-dynatrace/extensions/oneagent-extensions/oneagent-extensions-hands-on)

[ActiveGate extensions tutorial | Dynatrace Docs](https://www.dynatrace.com/support/help/extend-dynatrace/extensions/activegate-extensions/write-your-first-activegate-plugin)

Br, Mizső

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [September 23, 2022, 5:01pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-a-keyword-in-a-certain-file-located-on-the-server-via-oneagent/36637/6 "2022-09-23T17:01:42Z")

</div>

There is a general tutorial for&nbsp;[OneAgent extensions.](https://www.dynatrace.com/support/help/extend-dynatrace/extensions/oneagent-extensions/oneagent-extensions-hands-on)&nbsp;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.
