19 May 2025 12:42 PM
We are trying to make a dashboard that shows the disk usage for multiple servers for a month.
We tried to look at the normal server disk usage as being the truth for what to show.
Since we know we have to show it for multiple servers we also know we must use a list of servers for the dashboard.
Values to show are: disk.used, disk.avail and the total (used + avail)
When i tried to create something from scratch and using the available metrics disk.used / disk.avail for a host i get nothing like the space usage.
When i look at the space usage on a specific server, it also contains someting like entitySelector("type(DISK) AND fromRelationship.isDiskOf(type(HOST). I read it like this. If you want to show the total disk.usage you must "join" the information of disks known to a host. And then you can sum it up.
But the last part and disk.used for a server do not match.
Can somebody tell me where my logic fails?
Or just explain how i get the same as the server space usage as a list for multiple servers.
Solved! Go to Solution.
19 May 2025 02:26 PM
Hi,
I would say using Data explorer, you can add which metrics you are insterested and filter by host base or name or another properies.
Best regards
20 May 2025 07:05 AM
Anto, as i wrote in my initial post the number that is shown is wrong.
the disk.used is not the total of all disk used on a server. No idea of what it actualy is (i also asked that) but it looks like asking number of tires on the car, and the answer is 2. Yes there are 2 tires, but in total there are 5 (with the spare) but it's certainly not what the metric is giving me, so i tried to understand what is the metric actualy telling me.
20 May 2025 08:09 AM
Hi,
You have these disk metrics out of the box:
Make click in "Show in data explorer" and you can see which metrics and which filters they are using:
Best regards
20 May 2025 08:42 AM
That one is from the server (as i also mentioned before)
It certainly not using "only" one disk.usag (as i also wrote before)
It uses the same "sum" and link that Muhammad showed. So yes in the data explorer on the server it works, i can send it to the dashboard. But contains the host id , 3 times for the B & C and 6 times for A. So maintaining it is ....
20 May 2025 11:16 AM - edited 20 May 2025 11:16 AM
Hi,
Best way would be using tags instead of hostnames then.
Instead of "type(HOST),entityId(HOST-43E66F3800918100))", you can use "type(HOST),tag(XX:YY))".
Best regards
19 May 2025 10:41 PM
You can use this metric :
((builtin:host.disk.used:filter(or(in("dt.entity.disk",entitySelector("type(DISK) AND fromRelationship.isDiskOf(type(HOST))")))))+(builtin:host.disk.avail:filter(or(in("dt.entity.disk",entitySelector("type(DISK) AND fromRelationship.isDiskOf(type(HOST))")))))):splitBy("dt.entity.host"):sum
I think it will present the target total Disk space.
and kindly find the attached pic
20 May 2025 07:07 AM
Muhammad. that certainly seems to give me the total of all the disk used, where would i add the filter for selectig only server A / B and D ?
20 May 2025 07:46 AM
Can you create a Management Zone for them, or you will add the hosts manually like below :
((builtin:host.disk.used:filter(or(eq("dt.entity.host",HOST-B97413FA4A1FBB7D),eq("dt.entity.host","HOST-F85861AD01B335FE"))):filter(or(in("dt.entity.disk",entitySelector("type(DISK) AND fromRelationship.isDiskOf(type(HOST),entityId(HOST-B97413FA4A1FBB7D))")),in("dt.entity.disk",entitySelector("type(DISK) AND fromRelationship.isDiskOf(type(HOST),entityId(HOST-F85861AD01B335FE))")))))+(builtin:host.disk.avail:filter(or(eq("dt.entity.host",HOST-B97413FA4A1FBB7D),eq("dt.entity.host","HOST-F85861AD01B335FE"))):filter(or(in("dt.entity.disk",entitySelector("type(DISK) AND fromRelationship.isDiskOf(type(HOST),entityId(HOST-B97413FA4A1FBB7D))")),in("dt.entity.disk",entitySelector("type(DISK) AND fromRelationship.isDiskOf(type(HOST),entityId(HOST-F85861AD01B335FE))")))))):splitBy("dt.entity.host"):sum
Try it and tell me if it works with you
Best Regards
20 May 2025 07:57 AM
Hi Muhammad, adding the servers into each of the sub settings is a terrible idea (in my head). If you want to add modify it you have to do it multiple places. If this how it must done in DT well no way around but dosent change the fact that it's terrible. Logic would say create a list of host that you want to work with, and then add the additional metrics you want. Your example is the same as the data explorer shows for an individual server, where the server id is multiple times in the explorer. Not desired. HOST groups well would be a way to achive the same, by then using the host groups in stead of server names. But you still have that multiple times.
And yes i do know im trying to compare SQL with what the data extractor is doing 🙂 And you cannot compare apples and bananas..
20 May 2025 08:41 AM
Actually, you can create a Management Zone based on the Host Group. I believe this is the smoothest approach and allows you to use the first query I shared.
I hope this helps!
17 Jun 2025 07:50 AM
Management Zones might be what we need to use. Tanx for the sugestion.