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

Dashboard - Disk usage

ArneV
Participant

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.

 

11 REPLIES 11

AntonPineiro
DynaMight Guru
DynaMight Guru

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.

AntonPineiro_0-1747661165125.png

Best regards

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

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.

Hi,

You have these disk metrics out of the box:

AntonPineiro_0-1747724814601.png

Make click in "Show in data explorer" and you can see which metrics and which filters they are using:

AntonPineiro_1-1747724854565.png

Best regards

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

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 ....

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

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

MuhammadGamal
Helper

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 

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 ?

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

 

MuhammadGamal_0-1747723253742.png

Try it and tell me if it works with you
Best Regards

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..

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!

Management Zones might be what we need to use. Tanx for the sugestion.

Featured Posts