cityindex-attic / logsearch

[unmaintained] A development environment for ELK
Apache License 2.0
24 stars 8 forks source link

Add environment tag to shipper configurations #150

Closed sopel closed 11 years ago

sopel commented 11 years ago

That's a so far unfiled issue from https://github.com/cityindex/logsearch-on-aws/issues/10 still:

While it isn't finally decided how to cluster the various environments, it is pretty clear that each should carry a respective tag to allow joined index and query usage with respective selectors.

dpb587 commented 11 years ago

This is more to do with modifying the shipper configuration file which I think is currently in a state of flux from other refactorings.

Assuming each environment has a separate configuration, the following could be added to the filter section...

grok {
    add_field => [ "@env", "ppe" ]
}

Or assuming combined inputs from multiple environments, the add_field directive should be on every input.

mrdavidlaing commented 11 years ago

Yep, its a shipper setting.

The field currently being used is @environment with settings of "LIVE" and "PPE" (currently)

See http://logsearch.cityindextest5.co.uk/#/dashboard/elasticsearch/IP%20Diagnostics%20LIVE%20filtered for a report that uses this to filter the data

mrdavidlaing commented 11 years ago

All shippers have been updated to add a add_field => [ "@environment", "{PPE/LIVE}" ]

eg: https://github.com/cityindex/logsearch-on-aws/blob/master/ppe-cluster/shippers/diagnostics/config/filters.erb#L2