Tool

4 Reasons Why SSH Connection Fails

As DevOps or IT professionals, people may ask us why they can’t ssh to servers. It happens from time to time. Isn’t right? Not much fun. Just routine work.

Want to ease the pain and burden? Let’s examine common ssh failures together. Next time forward this link to your colleagues, if useful. People may be able to identify the root cause all by themselves, or be efficient in collecting all necessary information, before turning to us.

Why SSH Connection Failed


(more…)

Manage SSH Key File With Passphrase

Any serious DevOps will only ssh by key file. Not with password, right? And mostly our powerful key file can unlock many critical envs. Have you ever uploaded your private key to other envs, like jumpbox? What if your key is magically stolen by hackers somehow?
Time to protect your sensitive ssh key by passphrase. And live with it, headache-free.

Manage SSH Key File With Passphrase


(more…)

A Complete And Easy Guide To Check Elasticsearch

To poll Elasticsearch db status, we usually need to learn and try many many REST API. When we’re new, it would take quite a while to put all the pieces together.

As Ops/DevOps, we are usually more concerned about cluster health and data inside. Enclosed is A Simple Step-By-Step Guide to check elasticsearch. Cluster, Nodes, Shards, Indices, Documents And Beyond.

The Complete Guide To Query And Check Elasticsearch


(more…)

Avoid Blind Wait In DevOps Code

Occasionally DevOps code needs to check and wait status, before running further steps. For example, wait for service A to be up, then start service B; confirm TCP port is listening, then launch requests; etc.

For simplicity or time pressure, people usually use a blind wait like “sleep 10” to fix this. This is certainly not good enough. How we can improve this with affordable cost?

Blind Wait


(more…)

Generate Common DB Data Report By ELK

Usually critical data is stored in DB. We can periodically poll and combine key metrics from DB into a data report, such as how many tables/collections in DB, how many items in each critical table, etc. Data report enables people to visualize the history and trend of key metrics.

Furthermore if the basic data report can be generated automatically, people can easily add more metrics, which may make more business sense. The most exciting part is that we can get a general solution which applies to different projects! So how we can get this idea started?

DB History Report


(more…)

Create Local VM With Fixed IP Address

People are using VMs for local test more and more. The VMs are usually accessed by IP. Most likely laptops running the VM will be carried to different places, whether home, office or starbucks. Hence the wifi changes all the time. So the IPs of latop and VM change as well.

Quite natural we want the VM to have a fixed IP, thus we don’t need to change current ip of the VM all the time. So how to achieve that?

Create Local VM With Fixed IP Address


(more…)

Write Initscript For Linux Daemon Service

How to write a linux initscript? You have implemented a daemon service. Now you may want everyone in the project can easily manage the service without extra communication. The standard way would be “service $service_name start/stop/status”. Another thing, no one would enjoy starting service manually, when the machine is rebooted. Here are things you shall need to know or watch out to get above done.

Write Initscript For Linux Daemon Service


(more…)