prometheus/promdash — pull request #143 by grobie (2014-04-18 23:40:46+00:00)
Title: Add hostname and hostnamef filters

In most cases, the unqualifed hostname is enough to have a unique
identifier. The full hostnames usually repeat some common suffix/port.
This change adds the semantics of the unix "hostname" and "hostname -f"
commands.

Examples:

url = "http://foo.bar.baz.example.org:5030/metrics"

{{ url | hostnamef }} // foo.bar.baz.example.org:5030
{{ url | hostname }} // foo