Custom device menu entry ... how to do it?

Hi guys , I have been trying to change the default url on some devices.
The idea is to click them and access directly to desired url.
librenms
Default url is https://[device_id]/.
I need to change it according service, for example , I need:
http://[device_ip]/nfsen/nfsen.php , http://[device_ip]/smokeping/smokeping.cgi , and so on.

Documentation mention to add following line to config.php:

$config['html']['device']['links'][] = ['url' => 'http://atssrv/open-audit/index/devices/{{ $device[\'sysName\'] }}', 'title' => 'Open-AudIT'];

But it is not clear for me how does this example works.
Can you please provide another example ?
Regards.
Leandro.

@Leandro_Roggerone Why are you doing it like this just use custom blade for that and you will get direct link to different services for example like:

There is documentation for that

If you want to direct link to smokeping graph there is also direct implementation of that via Latency TAB like

Just configure it correctly via global settings>external>smokeping integration where you provide url to smokeping and after that you can click on Smokeping tab and it will open smokeping graph of that device

Dear @jozefrebjak:
Yuour ansewer was very usefull.
1 First , now I can create a submenu with interest links next to Alerts … awesome.
2 Still can not edit per device menu.
Dont understand the use of:
Custom device menu entry.
It is not clear for my this sintax:

$config['html']['device']['links'][] = ['url' => 'http://atssrv/open-audit/index/devices/{{ $device[\'sysName\'] }}', 'title' => 'Open-AudIT'];

Adding this line adds an icon on every device.
I would like to add this icon on certain device with certain url.

3 About smokeoping integration.
Those graphs you are showin seems very nice, so have some questions.
LNMS, can generate automatically smokeping type graphs when adding device ?
if not:
Smokeping should be running on same server than lnms to have those graphs?
In my case , smokeping is on different server:
How can Iink a device to corresponding smokeping url ?

Thanks !!
Leandro.

I am not using per device custom links for now, so I cant help with that.

You need to enable smokeping integration and use cron to run script to add librenms devices to librenms.conf in smokeping there is some documentation for that.

I think that you can run smokeping somewhere else, there is only needs to have that rrd folder also on librenms install so for example to use rsync etc to achieve that. I am running smokeping on the same VM where is LibreNMS located so I don’t care about something like that, but I wan to run another smokeping in different location and then I will try to get configs to different machine from librenms just to get ping graphs from another location.

1 Like