cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kubernetes namespace with infra-only and full-stack

lemuel-nabong
Visitor

We want to disable fullstack for selected namespaces and continue logging and basic metrics such as cpu and memory for some namespace (not sure if that's the equivalent for infra-only). Is this how to do it? 

We are aware on how to enable/disable using this docs 

Here is our dynakube

 

 

spec:
  namespaceSelector:
    matchExpressions:
      - key: dynatrace-injection
        operator: NotIn
        values:
          - disabled
  oneAgent:
    cloudNativeFullStack:
      args:
        - --set-infra-only=true
        - --set-app-log-content-access=true
        - --set-system-logs-access-enabled=false

 

 

 

we are in AKS

 

4 REPLIES 4

bsnurka
Dynatrace Advisor
Dynatrace Advisor

Hello - If our goal is to do full stack injection for most namespaces, and then only do the API Scraping (No injection) for specific namespaces, we should not need to define the OneAgent arg of `--set-infra-only=true`. Having this included would do Infra-only monitoring for all namespaces.

spec:
  namespaceSelector:
    matchExpressions:
      - key: dynatrace-injection
        operator: NotIn
        values:
          - disabled
  oneAgent:
    cloudNativeFullStack:
      args:
        - --set-app-log-content-access=true
        - --set-system-logs-access-enabled=false

Based off the namespaceSelector defined above, any namespace which has the label `dynatrace-injection: disabled` will not have OneAgent injected and will only be scraped via the K8s API. All other namespaces will have OneAgent fullstackinjection performed on the pods contained within.

lemuel-nabong
Visitor

Thanks for the reply!

1. Actually, what we really want is fullstack for some namespace and infra-only for some namespace
2. I think i'm a little confuse that cloudNativeFullStack supports an arg of set-infra-only=true they look ironic for me.. or it ignores this args or it only supports set-infra-only=false

IzabelaRokita
Community Team
Community Team

Hey @lemuel-nabong, did you manage to find the solution to your problem? If so, it would be amazing if you've shared it with the rest of the Community! If not, let me know, and I'll look for some further assistance 😊

lemuel-nabong
Visitor

Hi @IzabelaRokita

I was confused back then. What we actually want is enable/disable deep monitoring for certain namespace to save cost. Other term for this is enabling/disabling code-injection module. In able to have that toggling your cluster needs to be in cloudnativefullstack first. After that, you simply need to label your namespace with dynatrace-injection: disabled to turn off deepmonitoring for that. 

So you might ask what is missing when deep monitoring is missing: distributed tracing, code-level visibility, and deep process monitoring, I didn't find this in an official docs, we raised a support ticket back then. Also they said that it's hard to say because it's technology dependent (like jvm). Please double check on this, 

Hope it helps somehow


Featured Posts