3 ms·
About 5 or 6 years ago, my previous job introduced ElasticSearch to our infrastructure. Our existing codebase had a pattern where all logs for a transaction we
by t-writescode 5y ago
About 5 or 6 years ago, my previous job introduced ElasticSearch to our infrastructure.
Our existing codebase had a pattern where all logs for a transaction were stored in a single, big log and then that log was uploaded to a server to be stored.
We moved this large log to ElasticSearch, formatted it differently, labeled a bunch of columns, used Logstash to standardize variable names, etc.
We did this for our main services and kept those services separated as different indexes.
Each log had what user did the web request, response codes, we had detailed logging and general logging stored in 2 separate places and threw out the detailed logs after a very short while. We had fields for all common detail work.
It. Was. Perfect. Everyone could use it. Our in-house customer support team used those logs to help diagnose customer issues, our tech team used it to track issues. Our NOC used it to investigate issues.
We had tens of dashboards that were on a rotating view. We had at-a-glance server health tracking through it, all from active traffic that was being formatted and used.
-
And then the next company I worked with that used ElasticSearch tried to use it in a world where each logger.info() was its own row in ElasticSearch. That just seemed like a horrible, horrible idea.
It really does seem to come down to how you use it.