round
round 関数は、x に一番近い整数を返します。
構文
round(<x>) as <field>
例
次のクエリを使用して、特定の Source Host のメッセージ ボリュームを計算できます。round 関数を使用すると、ボリュームに一番近い整数値を取得できます。
_index=sumologic_volume
| where _sourceCategory="sourcehost_volume"
| parse regex "(?<sourcehost>\"[^\"]+\")\:\{\"sizeInBytes\"\:(?<bytes>\d+),\"count\"\:(?<count>\d+)\}" multi
| bytes/1024/1024 as MB
| sum(MB) as MB by sourcehost
| round(MB)