KBEC-00512 - Run Elasticsearch Queries as Admin

1 minute readKnowledge base

Issue

There are some admin Elasticsearch queries that the reporting user is not allowed to run (e.g., /_cat/indices?v).

Environment

Resolution

You can do this with curl by providing the paths to the admin.crtfull.pem and admin.key.pem certificates:

curl -k -XGET 'https://127.0.0.1:9200/_cat/indices?v' -E /opt/electriccloud/electriccommander/conf/reporting/elasticsearch/admin.crtfull.pem --key /opt/electriccloud/electriccommander/conf/reporting/elasticsearch/admin.key.pem

You can also do this in PostMan by adding these two files to your Certificates. Once you’ve done so, you can turn authorization off and run all of your queries as admin. With power comes responsibility; careful when doing queries that change your CloudBees Analytics installation!

Tested product/plugin versions

CloudBees Analytics: All versions

This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.