Vector.io is a new observability tool, that is marketed as a one size fits all solution, for log parsing, data transformation, metrics aggregation and event collection. According to the creators, it’s Fast, Reliable, Unified, Vendor neutral, Customizable and Concise. Recently I had to make the decision if we should migrate our data pipeline to a new stack, and this tool was recommended by a co-worker, so I decided to make this evaluation.

Read More

The problem

If you’re here, then you probably have a Node.js application running in Cluster mode, either through the native Node APIs or through a package manager like PM2. In this mode, however, there is usually a load balancer that switches between several child processes to do computational work. Each of these child processes has their own statistics for resource usage. If you’re using something like Prometheus, to collect custom metrics, they are also saved per process. This results in jagged or incorrect results, when trying to display and analyze the data in a tool such as Grafana. The question is, how do we collect all these metrics and aggregate them for easy consumtion at one place?

Read More

Configuration

  1. Create a custom maintenance page that you would like to display to your users.
  2. Change your Nginx configuration to include the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
include /etc/nginx/extra.d/maintenance.conf;


location / {
# Adding the following "if" statement config under "location" directive
if (-e /var/tmp/nginx/maintenance) {
set $maintenance on;
}
if ($intra) {
set $maintenance off;
}
if ($maintenance = on) {
error_page 503 /maintenance.html;
return 503;
}
...
}
...

The dots in the above example are a placeholder for the rest of your configuration file and should be removed.

  1. Edit maintenance.conf file under “/etc/nginx/extra.d/maintenance.conf”
1
2
3
4
5
set $maintenance off;

location = /maintenancfe.html {
internal;
}
  1. (optional) If you want to exclude some IP or IP range from hitting the maintenance page (e.g. for development), Edit your geo.conf /etc/nginx/conf.d/geo.conf
1
2
3
4
5
6
geo $intra {
default 0;
127.0.0.1 1;
10.0.0.0/8 1;
100.0.0.0/26 1;
}
  1. Restart Nginx
1
2
$ nginx -t
$ sudo systemctl restart nginx

Switching in and out of maintenance mode

Switching the maintenance on and off is very easy, just by creating and deleting a faile.

Switch on maintenance mode

1
$ touch /var/tmp/nginx/maintenance

Switch off maintenance mode

1
$ rm /var/tmp/nginx/maintenance

When it was first released in 1999, PayPal was revolutionary. I created my account with the service in 2004, when I was still in high school.
Back then, PayPal was the only way to transfer money easily online. Even more, not having a local alternative it was irreplacable.
However times change, but PayPal keep their bad practices the same. In this article I will mentions some of the appalling way of PayPal and suggest how to avoid them.

This post contains a lot of nitpicking, so if you don’t like it, please look away.

Read More

Since 2008 this blog was running on Wordpress. This makes Wordpress my loyal servant for almost 12 years. However, as everything else, Wordpress started showing it’s age. The performance of the PHP powered system started lagging behind some other alternatives. While being a great general purpose solution, that is being used for anything from hobby websites to ecommerce shops, I probably didn’t use 10% of the features that Wordpress provided. Mainly because of these two reasons, I decided to migrate to something more simple and easy(as well as cheaper) to manage.

After some searching on the internet, I saw that a system called Hexo is a hot thing right now, so I’ve decided to go with it.

Read More

Today i’d like to show you how to make Logstash Docker container output its operation to a log file inside the container. I’m writing specifically about this, because the official Logstash documentation is a bit vague and unless you know how Java (the language ELK stack is written in) logging with the third party library log4j2 works, you might struggle with this issue like me.

Read More

Previously I’ve written a post explaining the benefits of using Revolut over a traditional bank. Well not anymore. This time i will be writing why i’ve decided not to use Revolut anymore - simply because it will not be worth it anymore.

Aside from the annoying emails wanting you to upload a new ID document and photo every couple of months, the only other information i am subscribed to receive from Revolut is their policy updates. This is how their last email looks like:

Read More

1ST SIGNING PERIOD 1ST PAYMENT DAY 2ND SIGNING PERIOD 2ND PAYMENT DAY
April 2020 1-8 Apr 28 Apr 9-22 Apr 20 May
May 2020 7-8 May 27 May 11-22 May 15 Jun
June 2020 1-3 Jun 22 Jun 4-22 Jun 15 Jul
July 2020 1-3 Jul 22 Jul 6-27 Jul 18 Aug
August 2020 3-5 Aug 25 Aug 6-24 Aug 11 Sep
September 2020 1-2 Sep 17 Sep 3-26 Sep 15 Oct
October 2020 1-6 Oct 28 Oct 7-26 Oct 17 Nov
November 2020 2-5 Nov 25 Nov 6-24 Nov 15 Dec
December 2020 1-4 Dec 22 Dec 7-21 Dec 21 Jan
January 2021 6-8 Jan 28 Jan 12-22 Jan 16 Feb
February 2021 1-3 Feb 24 Feb 4-22 Feb 11 Mar
March 2021 1-2 Mar 17 Mar 3-26 Mar 15 Apr

This is the beginning of my C# development series of articles. As such, i will make a classic “Hello, World” example application.

I am going to use Microsoft Visual Studio 2019 Community edition to write and compile my C# code. Right now it’s free for everyone and if you’re on Windows, i recommend downloading and installing it - it will make your life a lot easier. You can download it from here. If you are on Mac, there is a Visual Studio version for that. If you’re on Linux - you can download Visual Studio Code from the same page.

Read More

Hey everyone.
Recently i decided to get into development of native mobile apps using React Native.
React requires a Ruby gem called Cocoapods, which on it’s side requires GCC (Gnu C Compiler) to compile and install properly.
If the GCC is not configured properly, it will result in the error “configure: error: C compiler cannot create executables”.

To fix this error we will need 3 things:

  • Install XCode
  • Install XCode command tools
  • Configure XCode to use the installed command tools correctly

You can Install XCode by downloading it from the App Store.

Installing the command tools can be done by executing the following command in the terminal

1
xcode-select --install

If you have an old version of the command line tools, you can update them with the following command:

1
2
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

As a last step, you have to open XCode, go to the menu “XCode->Preferences”, the “Locations” tab and choose an item from the dropdown menu near “Command Line Tools”, as shown in this image:

After that you can run “pod install” again and you’ll be greeted with a happy green “Pod installation complete!” message.

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×