index=_introspection host=* component=Hostwide
| eval percentage=(round((($data.mem_used$/$data.mem$)*100), 2))
| eval total_mem=(round(($data.mem$/1024), 2))." Gb"
| eval used_mem=(round(($data.mem_used$/1024), 2))." Gb"
| where percentage>=95
| stats first(total_mem) as "Total Memory", first(used_mem) as "In Use", first(percentage) as "% Used" by host
host Total Memory In Use % Used
xx1 31.99 Gb 31.10 Gb 97.23
xx2 4.00 Gb 3.93 Gb 98.33
If i save this search in a dashboard panel the table will show "waiting for input" due to the presence of the $ character in my search. Can i replace that character with a different one ?
Thank you in advance
Never mind. I am an idiot. It works if you put double $ .
index=_introspection host=* component=Hostwide
| eval percentage=(round((($$data.mem_used$$/$$data.mem$$)*100), 2))
| eval total_mem=(round(($$data.mem$$/1024), 2))." Gb"
| eval used_mem=(round(($$data.mem_used$$/1024), 2))." Gb"
| where percentage>=95
| stats first(total_mem) as "Total Memory", first(used_mem) as "In Use", first(percentage) as "% Used" by host
Never mind. I am an idiot. It works if you put double $ .
index=_introspection host=* component=Hostwide
| eval percentage=(round((($$data.mem_used$$/$$data.mem$$)*100), 2))
| eval total_mem=(round(($$data.mem$$/1024), 2))." Gb"
| eval used_mem=(round(($$data.mem_used$$/1024), 2))." Gb"
| where percentage>=95
| stats first(total_mem) as "Total Memory", first(used_mem) as "In Use", first(percentage) as "% Used" by host
Hey, I converted your comment to the answer. Please mark it as such.
No one will be upset that you answered your own question. It happens all the time!