bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/cmd/bosun/dev.sample.conf (about)

     1  notification default {
     2  	email = john@example.org
     3  	print = true
     4  }
     5  
     6  template generic {
     7  	body = `<a href="{{.Ack}}">Acknowledge alert</a>
     8  	<p>Alert definition:
     9  	<p>Name: {{.Alert.Name}}
    10  	<p>Crit: {{.Alert.Crit}}
    11  	
    12  	<p>Tags
    13  	
    14  	<table>
    15  		{{range $k, $v := .Group}}
    16  			{{if eq $k "host"}}
    17  				<tr><td>{{$k}}</td><td><a href="{{$.HostView $v}}">{{$v}}</a></td></tr>
    18  			{{else}}
    19  				<tr><td>{{$k}}</td><td>{{$v}}</td></tr>
    20  			{{end}}
    21  		{{end}}
    22  	</table>
    23  
    24  	<p>Computation
    25  	
    26  	<table>
    27  		{{range .Computations}}
    28  			<tr><td>{{.Text}}</td><td>{{.Value}}</td></tr>
    29  		{{end}}
    30  	</table>`
    31  	subject = {{.Last.Status}}: {{.Alert.Name}}: {{.Eval .Alert.Vars.q}} on {{.Group.host}}
    32  }
    33  
    34  alert example.opentsdb.os.high.cpu {
    35  	template = generic
    36  	$q = avg(q("avg:rate{counter,,1}:os.cpu{host=*}", "2m", ""))
    37  	warn = $q > 20
    38  	crit = $q >= 1
    39  }
    40  
    41  lookup cpu {
    42  	entry host=a,remote=b {
    43  		high = 1
    44  	}
    45  	entry host=*,remote=17* {
    46  		high = 4
    47  	}
    48  	entry host=matts-macbook-pro,remote=* {
    49  		high = 2
    50  	}
    51  	entry host=*,remote=* {
    52  		high = 3
    53  	}
    54  }
    55  
    56  alert example.opentsdb.cpu.lookup {
    57  	crit = lookup("cpu", "high")
    58  }
    59  
    60  alert example.graphite {
    61     crit = avg(graphite("*.cpu.*.cpu.user", "5m", "", "host..cpu")) > 1
    62  }