Need a help

General discussion about Plugins for Cacti

Moderators: Moderators, Developers

Post Reply
Posts: 1
Joined: Wed Aug 21, 2019 5:18 am

Need a help

#1 Post by MaxP » Wed Aug 21, 2019 5:29 am


Is there a way to dynamically check for and ultimately select a subtree based on a HOST field?

Example: Existing Tree Structure:

Customers -
{123456} - Example Customer
Routers -
Host: blah
Switches -

A new device is added with the following description and notes:
Host Description: 123456-2950S-1

I would like to be able to check if the NODE 123456 is present and if so, add the new host under the appropriate SUB. Putting it in the right place isn't too bad but I haven't seen where it is possible to check for the existence of a sub-tree item.


Cacti Guru User
Posts: 3135
Joined: Sun Aug 27, 2017 12:05 am

Re: Need a help

#2 Post by netniV » Sat Aug 24, 2019 7:49 am

Currently, no. Because the device can be added to more than one location in a tree at the same time. You could add it as an enhancement request on GitHub but we'd probably have to make that select the first one found which may not be the one you expect.

User avatar
Cacti Pro User
Posts: 889
Joined: Mon Jan 05, 2015 10:10 am

Re: Need a help

#3 Post by Osiris » Wed Aug 28, 2019 6:21 pm

It would be simple to write though. 20 minutes work and maybe a redirect in the end. Something like: ... tion:12345}

Pass it a JSON array and it redirects with a special flag to open the found leaf and select device.
Before history, there was a paradise, now dust.

Post Reply