Skip to main content

Posts

Showing posts with the label linux

Prometheus Installation

Goal : This blog will help you with prometheus installation. Installation Steps. Create user without a home directory. sudo useradd --no-create-home --shell /bin/false prometheus Create directories to copy prometheus config and library files and give permission to user that you crated. sudo mkdir /etc/prometheus sudo mkdir /var/lib/prometheus sudo chown prometheus:prometheus /etc/prometheus sudo chown prometheus:prometheus /var/lib/prometheus Download and unzip prometheus from github. curl -LO https://github.com/prometheus/prometheus/releases/download/v2.3.2/prometheus-2.3.2.linux-amd64.tar.gz   tar -xvf prometheus-2.3.2.linux-amd64.tar.gz mv prometheus-2.3.2.linux-amd64 prometheus-files Copy prometheus binary files to bin directory and give permission. sudo cp prometheus-files/prometheus /usr/local/bin/ sudo cp prometheus-files/promtool /usr/local/bin/ sudo chown prometheus:prometheus /usr/l

Install Elasticsearch, Logstash, and Kibana (ELK Stack) on Amazon Linux

Goal: In these tutorial we gonna cover installation of ELK Stack on fresh amazon ec2 linux (CentOS). We will install Elasticsearch 5.x.x, Logstash 5.x.x, and Kibana 5.x.x. We will also show you how to configure filebeat to forwards apache logs collected by central rsyslog server to elk server using Filebeat 5.x.x. ELK stack components: Logstash: Transform incoming logs. Elasticsearch(ES): Stores logs transformed by logstash. Kibana: Web interface for searching and visualizing logs stored in elasticsearch, which is proxied through Nginx. Filebeat: Lightweight Shipper of Logs from client to logstash server. Prerequisites: Minimum size to run your ES cluster RAM --> 4GB CPU --> 2 core Disk --> 20 GB (highly varies on your log size) You many need to increase RAM, CPU, Disk size depending on your log size. Let's start on our main goal to setup ELK Server Install java 8 sudo yum install java-1.8.0-openjdk Change Java Home as Java 8 sudo sh -c "echo expo

GoReplay - Testing Your Site with Actual Traffic

Goal:   In these article we gonna learn How to capture your Real Time traffic from production and reuse it at your testing/development environment. Prerequisite: One web server running, or If you are just playing around then you can run goreplay test ftp server. Let's Begin Load Testing for site serving millions user wasn't be that easy before I came to know GoReplay . Here I am not gonna explain you How great go replay is, You will automatically get to know after following steps above step to capture and replay your request logs. FYI GoReplay capture logs from tcpdump. Installation: Download zip file from there git repo and unzip it. # create a directory mkdir ~/goreplay # go to directory you created cd ~/goreplay # download tar file from goreplay git repo wget https://github.com/buger/goreplay/releases/download/v0.16.1/gor_0.16.1_x64.tar.gz # unzip it tar -xf gor_0.16.1_x64.tar.gz After Unzipping Check GoReplay binary File is available in directory. Ca

Rename a git branch

By mistake If you have named a branch incorrectly and pushed this to the remote repository then you are at correct place. Rename your local branch. If you are on the branch you want to rename: git branch -m new-name If you are on a different branch: git branch -m old-name new-name Delete the old-name from remote and push new-name git push origin :old-name new-name Reset the upstream for new-name Switch to the branch and then git push origin -u new-name

How to delete a Git branch on Local and Remote

Goal: If you are done with your work and as a archival policy if you want to delete a branch from local as well as git server. This article can help you. Delete Branch on local git branch -D <Branch_Name> Delete Branch on server git branch :<Remote_server_Name><Branch_Name_on_Remote> Sample git branch -D deployed_feature git branch :origin deployed_feature