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

Dashboard - service IDs instead of tag

sshinde_24
Newcomer

Hi,

I want to use service IDs instead of tag, help replace tag(\"",$MyServices,"\")  with ID.


timeseries count = sum(dt.service.request.count), by: { endpoint.name },
filter: { endpoint.name in[fetch dt.entity.service_method
| filter in(id, classicEntitySelector(concat("type(service_method),fromRelationship.isServiceMethodOfService(type(SERVICE),tag(\"",$MyServices,"\"))")))
| fields entity.name ] }
| sort arraySum(count) desc
| limit 20

4 REPLIES 4

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

Why do you prefer IDs? I think using tags would be more flexible.

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

dannemca
DynaMight Guru
DynaMight Guru

That would be like this:

timeseries count = sum(dt.service.request.count), by: { endpoint.name },
filter: { endpoint.name in[fetch dt.entity.service_method
| filter in(id, classicEntitySelector(concat("type(service_method),fromRelationship.isServiceMethodOfService(type(SERVICE),entityID(\"",$MyIDs,"\"))")))| fields entity.name ] }
| sort arraySum(count) desc
| limit 20

Assuming you have a var called MyIDs with the ID list.
Try and let us know

Site Reliability Engineer @ Kyndryl

sshinde_24
Newcomer

 

Thanks for the solution. Unfortunately, it didn’t work as expected — I’m not seeing any records in the output

 

Can I suggest a different approach?
Jump to notebooks/dashboard from the services app.

PacoPorro_0-1756378321176.png

Select the service you need from the service app, and from the overview, throughput, 3 dots open with

Featured Posts