31 Aug 2022 10:26 PM
I have a multi-dimension custom metric that returns three dimensions. I would like to just filter and get one particular dimension:
metricId,name,column,host.name,dt.host_group.id,dt.entity.host,time,value
custom.mymetric,Foobar,cpulmt,myserver.example.com,Linux,HOST-A1FE2C339700D559,2022-08-30 19:47:00,18.200000762939453
custom.mymetricFoobar,cpupct,myserver.example.com,Linux,HOST-A1FE2C339700D559,2022-08-30 19:48:00,81.7
custom.mymetrixFoobar,iops,myserver.example.com,Linux,HOST-A1FE2C339700D559,2022-08-30 19:49:00,2023
What would I add to my V2 API query to just get "cpulmt" column records?
Any help appreciated.
Lou
Solved! Go to Solution.
01 Sep 2022 12:57 AM
A few pointers:
1) Please read this page to understand the syntax and options.
2) Why are you pushing infra metrics on something with a host ID? You get that already with the OneAgent?
2) The time field won't work as you expect. As per above page it should be timestamp in UTC millis.
3) Those lines don't work as they are listed above.
Finally, it looks like you're trying to add metrics where a OneAgent is already available on that host? If so, why not use dynatrace_ingest utility instead. Topology relationships happen "automatically".
If you do actually want to push metrics from outside (via the API) then I'd either suggest 3 separate metrics:
custom.mymetric.cpulmt,hostname="myserver.example.com",os="Linux",dt.host_group.id="HOST-A1FE2C339700D559" 18.200000762939453
custom.mymetric.cpupct,hostname="myserver.example.com",os="Linux",dt.host_group.id="HOST-A1FE2C339700D559" 81.7
custom.mymetric.iops,hostname="myserver.example.com",os="Linux",dt.host_group.id="HOST-A1FE2C339700D559" 2023
OR push a single metric with a new dimension (split & filter):
custom.mymetric,type="cpulmt",hostname="myserver.example.com",os="Linux",dt.host_group.id="HOST-A1FE2C339700D559" 18.200000762939453
custom.mymetric,type="cpupct",hostname="myserver.example.com",os="Linux",dt.host_group.id="HOST-A1FE2C339700D559" 81.7
custom.mymetric,type="iops",hostname="myserver.example.com",os="Linux",dt.host_group.id="HOST-A1FE2C339700D559" 2023
Perhaps you could elaborate on the actual usecase and I can advise the "correct" solution?
16 Dec 2022 08:57 AM
Hi @louis_gallo., was the below reply helpful? If not, please share more details so the Community members could help you fully 😉