DQL
Questions about Dynatrace Query Language
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DQL – Creating cost views

Mateusbmo1
Newcomer

Hello, everyone

Everything good? 
I need some help. I’m creating a view in Dynatrace to obtain the cost per service we currently use in our tenants.
However, I wasn’t successful in creating the view for “HTTP Monitor” and “Real User Monitoring.”

Could you please assist me?
I created a DQL view that works, but it only retrieves the costs for Services and Hosts:

ow should the query look for HTTP Monitor and Real User Monitoring?
fetch dt.system.events
| filter event.kind == "BILLING_USAGE_EVENT" and in(event.type, {"Full-Stack Monitoring"})
| lookup [fetch dt.entity.host], sourceField:dt.entity.host, lookupField:id, fields:{hostGroupName}
| fieldsAdd nome_do_host = entityName(dt.entity.host), monitoring_source = monitoring_source, hostGroupName
| summarize by:{event.type, nome_do_host, hostGroupName}, {`Uso do FullStack mode`=sum(billed_gibibyte_hours), `Uso de Infrastructure mode`=sum(billed_host_hours), IL=sum(billed_bytes), DP=sum(data_points), IB=sum(ingested_bytes)}
| fieldsAdd 
      Custo =
        if(event.type == "Full-Stack Monitoring", `Uso do FullStack mode` * 9999/100000, else:
        if(event.type == "Infrastructure Monitoring", `Uso de Infrastructure mode` * 22222/100000)), 
      Centro_de_custo = hostGroupName
| fields `Nome do servidor`=nome_do_host, Custo, `Tipo de monitoração`=event.type, `Uso do FullStack mode`, `Uso de Infrastructure mode`, Centro_de_custo
| summarize by:{`Nome do servidor`}, Custo = sum(Custo)
| sort Custo desc

1 REPLY 1

ZackE
Participant

Unfortunately, HTTP Monitor and Real User Monitoring billing events do not appear to be available in Grail yet. For now, all you really have are the classic metrics. Here are links Real User Monitoring and Synthetic Monitors billing metrics. I think this page should list all billing events available in Grail for your query above.

 

Featured Posts