Skip to main content

Posts

Minikube Start error

Error nuwans: ~ $ minikube start Starting local Kubernetes v1.9.0 cluster... Starting VM... E0229 06:08:09.490344 5655 start.go:159] Error starting host: Error creating host: Error executing step: Running precreate checks. : We support Virtualbox starting with version 5. Your VirtualBox install is "WARNING: The character device /dev/vboxdrv does not exist.\n\t Please install the virtualbox-dkms package and the appropriate\n\t headers, most likely linux-headers-generic.\n\n\t You will not be able to start VMs until this problem is fixed.\n5.2.34_Ubuntur133883". Please upgrade at https://www.virtualbox.org. Retrying. E0229 06:08:09.490920 5655 start.go:165] Error starting host: Error creating host: Error executing step: Running precreate checks. : We support Virtualbox starting with version 5. Your VirtualBox install is "WARNING: The character device /dev/vboxdrv does not exist.\n\t Please install the virtualbox-dkms package and the appropriate\n\t headers, mo...

Spring Microservices in Action - Summary

Java Spring Boot Microservices .............................. Contents 1 ■ Welcome to the cloud, Spring  2 ■ Building microservices with Spring Boot 3 ■ Controlling your configuration with Spring Cloud configuration serve 4 ■ On service discovery 5 ■ When bad things happen: client resiliency patterns with Spring Cloud and Netflix Hystrix 6 ■ Service routing with Spring Cloud and Zuul 7 ■ Securing your microservices 8 ■ Event-driven architecture with Spring Cloud Stream 9 ■ Distributed tracing with Spring Cloud Sleuth and Zipkin 10 ■ Deploying your microservices

How to install ElastAlert on Ubuntu

How to install ElastAlert with Elasticsearch on Ubuntu What is ElastAlert? ElastAlert is a simple framework that alerts when it detects anomalies, spikes, or other patterns of rules from data added in the Elasticsearch. Pre Requirements Tested on ubuntu 18 Elastalert Installation apt update apt install python3-pip pip3 install elastalert pip3 install PyYAML==5.1     Elastalert  Elasticsearch Installation wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.2.0-x86_64.rpm dpkg -i elasticsearch-7.2.0-amd64.deb systemctl start elasticsearch systemctl status elasticsearch Elastalert Setup create /root/emailalerts folder Use further below files to create these files. create /root/emailalerts/config.yaml create /root/emailalerts/rules/auth.yaml create /root/emailalerts/rules/nuwan_2mandata1.yaml elastalert-create-index enter   server: localhost    ...

Linux Mint Guide

Add Eclipse to the Linux Mint Menu Once you setup eclipse you will notice that you can't find a shortcut in the menu. This is how to fix this. 1. go to desktop 2. click "create new launcher " from the menu 3. Browse to the eclipse sh file & save 4. when you saving, will prompt you to add to menu, click yes 5. check on the menu by typing "eclipse" ...

customise your linux terminal prompt

This is how my final terminal should look like nuwans:mediation-dep-gw (master) $ I have removed lengthy host name, very long directory structure and added git branch This can be done via .bashrc file located in your local home directory. in bashrc file PS1 variables handles the terminal prompt. parse_git_branch() {     git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } if [ "$color_prompt" = yes ]; then     PS1='\[\033[01;32m\]\u:\[\033[01;34m\]\W\[\033[00m\]$(parse_git_branch) $ ' else     PS1='\u:\W\$ ' fi Paste above code to the bashrc file to update the existing code. What I have done? PS1='\[\033[01;32m\]\u:\[\033[01;34m\]\W\[\033[00m\]$(parse_git_branch) $ ' PS1 - sets the terminal pattern used by linux os. \[\033[01;32m\] - setting the colour \u - user name \W - current folder $(parse_git_branch) - will read git branch  info and if its not git folder empty value is retured.

Reverse proxy vs forward proxy

proxy is a server stands in between client and the original server. this get the reqest and sends a new request to the other end. and retrieves the response and creaetes a new response Client -> Proxy -> server Forward proxy this proxy act as the client for the  server. so server doesn't know the real client. real client is hidden from server. reverse proxy this proxy act as server for the client. so real server is hidden from the client.

ELK Logstash Filter writing for response time, request and response

ELK Logstash Filter writing for response time, request and response correlating Now my elk setup is up and running and reads a log file and shows it on Kibana dashboard. basically there is no business logic was implemented. The new business requirement was to write a csv file from a log file with request response and response time. and also show them on kibana. problem i faced here was request and response came as two separate events in the log file. so the requirement can be split as below. it should read the requests and responses from a file correlate them, as they not come in a single event calculate the response time create a csv file with request response and response time in same line As we have already configured our system to read log records from a file, there’s no extra work to do to get both requests and responses to elastic-search. we decided go with log-stash as it’s the tool recommended in elk stack to handle complex processing such as correlating events. ...