Alert template functions/variables

Does an function exist for use in alert template that will print the hostname via shortname if in format of FQDN.

Im looking for this to shorten the subjects on emails to strip out (sub+)domain part.

Also is there an function to round numbers?

We don’t have those abilities. I’ve moved this to feature request.