Tags are great for adding organization to your log events to aid in segmentation & filtering. They are metadata you can set on the source side, and can be included with any event that is transmitted to Loggly.
Setting Up Tags
Example of tags sent within a syslog header. Multiple tags are inserted using multiple fields.
Example of tags sent through the HTTP API. Multiple tags are separated by commas.
The HTTP header X-LOGGLY-TAG allow clients to tag log messages with 1 or more comma-delimited tags. If both the HTTP header is set and the URL contains tags, the tags are a union of the both. The general format of the field is:
Tags can then be used to form Source Groups, which will help segment your data & narrow down search results. It’s also possible to search your log data for tags with a search query. When searching tags with a period in them put the name of the tag in quotes.
Tags will be displayed within the Search screen as any other field would:
Tag values are always considered strings, even if the value is entirely numeric. The valid character set for a tag value includes all alpha-numeric characters, dash, period, and underscore. There is an exception to this, where the first character of a tag may only be alpha-numeric. The maximum length of an individual tag is 64 characters. If any of these restrictions is violated, the tag is stripped from the event. The event is still indexed as normal however.
The following are valid tag values.
x server1 us-east my_server 1234_zone logglydev2017.staging.wpengine.com apache
The following are invalid tag values.
_my_little_pony -us Room 1 apache$