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

Service memory consumption

Malaik
DynaMight Champion
DynaMight Champion

Hi Community

 

What is the  best way to capture the memory consumption for a specific service and raise an alert (with custom event if possible) with a specific threshold.

 

Example:

Raise an alert if service XXXX consume > 45% of memory.

 

Thanks.

Sharing Knowledge
5 REPLIES 5

ChadTurner
DynaMight Legend
DynaMight Legend

very interesting, im shocked that this isn't an option in custom event for alerting. You can do it from the service page but i would have thought it would be an option in the custom section since technologies(Processes) and Hosts are there to be added in. 

-Chad

Malaik
DynaMight Champion
DynaMight Champion

Thanks @ChadTurner 
So, we are both shocked.

Sharing Knowledge

Julius_Loman
DynaMight Legend
DynaMight Legend

Are you asking about memory for a service (service in the Dynatrace meaning)? That's not directly possible on the service level, but only on the process level for process group instances which provide the service.

You can setup custom events for alerting based on metric query expression (code):

builtin:tech.generic.mem.usage
:filter(
  in("dt.entity.process_group_instance", 
     entitySelector("type(PROCESS_GROUP_INSTANCE),
        fromRelationship.isInstanceOf(
            type(PROCESS_GROUP),toRelationship.runsOn(entityId(SERVICE-5EBAB25B2F3F0D01)))")
     ))
:splitBy("dt.entity.process_group_instance")
:auto


 Is this what you want to achieve? Or do you want that for OS services?

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Malaik
DynaMight Champion
DynaMight Champion

Thanks @Julius_Loman 

Yes possible in process level and tried before.

 

The doubte is when we have a process running multiple services, how can we detect which service is the most consumer.

 

Let think about it and try to find a way 🙂

Sharing Knowledge

It's simple - there is no way how to do that. That's because the memory is shared between services in a process instance. It's one piece of code. 

For CPU this is possible since you can measure the CPU cycles spent during request processing and Dynatrace is providing you with such metrics.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts