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.
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.
Result in the demo live:
Could you please check it in your environmnet.
Thanks for the info here. Seems we are not collecting data for this metric for whatever reason, ever ran into this?
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.
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.
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.
Super cool, but often overlooked feature.
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?
@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)
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
Can you paste your metric selector?
It works for me:
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
Wow, freaking amazing. had no idea that this could be done. Thanks for sharing.
It is noted. 🙂 Thanks for sharing it!