Saved Patterns
Saved Patterns
Observium's Saved Patterns system allows you to store and reuse regex search patterns. Saved patterns can be loaded quickly from a dropdown instead of retyping complex expressions.
Permissions
Viewing patterns requires user level 5 or above. Creating, editing and deleting patterns requires user level 7 or above.
Supported Contexts
Saved patterns are associated with a search context. Currently supported:
- RANCID Config Search -- patterns for searching device configurations via the RANCID integration
Additional contexts may be added in future releases.
Creating a Pattern
Navigate to the Saved Patterns page from the main menu, or click the Manage button on the RANCID Config Search page. Click Create Pattern and fill in:
- Pattern Name -- a short descriptive name (e.g. "Find 10G interfaces")
- Regex Pattern -- the PCRE regular expression
- Context -- which search system the pattern is for
- Description -- optional longer description
You can also save search options along with the pattern:
- Multiline mode -- match across multiple lines
- Inverse search -- match lines that do not contain the pattern
- Case sensitive -- match case-sensitively
Personal and Global Patterns
By default, patterns are saved as Personal and are only visible to the user who created them.
Administrators (level 10) can mark a pattern as Global, making it available to all users. Global patterns appear with a "Global" label in the patterns table and in load dropdowns.
Editing and Deleting
Click the pencil icon to edit a pattern or the trash icon to delete it. Users can only modify their own patterns. Administrators can modify any pattern.
Loading Patterns
On search pages that support saved patterns, a Load Saved Pattern dropdown appears next to the search field. Selecting a pattern populates the search field and options, then automatically runs the search.