bosun

How do i get absolute values for a series set in bosun?


I have following series set which has negative values, how do i convert them positive values? Not all values in the series are negative so multiplying with -1 may be the option


Solution

  • If using master you can do the following:

    $q = q("avg:rate:os.cpu{host=*bosun*}", "5m", "")
    map($q, expr(abs(v())))
    

    Since 0.6.0 is not released yet, this hasn't been published to our documentation. But you can find the documentation about map in https://raw.githubusercontent.com/bosun-monitor/bosun/master/docs/expressions.md .