# How to monitor only a few PODs with OneAgent Operator for Kubernetes Cluster?

**URL:** <https://community.dynatrace.com/t/how-to-monitor-only-a-few-pods-with-oneagent-operator-for-kubernetes-cluster/19827>\
**Category:** Container platforms\
**Tags:** kubernetes\
**Created:** [July 16, 2020, 6:11pm UTC](https://community.dynatrace.com/t/how-to-monitor-only-a-few-pods-with-oneagent-operator-for-kubernetes-cluster/19827 "2020-07-16T18:11:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonas\_morais](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jonas\_morais](https://community.dynatrace.com/u/jonas_morais)\
**Post date:** [July 16, 2020, 6:11pm UTC](https://community.dynatrace.com/t/how-to-monitor-only-a-few-pods-with-oneagent-operator-for-kubernetes-cluster/19827/1 "2020-07-16T18:11:29Z")

</div>

I have a customer with a very large Kubernetes cluster. And we want to monitor just a few PODs.

Is creating a monitoring rule the best way?

Settings\> Processes and Containers\> Process group monitoring

When installing the OneAgent Operator, is it possible to define any parameters for the operator to search only the PODs previously defined?

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [July 16, 2020, 8:32pm UTC](https://community.dynatrace.com/t/how-to-monitor-only-a-few-pods-with-oneagent-operator-for-kubernetes-cluster/19827/2 "2020-07-16T20:32:09Z")

</div>

The operator rolls out the OneAgent pod to all of the selected nodes, so you can use nodeSelectors to in the resource file to only install it to certain nodes. Once the OneAgent pod is on those nodes by default it is going to try to monitor all the pods that aren’t excluded by default.

So in short, you can only limit monitoring at the _node_ level with the operator. To limit it at the pod level within those nodes you’ll be looking at container monitoring rules.

 ![25760-1594931524405.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/9/498482d494617ec8de98aaedbca17097101ec1fb.png)

---

<div class="post-metadata">

**Author:** ![jonas\_morais](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jonas\_morais](https://community.dynatrace.com/u/jonas_morais)\
**Post date:** [July 16, 2020, 9:12pm UTC](https://community.dynatrace.com/t/how-to-monitor-only-a-few-pods-with-oneagent-operator-for-kubernetes-cluster/19827/3 "2020-07-16T21:12:07Z")

</div>

Thanks for the information James.

Just one more doubt.

I will configure as you showed in the image. But do I also need to create a rule within Process Group Detection?

 ![25773-1594933911580.png](https://global.discourse-cdn.com/dynatrace/original/2X/b/be54f7fcd88e27c62a7af710e3495419b5d44286.png)

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [July 16, 2020, 9:24pm UTC](https://community.dynatrace.com/t/how-to-monitor-only-a-few-pods-with-oneagent-operator-for-kubernetes-cluster/19827/4 "2020-07-16T21:24:58Z")

</div>

You’ll only need to use the container monitoring rules in this case

---

<div class="post-metadata">

**Author:** ![jonas\_morais](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jonas\_morais](https://community.dynatrace.com/u/jonas_morais)\
**Post date:** [July 16, 2020, 10:32pm UTC](https://community.dynatrace.com/t/how-to-monitor-only-a-few-pods-with-oneagent-operator-for-kubernetes-cluster/19827/5 "2020-07-16T22:32:15Z")

</div>

OK James.

Thank you very much for taking the time and helping me. 🙂

Regards

---

<div class="post-metadata">

**Author:** ![jonas\_morais](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jonas\_morais](https://community.dynatrace.com/u/jonas_morais)\
**Post date:** [July 16, 2020, 10:32pm UTC](https://community.dynatrace.com/t/how-to-monitor-only-a-few-pods-with-oneagent-operator-for-kubernetes-cluster/19827/6 "2020-07-16T22:32:51Z")

</div>

OK James.

Thank you very much for taking the time and helping me. 🙂

Regards
