Reference device by its name instead of ID

Is it possble to reference a device by its name from external system?
URL usually looks like this “http://librenms/device/device=22
Is it possible to do it like “http://librenms/device/myswitch” ?

I tested it and it does not throw an error but there is no any info displayed.

Have you tried the sysname or the host name?

I tried sysname

Documentation says you can/should be able to.

https://docs.librenms.org/API/Devices/

Yes, that.s correct but i’m not trying to do this through API but straight to WebUI.

i tried it in Browser with hostname and it was successfully.
Eventually you’ve to transport login information with it, if you’re not logged in

That’s great to hear. I’m logged in while trying. Would you be kind and share what your URL looks like when performing test?

this is what i use and it doesnt work
http://librenms/device/kbg10-accs-sw-01

have you tried FQDN like it’s shown?

If you mean http://librenms.domain.com/device/kbg10-accs-sw-01 then yes. I’m just not desplaying it for security reasons.

This is what it looks like.

do you use Release Version oder daily synct Version?

Daily synced

Version 1.61-85-gd4aa45039 - Mon Mar 30 2020 19:40:57 GMT+0200
Database Schema 2020_03_24_0844_add_primary_key_to_device_graphs (160)
Web Server Apache/2.4.29 (Ubuntu)
PHP 7.2.24-0ubuntu0.18.04.3
MySQL 10.1.44-MariaDB-0ubuntu0.18.04.1
RRDtool 1.7.0

have you tried a hostname different to “kbg10-accs-sw-01”.
I have no “-” in it. Also not sure if this character is officially allowed in a hostname/FQDN. I tested it with a myhostname.my.own.domain structure containing only a-z and 0-9, and it works well.

BTW.
the link should be:
http://librenms.domain.com/device/device=kbg10-accs-sw-01

and not
http://librenms.domain.com/device/kbg10-accs-sw-01

Now…that tip made a difference. Together with post before. Instead of changing hostname i used ip-address and it worked

http://librenms.domain.com/device/device=10.2.2.5

Hello again!

Has anything been changed in regard to this topic? This doesn’t work anymore.
This time i get “404 not found”

URL has definitely been changed. No more “device=” Its straightforward librenms.domain.com/device/id
I’m not able to link directly to a device via URL by hostname nor sysname. Only ID works.

I used to do this from Netbox via custom link. I use Netbox as inventory source

1 Like

I am having the same problem.
How should I deal with it?

It seems this was removed ;(

2 Likes

Good news everyone, new version is under development so this feature will come back probably in next release

2 Likes