Hi,
I have some search output that is 6 decimal places in the table output. I don't want any decimal places. How do I remove these?
Search is:
index=coreops sourcetype="snmp_stats" HOST=IVE* |stats avg(CONNECTIONS) as CONNECTIONS, avg(MEM) as MEM, avg(CPU) as CPU by HOST |sort - num(CONNECTIONS)
You can simply use a fieldformat command to change how the number is displayed without actually changing the content.
index=coreops sourcetype="snmp_stats" HOST=IVE* |stats avg(CONNECTIONS) as CONNECTIONS, avg(MEM) as MEM, avg(CPU) as CPU by HOST | fieldformat CONNECTIONS=round(CONNECTIONS, 2) | fieldformat MEM=round(MEM, 2) | fieldformat CPU=round(CPU, 2) | sort - num(CONNECTIONS)
You can simply use a fieldformat command to change how the number is displayed without actually changing the content.
index=coreops sourcetype="snmp_stats" HOST=IVE* |stats avg(CONNECTIONS) as CONNECTIONS, avg(MEM) as MEM, avg(CPU) as CPU by HOST | fieldformat CONNECTIONS=round(CONNECTIONS, 2) | fieldformat MEM=round(MEM, 2) | fieldformat CPU=round(CPU, 2) | sort - num(CONNECTIONS)