I have an index which has information for available bytes on each host. I want to display free bytes in a table for all the hosts. I have a csv file which has the hostname and the total bytes for each server.
I am trying something like below:
index="perfmon" ([| from inputlookup:"HostTotalBytes_Lookup" | table host]) earliest=-5m latest=now
| eval TotalBytes=[| from inputlookup:"HostTotalBytes_Lookup" | table totalBytes]
| eval MemoryUsedPct = round((TotalBytes - Available_Bytes) / TotalBytes * 100, 2)
| chart max(MemoryUsedPct) as "Used Memory", max(Available_Bytes) as "Available Bytes" by host
But it returns an error: Error in 'eval' command: Fields cannot be assigned a boolean result. Instead, try if([bool expr], [expr], [expr]).
I understand that I am trying to store an entire table in one variable and trying to use it as separate bytes against each host. I am quite new to Splunk and don't really know what to use in this case. Any help would be highly appreciated.
My csv file looks like the following:
host,name,totalBytes host1,host1_name,16000000000 host2,host2_name,16000000000 host3,host3_name,16000000000 host4,host4_name,16000000000
... View more