Creating Rules
Learn how to create effective highlight rules for your needs.
Rule Basics
Each highlight rule consists of two components:
- Text to match: The string you want to highlight
- Colour: The highlight colour to apply
Text Matching
Exact Matching
Live Highlighter matches text exactly as you enter it:
- "Production" will match "Production" but not "production"
- "error" will match "error" but not "Error"
Case Sensitivity
Text matching is case-sensitive. If you want to match both "Error" and "error", create two separate rules.
Partial Matching
Rules match text anywhere it appears:
- A rule for "prod" will highlight "prod" in "production", "products", etc.
- Be specific to avoid unwanted matches
Available Colours
Live Highlighter provides 6 carefully selected colours:
| Colour | Common Uses |
|---|---|
| Red | Critical items, production environments, errors |
| Orange | Warnings, important but not critical items |
| Yellow | Staging environments, caution items |
| Green | Safe items, dev environments, success messages |
| Blue | Informational items, secondary highlights |
| Purple | Custom categories, special cases |
Colour Psychology
Consider using red for critical/dangerous items, yellow for caution, and green for safe items. This follows common colour conventions and makes highlights more intuitive.
Creating Effective Rules
Be Specific
Good: - "api.production.company.com" - "[PROD]" - "environment: production"
Not recommended: - "prod" (too broad, matches "product", "production", etc.) - "test" (matches too many unrelated words)
Use Consistent Patterns
If your systems use consistent naming conventions, leverage them:
- Create rules for environment prefixes: "prod-", "staging-", "dev-"
- Highlight status tags: "[ERROR]", "[WARNING]", "[INFO]"
- Target specific fields: "Status: Active", "Type: Critical"
Prioritize Important Rules
Since rules are processed top-to-bottom, place more important or specific rules higher in the list:
- "production-database" (red) - specific and critical
- "production" (red) - general production items
- "prod" (orange) - catch-all for prod-related items
Rule Limits
- No hard limit on number of rules
- Performance remains fast even with many rules
- Consider your actual needs - more rules aren't always better
Examples by Use Case
Cloud Environment Management
Log Monitoring
Security Monitoring
Next Steps
- Learn how to manage your rules effectively
- Explore more use cases for inspiration