Files
Cactidocumentation/Tree-Rules.md
T
Thomas Vincent 5fba760f72 docs(templates): [1.2.x] correct device, data source, graph, template and report pages against the source (#267)
* docs(templates): [1.2.x] correct device, automation and tree pages against the source

Align field labels, rule matching and tree rule behavior with the 1.2.x source.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs(templates): [1.2.x] correct data source, data input, data query and variable pages against the source

Align special type codes, XML keys, example values and variable lists with the 1.2.x source.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs(templates): [1.2.x] correct template, graph, CDEF and aggregate pages against the source

Align field labels, special data source names and aggregate graph type behavior with the 1.2.x source.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs(templates): [1.2.x] correct report pages against the source

Align report column and field labels with the 1.2.x source.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-11-23 15:11:51 -05:00

45 lines
1.7 KiB
Markdown

# Automation Tree Rules
This section will describe **Tree Rules** in Cacti.
Tree rules allow Automation to bunch up devices based on matches
on rules we come up with you can say bunch all Cisco devices on to a Cisco tree.
Or if you have a site where all of the hostnames start with siteb you can
have a site b tree etc see below for some examples.
To get started you will need to create a Tree rule on the top right click the +
to start a new rule you are also able to duplicate rules to make it easier as well.
![Tree Rules](images/automation-tree-rules.png)
![Tree Rules Edit](images/automation-tree-rules-edit1.png)
![Tree Rules Item Edit](images/automation-tree-rules-edit2.png)
We need a way to tell automation what device we are looking for
in the example above we are looking for a device with the hostname Linux
this is done via a REGEX using the `matches regular expression` operator,
which the database evaluates with its `REGEXP` operator.
To test this REGEX on existing devices you can click the show eligible Objects
this will check the Devices currently in cacti for a match.
![Tree Rules Preview](images/automation-tree-rules-edit4.png)
Once a device is a match it will be placed on the default tree.
To change which tree the device will be placed on simply select the tree name
from the dropdown list.
![Tree Rules Item Edit](images/automation-tree-rules-edit3.png)
We also have the option to create a branch (a header) in the selected tree based
on our rule. In this case a new branch named Linux will be created in that tree
if it does not already exist.
## Video Walkthrough
[![Video Tutorial](http://img.youtube.com/vi/yxO-CgaeFNc/0.jpg)](https://youtu.be/yxO-CgaeFNc "Video Tutorial")
---
Copyright (c) 2004-2026 The Cacti Group