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

Rough idea of price for a 30d query over 8000 hosts

jdsumsion
Participant

I was trying to figure out about how many host-unit-hrs I was paying for non-prod hosts.

fetch dt.entity.host
| fieldsAdd entity.type, entity.name, lifetime, tags, hypervisorType, memoryTotal, physicalMemory, paasMemoryLimit
| filterOut in(tags, array("[AWS]environment:prod", "environment-custom:prod"))
| fieldsAdd ts_30d_ago=now()-30d
| fieldsAdd start_ts=arrayMax(array(ts_30d_ago, toTimestamp(lifetime[start]))), end_ts=toTimestamp(lifetime[end])
| fieldsAdd hrs=ceil(toLong(end_ts-start_ts)/1000000000/60/60.0)
| fieldsRemove start_ts, end_ts
| fieldsAdd gb=if(paasMemoryLimit>0, paasMemoryLimit*1024*1024, else: memoryTotal)/1024/1024/1024.0
| fieldsAdd gb_hrs=gb*hrs
| summarize sum(gb_hrs), alias:total_gb_hrs
| fieldsAdd host_unit_hrs=total_gb_hrs/8

I ran the above query for 30d and it took 25sec.  But it said "Scanned bytes: 0 B" so I wasn't sure how expensive this query was in overall license cost.

Is there a general way to estimate license cost for a given query?

1 REPLY 1

Julius_Loman
DynaMight Legend
DynaMight Legend

Smartscape queries (dt.entity.host in your case) are not subject to cost and are free. 

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

Featured Posts