# Directory size monitoring

**URL:** <https://community.dynatrace.com/t/directory-size-monitoring/45105>\
**Category:** Extensions\
**Tags:** linux, extensions, problems-classic\
**Created:** [April 11, 2024, 4:04pm UTC](https://community.dynatrace.com/t/directory-size-monitoring/45105 "2024-04-11T16:04:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![craft\_help](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@craft\_help](https://community.dynatrace.com/u/craft_help)\
**Post date:** [April 11, 2024, 4:04pm UTC](https://community.dynatrace.com/t/directory-size-monitoring/45105/1 "2024-04-11T16:04:00Z")

</div>

Hello Experts,

I want to monitor the size of **daram** folder or directory as mentioned below in Linux server.

(eg : root/data/audit/kafkar/daram)

I am getting the size of all files inside the **daram** when I give&nbsp;**(root/data/audit/kafkar/daram/\*)**&nbsp;but not the exact **daram** directory size.

Please suggest a solution to the same as I wanted alert when&nbsp; **folder size increases/decreases.**

I am using filesystem monitoring extension.

Thanks,

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [April 11, 2024, 7:06pm UTC](https://community.dynatrace.com/t/directory-size-monitoring/45105/2 "2024-04-11T19:06:36Z")

</div>

If you are already using the file system monitoring extension and it does not bring you the necessary data, you must generate an API-ingested metric. If the host that contains the folder already has OneAgent, you can ingest from that computer with the DDUs included per host to generate the metric. Please create a script and use the command:

```markup
du -s YOUR_DIRECTORY or du -s /YOUR_DIRECTORY depending on your linux distro

```

then you can parse the output and ingest it using the [Dynatrace OA Metrics API.](https://docs.dynatrace.com/docs/shortlink/local-api)

After that you can set a Metric Event to raise the alert you need.
