icinga

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

host.tmpl (649B)


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