0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-10 16:17:36 +00:00

Add dynamic rooms docs ()

* Add dynamic rooms docs

* fix typos, structure and wrong snippet

* simplify

---------

Co-authored-by: Fotis Voutsas <fotis@netdata.cloud>
Co-authored-by: ilyam8 <ilya@netdata.cloud>
This commit is contained in:
John Kapantzakis 2024-12-16 12:41:13 +02:00 committed by GitHub
parent d5211d5f63
commit 75b38d50a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,69 @@
# Node Membership Rules
Node Membership Rules automate Node organization within Rooms based on host labels. This simplifies infrastructure management by dynamically assigning Nodes to appropriate Rooms, eliminating manual intervention.
**Important**:
- Rules work with all Rooms except the "All Nodes" Room, as it includes all Nodes by default.
- Creating and editing Rules requires Node management permissions.
- Rules are evaluated in real-time as labels change.
- Exclusion rules always override inclusion rules.
## Rule Structure
The rules consist of the following elements:
| Element | Description |
|:--------|:--------------------------------------------------------------------------------------------------|
| Action | Determines whether matching Nodes will be included or excluded from the Room |
| Clauses | Set of conditions that determine which Nodes match the Rule (all must be satisfied - logical AND) |
Each clause consists of:
| Element | Description |
|:---------|:-----------------------------|
| Label | The host label to check |
| Value | The comparison method |
| Operator | The value to compare against |
Below is a conceptual representation of a rule that includes all production database Nodes. The structure is shown in YAML format for clarity:
```yaml
Action: Include
Clauses:
- Label: environment
Operator: equals
Value: production
- Label: service-type
Operator: equals
Value: database
```
## Rule Evaluation Order
- Inclusion rules are checked first
- Exclusion rules are checked second
If both match, exclusion wins
## Creating Rules
1. Access Settings
- Click ⚙️ (Room settings)
- Select "Nodes" tab
2. Create Rule
- Click "Add new Rule"
- Select Action (Include/Exclude)
- Add clause(s)
- Save changes
## Membership Status
Nodes can have multiple membership types in a Room:
| Status | Description |
|:----------------|:---------------------------|
| STATIC | Manually added to the Room |
| RULE | Added by matching Rule(s) |
| STATIC and RULE | Both manual and Rule-based |
You can view each Node's membership status in the Room's Nodes table under the "Membership" column.