# Custom OneAgent healthcheck plugin | oneagentctl --healthcheck

**URL:** <https://community.dynatrace.com/t/custom-oneagent-healthcheck-plugin-oneagentctl-healthcheck/41577>\
**Category:** Dynatrace Tips\
**Tags:** extensions, oneagentctl, health\
**Created:** [September 9, 2023, 9:53am UTC](https://community.dynatrace.com/t/custom-oneagent-healthcheck-plugin-oneagentctl-healthcheck/41577 "2023-09-09T09:53:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Romanenkov\_Al3x](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/romanenkov_al3x/32/36257_2.png) [@Romanenkov\_Al3x](https://community.dynatrace.com/u/Romanenkov_Al3x)\
**Post date:** [September 9, 2023, 9:53am UTC](https://community.dynatrace.com/t/custom-oneagent-healthcheck-plugin-oneagentctl-healthcheck/41577/1 "2023-09-09T09:53:00Z")

</div>

Hello&nbsp;everyone!

Maybe this plugin will be useful, especially in large organizations when the right hand does not know what the left hand is doing.&nbsp;&nbsp;At the same time monitoring is critical too.

Great use case: when somebody from the security team or the Ops team changes the capabilities and rights to the Dynatrace OneAgent folder without having any idea - how it will affect the system, just execute his own internal instructions &&nbsp;restrictions.

### [custom\_healthcheck\_plugin](https://github.com/43034r/Dynatrace_OneAgent_healthcheck_plugin/raw/main/custom.python.healthcheck_plugin.zip)

Plugin uses oneagentctl healthcheck command.

Plugin uses status metrics. Consumes only **one** metric.

 ![Romanenkov_Al3x_1-1694252014719.png](https://global.discourse-cdn.com/dynatrace/original/2X/9/97229fb331fa35cbf9f7151be606e44362304339.png)

 ![Romanenkov_Al3x_2-1694252023080.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/0/501872c610c3529ae4884500f1b889c188d3e5a1.png)

 ![Romanenkov_Al3x_3-1694252044818.png](https://global.discourse-cdn.com/dynatrace/original/2X/c/c242463cd53a1f0e4f7eae2c1186be5c3fe7c6a2.png)

default path to oneagentctl:&nbsp; **/opt/dynatrace/oneagent/agent/tools/oneagentctl**

default path to logs: /var/log/dynatrace/oneagent/

recommended path to healthcheck file:&nbsp; **/var/log/dynatrace/oneagent/healthcheck**

mode - 0 - execution in minutes (00, 15, 30, 45) mode - 1 - execution every minute

Detects:

FAILURE\_user\_and\_group

FAILURE\_file\_structure

FAILURE\_file\_capabilities

FAILURE\_file\_checksum

FAILURE\_selinux

FAILURE\_apparmor

FAILURE\_installer\_logs

FAILURE\_watchdog\_logs

Plugin works only on linux.

Regards,

Alex Romanenkov

---

<div class="post-metadata">

**Author:** ![Kenny\_Gillette](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kenny_gillette/32/20170_2.png) [@Kenny\_Gillette](https://community.dynatrace.com/u/Kenny_Gillette)\
**Post date:** [December 20, 2023, 12:51pm UTC](https://community.dynatrace.com/t/custom-oneagent-healthcheck-plugin-oneagentctl-healthcheck/41577/2 "2023-12-20T12:51:14Z")

</div>

Very good job.

Is this developed by Dynatrace or customer?&nbsp; Located on&nbsp;[https://www.dynatrace.com/hub/?filter=all](https://www.dynatrace.com/hub/?filter=all)?

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [December 20, 2023, 1:37pm UTC](https://community.dynatrace.com/t/custom-oneagent-healthcheck-plugin-oneagentctl-healthcheck/41577/3 "2023-12-20T13:37:21Z")

</div>

Great:) Very good manual!

Thank you&nbsp;[@Romanenkov\_Al3x](https://community.dynatrace.com/user/51881)

---

<div class="post-metadata">

**Author:** ![Romanenkov\_Al3x](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/romanenkov_al3x/32/36257_2.png) [@Romanenkov\_Al3x](https://community.dynatrace.com/u/Romanenkov_Al3x)\
**Post date:** [December 21, 2023, 2:56pm UTC](https://community.dynatrace.com/t/custom-oneagent-healthcheck-plugin-oneagentctl-healthcheck/41577/4 "2023-12-21T14:56:46Z")

</div>

Thanks. This is developed by me.

It was an interesting task. I’m glad to be able to share some results here.

To post in the hub, I think I need to finish windows, but unfortunately, I have a huge number of projects and other work.

Regards,

Alex Romanenkov

---

<div class="post-metadata">

**Author:** ![Romanenkov\_Al3x](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/romanenkov_al3x/32/36257_2.png) [@Romanenkov\_Al3x](https://community.dynatrace.com/u/Romanenkov_Al3x)\
**Post date:** [December 21, 2023, 2:57pm UTC](https://community.dynatrace.com/t/custom-oneagent-healthcheck-plugin-oneagentctl-healthcheck/41577/5 "2023-12-21T14:57:30Z")

</div>

Thanks

---

<div class="post-metadata">

**Author:** ![sujit\_k\_singh](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@sujit\_k\_singh](https://community.dynatrace.com/u/sujit_k_singh)\
**Post date:** [December 22, 2023, 12:14am UTC](https://community.dynatrace.com/t/custom-oneagent-healthcheck-plugin-oneagentctl-healthcheck/41577/6 "2023-12-22T00:14:49Z")

</div>

[@Romanenkov\_Al3x](https://community.dynatrace.com/user/51881)&nbsp;looks amazing, I will use this plugin. Thanks a lot for building this.

Thanks,

Tijust
