System name rather than host name

Is there a way to get LibreNMS to use the system name rather than host name in the alert emails and showing in the desktop? Most of my network equipment the host is the IP address and is not in dns so this would sure be helpful when getting an alert. Same would apply when look at alerts in the dashboard.

Thanks,

tk

You can switch to using sysnames in the web ui by setting this $config['force_ip_to_sysname'] = false; in config.php

For the alerts you will need to edit the alert templates that you are using and you can add something like this to the template.
Device Name: %sysName

All of this is covered in the docs.librenms.org
https://docs.librenms.org/#Support/Configuration/#webui-settings

https://docs.librenms.org/#Alerting/Templates/

1 Like

Thanks Kevin, worked great.

tk

1 Like

thx for hint

"Hi @Kevin_Krumm,

This works well for the body of the alert, I was however looking for a way to edit the Title.

For example, instead of Device Up/Down on “IP Address” it should output Device Up/Down on “SysName”

Any ideas?

Thanks.

Hi Kevin,

Did something change in how this is being handled? On alerts emailed I am now getting;
Device Name: %sysName
instead of the actual sysName that I used to get.

Thanks,

tk

Maybe … Deprecation notice: Alerting - Legacy transports and templates

Yeah, saw that and did the convert some time back. Tried taking that line out and moving it, still just get that.

Format changed, its now;
Device Name: {{ $alert->sysName }}

tk

1 Like