Technology

Technology

Recovering Elasticsearch 7 after power outage

In case you encounted power outage or just blindly pressed restart button on your machine, there is high chance you will have some issues with your cluster. Mine has only one node, so there is no redundancy. If I lose indices then data is gone. Fortunately starting Elasticsearch and having red indicators not necessarily means data lose. I recently went that path. Log says that primary shards was missing. In such case you need to check if there are those indices listed: With that command look for red statuses. Internal mechanisms have this delay rule, so check every minute if

Technology

Install qemu-guest-agent with Ansible on Proxmox 7.2

I already have over 10 virtual machines in my home virtual environment. It is the number I find enough to start using some automation tools like Ansible. Installing Ansible on Ubuntu or CentOS systems is straightforward, just use regular apt or yum commands. With Ansible you can use commands or create scripts. First you should start with hosts definition file which by default is located at /etc/ansible/hosts. You can use different hosts file but then you need to point it while running commands. This one is default, so no need to do anything special here. Now going quickly to Proxmox’s

Technology

Trapping ctrl+c in Bash scripts

If you happen to have some Bash scripts and would like to abort it in clean way there is way to do it. You need to trap ctrl+c command. In case you have some while loop in your scripts, without it, pressing any abort commands is only half way effective. Now, with ctrl+c trapped, you can cleanly abort your script without things still running.

Technology

Installing Metricbeat 7.17 agent on Ubuntu

Once you have installed Elasticsearch and Kibana servers you need to grab some data. First choice could be beats modules, either Metricbeat or Packetbeat. There is also Filebeat. Altough installation instructions are available at https://www.elastic.co/guide/en/beats/metricbeat/7.17/metricbeat-installation-configuration.html I found it useful to describe it separately as this page might just disappear out of a sudden. After installation you need to change the configuration file at: Change Kibana and Elasticsearch output addresses. Then start the agent: In case this is the first time you are installing the agent against this particular Elasticsearch server you need to load visualizations and dashboard definitions: Now you’re

Technology

Elasticsearch 7: Could not locate that index-pattern

Recently I’ve been tryout Elasticsearch 7 with Kibana and Metricbeat as well as Filebeat. I encountered some issues with indices so I dropped dashboards and visualizations and tried to load them again. I also cleared indices and patterns thru index management page. If you get error message like “could not locate that index-pattern” or something with fields being non-optimized then you should take few actions. Please note that it was my lab Elastic installation so I do not care about deleting indices. First you need to either stop all of your metricbeat modules sending data to the cluster or do