Ansible Don’t Wait All Hosts To Complete A Task

Published on Author gryzliLeave a comment

Sometimes you don’t want to wait all hosts to complete a task, before going to the next one in Ansible.   For example you have the the following scenario 1) Stop web server 2) Do some magic  (takes different time on different hosts) 3) Start web server   You don’t want your web servers to… Continue reading Ansible Don’t Wait All Hosts To Complete A Task

Calculate Maximum MySQL Memory Usage

Published on Author gryzliLeave a comment

Recently I found the following script pretty handy for calculating the maximum amount of memory mysql could use, based on the current buffers configuration.   This is the source: #!/bin/sh# you might want to add some user authentication here mysql -e “show variables; show status” | awk ‘ { VAR[$1]=$2 } END { MAX_CONN =… Continue reading Calculate Maximum MySQL Memory Usage

Rotating Indexes in ElasticSearch with Curator

Published on Author gryzliLeave a comment

At certain point in time, you will want to rotate (delete) your old indexes in ElasticSearch. Most of the time people are using time based naming convention for their index names like: index_name-Year-Month-Day or index_name-Year.Month.Day. Tools like Filebeat/Logstash can also use such naming conventions. Before you go and write your own script that will do… Continue reading Rotating Indexes in ElasticSearch with Curator

Configure Nginx Reverse Proxy For Grafana Access

Published on Author gryzliLeave a comment

Proxying Grafana with Nginx is easy, but there are some small thins that needs to be considered. If you have already tried this and received strange errors like: 192.168.1.1 – – [09/May/2019:10:26:58 +0300] “-” 000 0 “-” “-” “-“ or 499 errors in your nginx proxy logs or Grafana dashboard graphics not being loaded most… Continue reading Configure Nginx Reverse Proxy For Grafana Access

Nginx Proxying Long URL Addresses

Published on Author gryzliLeave a comment

If you are using Nginx as reverse proxy, you may encounter some of the following behaviors Receiving Empty Lines In Nginx Log 192.168.1.1 – – [09/May/2019:10:26:58 +0300] “-” 000 0 “-” “-” “-” 192.168.1.1 – – [09/May/2019:10:09:55 +0300] “-” 000 0 “-” “-” “-” Receiving 499 Status Code While Proxying I was observing such behavior… Continue reading Nginx Proxying Long URL Addresses

How To Use Ansible For Centos 5 / RHEL 5

Published on Author gryzliLeave a comment

If you try to run some of your playbooks over old Centos/Rhel 5 host, you might be ending with weird message like this: {“changed”: false, “module_stderr”: ” File \”<stdin>\”, line 39\n with open(module, ‘wb’) as f:\n ^\nSyntaxError: invalid syntax\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 1} Without going into too… Continue reading How To Use Ansible For Centos 5 / RHEL 5

Detailed CPU Usage Overview With psacct

Published on Author gryzliLeave a comment

If you ever asked yourself the following questions, this might be the right place for you: How to check how much cpu is consuming each system user ? How to check how much cpu is consumed by each command ? Check when a command has been executed and how much cpu it did ? How… Continue reading Detailed CPU Usage Overview With psacct

Working With Ingest Pipelines In ElasticSearch And Filebeat

Published on Author gryzli1 Comment

What are ingest pipelines and why you need to know about them ? Ingest Pipelines are powerful tool that ElasticSearch gives you in order to pre-process your documents, during the Indexing process. In fact they are integrating pretty much of the Logstash functionality, by giving you the ability to configure grok filters or using different… Continue reading Working With Ingest Pipelines In ElasticSearch And Filebeat

Tuning Ansible For Maximum Performance

Published on Author gryzli1 Comment

I hate stuff running slow and I love Ansible.  In this guide, I will share how achieved more than 50x speedup for executing simple ansible playbooks (which are meant to be fast , but they was not ).   Measuring Ansible Tasks Execution Time Before optimizing whatever it is, we should have some good baseline… Continue reading Tuning Ansible For Maximum Performance

Advanced Filebeat Configuration

Published on Author gryzliLeave a comment

If you have made it through the initial filebeat installation , you may want to do some more interesting stuff with Filebeat. Here I will share some of my experience with it.   Configuring Filebeat To Tail Files This was one of the first things I wanted to make Filebeat do. The idea of ‘tail‘… Continue reading Advanced Filebeat Configuration