07 Oct 2022 10:27 PM
I have a dashboard graph using metric key builtin:tech.generic.mem.usage and filtering to a specific process, showing 20+ hosts with that process. I am aware of how you can append or put the host name into the process name so that the process name is changed but we do not want to rename the process name. Is there a way of somehow also showing the hostname for each process in the dashboard tile? Keeping in mind that I do not want to rename the process to include the host name.
Solved! Go to Solution.
08 Oct 2022 08:00 AM
Hi @sivart_89,
You can't solve it with builtin:tech.generic.mem.usage metric becasue ithas only one dimension for splitby: process group instance.
I have found another metric which has more dimensions but I don not understand the collection logic because it is not continous and I have not found any other information about this metric in the documnetation.
builtin:process.memory:splitBy("dt.entity.process_group_instance","host.name"):sort(value(auto,descending)):limit(10)
Result in the demo live:
Could you please check it in your environmnet.
Best regards,
Mizső
10 Oct 2022 03:24 PM
Thanks for the info here. Seems we are not collecting data for this metric for whatever reason, ever ran into this?
10 Oct 2022 04:35 PM
Hi @sivart_89,
This is not a proper metric for you sorry. You should use your original metric with the suggestion of Julius. I tried the parents transformation and worked fine with your original metric.
Best regards,
Mizső
10 Oct 2022 07:22 PM
Thanks. Just replied to Julius. As noted with that comment, it seems the hostname does not show when filtering to a specific process but works fine if you are not doing any filtering.
08 Oct 2022 10:00 AM
Hey @sivart_89 and @Mizső ,
why are you not using the :parents transformation in the code tab? This adds the host dimension to the existing metric.
builtin:tech.generic.mem.usage:parents:splitBy("dt.entity.process_group_instance","dt.entity.host"):sort(value(auto,descending)):limit(100)
Super cool, but often overlooked feature.
Regards
Julius
10 Oct 2022 07:22 PM
Very interesting! I'll be the first to note that the transformations are not something I look too much at, guess I should. I charted this out and yes it works great for when you are not filtering to a specific process but in our case we have a specific process name. Have you been able to get this to work when filtering to a specific process?
10 Oct 2022 09:09 PM
@sivart_89 sure it works, this is an example - what issues do you have?
builtin:tech.generic.mem.usage :filter(and(or(in("dt.entity.process_group_instance",entitySelector("type(process_group_instance),entityName.startsWith(~"SpringBoot api-gateway-*~")"))))) :parents :splitBy("dt.entity.process_group_instance","dt.entity.host") :sort(value(auto,descending)) :limit(100)
10 Oct 2022 09:38 PM
I think I didn't have the transformation in the right spot 🙂 I see it now when I filter only with the process name but we are also using a tag filter coupled with the process name. When using the tag filter I do not see the host name but if I remove it so that the only filter is the process name then I do see it. I think this works for us but still trying to understand why it isn't working with the tag filter
11 Oct 2022 08:43 AM
Can you paste your metric selector?
It works for me:
13 Oct 2022 03:13 PM
thanks for teh screenshot, this helped a lot. I see what I did wrong, I did not have the dt_entity_host in my split by. Thanks for the help here! I've got a lot to learn with metric expressions
Before:
:splitBy("dt.entity.process_group_instance")
After:
:splitBy("dt.entity.process_group_instance","dt.entity.host")
07 Nov 2022 06:20 PM
Wow, freaking amazing. had no idea that this could be done. Thanks for sharing.
08 Oct 2022 11:19 AM
It is noted. 🙂 Thanks for sharing it!
Best regards,
Mizső