Here’s how to tell Papertrail to turn pieces of your log messages into click-to-search elements. When those elements are clicked in the event viewer, it shows surrounding messages that match that element.
Situations where you might want to use click-to-search:
"user_id=1234". Creating a custom clickable element with the regular expression
user_id=\d+would make the string “user_id=1234” clickable.
Custom elements can also apply to email addresses, request IDs, domain names, source code filenames, or any other parts of a log message — you get to decide.
The whole organization sees the same list of clickable elements (including any custom elements), but enabling and disabling elements will only affect your view. So don’t be concerned that you’re enabling an element for a colleague who might not want it.
Papertrail creates several common elements to start with:
These are maintained by Papertrail and can’t be modified. You can create as many custom elements as you like.
To create custom elements, click I want to add my own… at the bottom of the list (or Add more… if there are a few already):
to see the form to add and manage elements:
When finished, save the custom elements and click Back to Event Viewer Settings. The newly-created custom elements will be in the list for activation.