Presenting ilias, yet another dashboard because obviously the world needed one more

You know how it goes. You're happily using [Homer](https://github.com/bastienwirtz/homer) or [Homepage](https://github.com/gethomepage/homepage) fo…

I’ve gone to write something almost exactly like this several times and never quite finished. I like how this is set up. It seems like one thing that could be improved is parameterizing the configs a bit so that e.g. matching a 200 status gives a standard label that doesn’t need added to every job

Loved that idea so much that I went and implemented it: - The checks now have an automatic type inferrence and shorthand - introduced default rules that are used when nothing’s configured - realized that yaml-anchors always worked thanks to the lib I’m using.

So now with this preamble:

# Defaults are used when nothing is defined at the slot level. They can be overridden by defining rules directly on a slot. defaults: rules: - match: code: 0 status: { id: ok, label: "✅" } - match: {} status: { id: error, label: "❌" } # YAML anchors: reusable fragments ilias doesn't interpret directly... # it's all just yaml _anchors: pct_rules: &pct_rules # works for disk, memory, CPU … - match: output: "^[0-6]\\d%$|^[0-9]%$" status: { id: ok, label: "✅ <70%" } - match: output: "^[7-8]\\d%$" status: { id: warn, label: "⚠️ 70–89%" } - match: {} status: { id: critical, label: "🔴 ≥90%" }

I can now have a tile like this:

- name: Memory slots: # combine anchors and default rules as well as check shorthands - name: usage check: "free | awk '/^Mem:/ {printf \"%.0f%\", $3/$2 * 100}'" rules: *pct_rules - name: available check: "free -h | awk '/^Mem:/ {print $7 \" free\"}'" # uses default rules - name: total check: "free -h | awk '/^Mem:/ {print $2 \" total\"}'" # uses default rules

And the best? It’s fully backwards compatible ❤️

Thanks again for the suggestion!

Cool ❤