Skip to content
Small script return log counts by minute, hour, day over X time range in an OpenShift Elasticsearch cluster.
Python Dockerfile
Branch: master
Clone or download
Pull request Compare This branch is 4 commits behind clcollins:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Dockerfile
README.md
elasticsearch-aggregator.py
requirements.txt
sre-agg-job.yaml

README.md

elasticsearch-aggregator

Usage

Installation

  1. Build image
docker build -t quay.io/<username>/elasticsearch-aggregator:latest .
docker push quay.io/<username>/elasticsearch-aggregator:latest
  1. If needed, make the image registry public
  2. Edit sre-agg-job.yaml with your updated image path above
  3. If needed, edit sre-agg-job.yaml to change the namespace where the ES stack is installed
  4. oc create the job

Retrieving logs

oc get pods --sort-by='{.metadata.creationTimestamp}' -l job-name=sre-es-agg -n openshift-logging -o name |\
  tail -n1 | awk -F/ '{print $2}' | xargs -n1 oc logs -n openshift-logging
You can’t perform that action at this time.