We are developing automation script to setup metricbeat before start the metricbeat.
Our automation script does the following:
- Download and untar the metricbeat package (7.6.1) from elastic site.
- Enable system and oracle module through metricbeat enable command.
- Update system.yml file to enable additional metricsets.
- Update oracle.yml file to add oracle connection string.
- Update metricbeat.yml with elasticsearch and kibana host and port number. Also update if user provides username and password details for elasticsearch.
- Create a new directory structure to copy system and oracle visualization json files
- Setup dashboards using metricbeat --setup dashboards command.
NOTE : Currently elasticsearch and kibana running as a different docker container with no user credentials support.
Our automation script runs successfully with the above mentioned steps. Also if we setup the user and password for elasticsearch by updating in metricbeat.yml file and our automation script runs successfully.
Now we are changing our automation script to support providing key name instead of username and password for elasticsearch.
i.e. We are updating KEY name for username and password fields in metricbeat.yml
instead of actual username and password.
Now our automation script is failing if we provide username KEY and password KEY because of key is not created.
I have few questions on this issue currently facing
- When metricbeat --setup dashboards command is running, I assume metricbeat connects to kibana to load the visualization and not connecting to elasticsearch.
Please confirm my assumption is correct or not correct ?
Our elasticsearch container is running without user credentials support and eventhough if we provide some dummy username and password in metricbeat.yml and setup dashboard command is successfull. But if we provide KEY name, setup dashboard command is failing. Do we really need to create a KEY before setup dashboard command runs ? Also If elasticsearch is configured with user credentials support then do we need to create KEY before hand prior to load the dashboard?
Currently we are planning to update this user and password key in metricbeat.yml after ran the setup dashboard command. Is that fine ?
./metricbeat setup --dashboards
Exiting: error initializing publisher: missing field accessing 'output.elasticsearch.username' (source:'metricbeat.yml')
If we configure actual username and password, then we did not got the above error and dashboard loaded successfully.
Please respond. Thanks in advance.