Skip to content

Instantly share code, notes, and snippets.


Lukáš Vlček lukas-vlcek

View GitHub Profile
View Increase log levels on ES cluster in OCP
oc exec <es_pod> -c elasticsearch -- es_util --query=_cluster/settings?flat_settings=true -X PUT -d \
"transient": {
"logger": {
"org.elasticsearch.ingest.openshift": "TRACE",
"org.elasticsearch.action": "DEBUG"
View com.redhat.viaq-openshift-project.template.json
"aliases": {
".all": {
"index_patterns": [
"mappings": {
lukas-vlcek / gist:a61aea97ebe4c2bf22651c3694e76c71
Last active Aug 9, 2019
Dots in fields problem when upgrading from ES2 to ES5
View gist:a61aea97ebe4c2bf22651c3694e76c71
# Start fresh ES 2.4.6 with dots in field names enabled
$ ES_JAVA_OPTS="-Dmapper.allow_dots_in_name=true" ./bin/elasticsearch
# Index two documents with conflisting mappings (conflisting from the ES5 perspective)
# See:
$ curl -X POST localhost:9200/test/type -d '{"":1}'
$ curl -X POST localhost:9200/test/type2 -d '{"foo":1}'
View gist:f659ad6157e185d6d869770fc660bccd
$ oc describe po ruby-ex-1-r72kx
Name: ruby-ex-1-r72kx
Namespace: lvlcek
Priority: 0
PriorityClassName: <none>
Start Time: Mon, 24 Jun 2019 14:58:56 +0200
Labels: app=ruby-ex
lukas-vlcek / gist:7a19dd6e66e3366e869114c58223e771
Last active Jan 22, 2019
5.x release tags of Prometheus ES plugin
View gist:7a19dd6e66e3366e869114c58223e771
Tag Correct hash Wrong hash Should have been Note
master, 5.x master, 5.x 5.x 0d0b738 c5794ed 1c24705 15d9cb3 9367988 2dafc5e f50587e ce171c7 a4a149f 112bb35 89f9cb2 a08fdbf ab155c7 27b1f30
View Blocked from mvn2 central
$ gradle clean
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'prometheus-exporter'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not download build-tools.jar (org.elasticsearch.gradle:build-tools:6.5.3)
> Could not get resource ''.
> Could not GET ''. Received status code 403 from server: Forbidden
View gist:e0d839447f44a5655f9531e34d49abcd
$ uname -a
Darwin Lukass-MacBook-Pro-2.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64
$ git remote -v
origin (fetch)
origin (push)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
View gist:376be10b65e1491271bafa9c688a2b25
$ uname -a
Linux 4.15.17-200.fc26.x86_64 #1 SMP Thu Apr 12 18:28:26 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ git remote -v
origin (fetch)
origin (push)
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
View gist:c9102428242b107122cfa480bfc18c06
[lvlcek@dhcp-2-178 test-deploy]$ make WHAT=lvlcek sh
cd "gcp-dev"/ && ../../bin/
Activated service account credentials for: []
bash-4.2$ pwd
bash-4.2$ ansible-playbook -i inventory playbooks/openshift-grafana/config.yml
[WARNING]: * Failed to parse /usr/share/ansible/openshift-ansible/inventory/dynamic/gcp/ with script plugin: Inventory script (/usr/share/ansible/openshift-
ansible/inventory/dynamic/gcp/ had an execution error: Traceback (most recent call last): File "/usr/share/ansible/openshift-
lukas-vlcek / gist:dd126b41ac61d2c36908666ccf369e48
Created May 7, 2018
Prometheus metrics pulled from ES node
View gist:dd126b41ac61d2c36908666ccf369e48
sh-4.2$ es_util --query=_prometheus/metrics
# HELP es_indices_percolate_count Count of percolates
# TYPE es_indices_percolate_count counter
es_indices_percolate_count{cluster="logging-es",node="logging-es-data-master-f5trnjwj",nodeId="q5KN3f6TQnGMlwAhH9wbjQ",} 0.0
# HELP es_transport_rx_bytes_count Bytes received
# TYPE es_transport_rx_bytes_count counter
es_transport_rx_bytes_count{cluster="logging-es",node="logging-es-data-master-f5trnjwj",nodeId="q5KN3f6TQnGMlwAhH9wbjQ",} 19695.0
# HELP es_script_compilations_count Number of scripts compilations
# TYPE es_script_compilations_count counter
es_script_compilations_count{cluster="logging-es",node="logging-es-data-master-f5trnjwj",nodeId="q5KN3f6TQnGMlwAhH9wbjQ",} 0.0