O'Reilly logo

The DevOps 2.0 Toolkit by Viktor Farcic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Self-Healing Based on Software Data

Let us put the response time we are logging through nginx to a good use. Since data is stored in ElasticSearch, we might do a few quick examples of using its API. We can, for instance, retrieve all entries stored inside the logstash index:

curl 'http://logging:9200/logstash-*/_search' \
    | jq '.'

Elastic search returned the first ten entries (default page size), together with some additional information, like the total number of records. There's not much use in retrieving all the entries, so let us try to narrow it down. We can, for example, request all records that have nginx as container_id value:

curl 'http://logging:9200/logstash-*/_search?q=container_id:nginx' \
    | jq '.'

The results are the same three ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required