icinga

Icinga2 API client in Go
git clone https://git.olowe.co/icinga
Log | Files | Refs | README | LICENSE

service.tmpl (678B)


      1 {{define "title"}}{{.Name}}{{end}}
      2 
      3 {{define "content"}}
      4 <h1>
      5 	{{.DisplayName}}
      6 	<sub-title>{{.Name}}</sub-title>
      7 </h1>
      8 <p>{{.Notes}}</p>
      9 <table>
     10 	<tr><th>Last check</th><td><time>{{.LastCheck}}</time></td></tr>
     11 	<tr>
     12 		<th>State</th>
     13 		<td>
     14 			<chip class="{{if eq .State 0}}ok{{else if eq .State 1}}warn{{else if eq .State 2}}bad{{else}}unknown{{end}}">{{.State}}</chip>
     15 			{{if .Acknowledgement}}<chip class="info">Acknowledged</chip>{{end}}
     16 		</td>
     17 	</tr>
     18 	<tr><th>CheckCommand</th><td>{{.CheckCommand}}</td></tr>
     19 	<tr><th>Raw command</th><td><code>{{.LastCheckResult.RawCommand}}</code></td></tr>
     20 </table>
     21 
     22 <figure>
     23 	<pre>{{.LastCheckResult.Output}}</pre>
     24 </figure>
     25 {{end}}