Hello,It is me!

Harry

Professional DevOps Engineer Professional Infra Developer infrastructure Desiginer DevOps consultant

About me

Hello

I'mHarry

DevOps Engineer cum Infra Developer

I, Harry The DevOps Guy, am a DevOps Engineer and Infra Developer living in India, Delhi. I have a bachelor degree in commerce from Delhi University. Currently i am working as DevOps Engineer with Kiwi Technologies Private Ltd in Noida. I am very keen to learn latest Devops tools and Technologies that helps me to automate any kind of Infrastructure. Basically, i like linux automation from my initial career. i love to automate each and every task with Ansible, Jenkins, Shell Scripting, etc. apart from these i have excellent knowledge about AWS Cloud Automation.

experience

Infrastructure Development

2016-2017

I Have experiance in Infrastructure Development on AWS Cloud,Basically I use Terraform to create infra on AWS.

Configration Management

2016-2017

These day Lots of Tools are avaiable to Configrations Mangement, I have practical knowledge about ansible as configration Management tool.

Scripting and Programming

2016-2017

Scripting and programmings are very important part for DevOps Engineers. l love to Create Shell Script. and i have Good knowledge about Shell, Python, PHP, etc.

Knowledge about Tools

2016-2017

As DevOps Engineer i have knowlege about lots of Tools like GIT,JENKINS,STASH,JIRA,ANSIBLE,TERRAFORM,VARGRANT,DOCKER,AWS-CLI,SHELL SCRIPTING,PYTHON PROGRAMMING,PHP LANGUAGE,ETC.

service

AWS CLOUD

Worked with Lots of AWS Services ie RDS,EC2,S3,Lambda Functions,Elastic Beanstalk, Route 53 and much more.

OS PLATEFORM

Worked with lots of Popular Linux Distribution like Mint OS, Elimentory OS, CentOS, Ubuntu 16.04 etc. Having excellent practical knowledge.

User Friendly

Create Jenkins job for Complex Task as very simple way so that Non Technical People can understand and love to use.

Infrastructure As Code

Having Great knowledge and working experiance to Create Complex Infrastructure as code on AWS. So we can resuse code or infra many more time.

CI CD

Continuous Integration and continuous Delivery is Most Popular part for all business. it allow you to automate work development,deployment,Delivery.

24x7 Monitoring

Provide Automated Monitoring Service that helps you to update real time events for your environments.

300

Jenkins Jobs

50

Live Environments

10

BOOKS

1234

GIFTS

Work Updates

How To TrackSSL Expiration with mSend

How To TrackSSL Expiration with mSend

Welcome to TrackSSL!

TrackSSL is a script to monitor SSL . it allow you to send email notification when your SSL is about to expire. it will remind you to renew your ssl on time.

Getting Start

enter image description here

It will help you to monitor bulk domain’s ssl. it required internet access to fetch certificate details .

Prerequisite :

Installation

sudo curl -sL 'https://raw.githubusercontent.com/HarryTheDevOpsGuy/ssl-cert-check/master/ssl-cert-check' -o /usr/bin/trackssl
sudo chmod +x /usr/bin/trackssl

Help

trackssl -h

Usage: /usr/bin/trackssl [ -e email address ] [-E sender email address] [ -x days ] [-q] [-a] [-b] [-h] [-i] [-n] [-N] [-v]
       { [ -s common_name ] && [ -p port] } || { [ -f cert_file ] } || { [ -c cert file ] } || { [ -d cert dir ] }

  -a                : Send a warning message through E-mail
  -b                : Will not print header
  -c cert file      : Print the expiration date for the PEM or PKCS12 formatted certificate in cert file
  -d cert directory : Print the expiration date for the PEM or PKCS12 formatted certificates in cert directory
  -e E-mail address : E-mail address to send expiration notices
  -E E-mail sender  : E-mail address of the sender
  -f cert file      : File with a list of FQDNs and ports
  -h                : Print this screen
  -i                : Print the issuer of the certificate
  -k password       : PKCS12 file password
  -n                : Run as a Nagios plugin
  -N                : Run as a Nagios plugin and output one line summary (implies -n, requires -f or -d)
  -p port           : Port to connect to (interactive mode)
  -q                : Don\'t print anything on the console
  -s commmon name   : Server to connect to (interactive mode)
  -S                : Print validation information
  -t type           : Specify the certificate type
  -V                : Print version information
  -x days           : Certificate expiration interval (eg. if cert_date < days)

Check your SSL Expiry Date

trackssl -s google.com -p 443

Send email notification if ssl expiry date less than 60 days.

trackssl -s google.com -p 443 -aq -x 60 -e yourmail@domain.com
  • It will trigger email if SSL expiry less then 60 days

Bulk Domain check and send email notification.

Create a file domain.txt and paste below domain list in this file.

google.com 443
facebook.com 443
yahoo.com 443
flipkart.com 443
trackssl -f domain.txt -aq -x 40 -e youremail@domain.com
  • it will send email notification if any domains expiry date less than 40 days from list.

Configure Cronjobs To Get email alert daily or weekly.

You can schedule cronjob according to your choice. Here is few example for you. you can use any of one.

# Schedule cron every monday and thursday at 9:00 am
0 9 * * 1,4 /usr/bin/trackssl -f /opt/domain.txt -aq -x 40 -e youremail@domain.com

# Schedule cron weekly
@weekly /usr/bin/trackssl -f /opt/domain.txt -aq -x 40 -e youremail@domain.com

# Schedule cron Daily 
@daily /usr/bin/trackssl -f /opt/domain.txt -aq -x 40 -e youremail@domain.com

Want to monitor SSL Free of cost?

you can add your domain to monitor in free of cost - https://harry-thedevopsguy.blogspot.com/p/trackssl-monitor-your-website-ssl-free.html you can add your domain to Monitor SSL Free of cost with mCert
Getting Start from here --> mCert - TrackSSL Smartly

How To configure Centerlized Health Monitor of multiple Linux Servers.

It is most important task to check server health and current status of our linux servers. These days most of server hacked due to some application vulnerability. Attacker keep trying to establish unauthorized access of our server. I have faced same problem with most of Linux servers in my organization. So I have developed a small utility to prevent this kind of attacks and stay updated for current Linux System Status.
Lets Start !!!

Required Tools/Script To Configure System Health Monitoring
    1. mSysMon : To Generate Human Readable HTML Report.
    2. mSend   :  Smtp Client To Send Email.  Installation Document


Scenario : If We have multiple Linux Server [Ubuntu or any Debian Server] and we want to get Email Notification for Server Health Status Report every day.

 Server 
  1.  Jumphost : From Jump host we can ssh any instance.
  2.  Remote Server : We will monitor this host health status.  
Jumphost :  We need to install mSend on Centralized host [Jumphost] and configure smtp details to get email notification. From this host we should able to ssh remote Server with Password less authentication. and ssh user must have password less sudo privilege. So that this user can generate html report perfectly. 

Remote Server : This is Target Host to monitor health status. No Need to install any additional agent to monitor server. our script will install mSysmon utility to generate health status report.

 Step - 1 Create Script file rSysmon.sh on Jumphost.
#!/usr/bin/env bash
# Before executing this script. You need to install mSend and configure to send email.
# Syntax :
# bash rSysMon.sh "user@hostip" "your_name@domain.com"
# bash rSysMon.sh "ubuntu@13.83.78.23" "myemail@gmail.com"

export msend_bin=$(which msend)
export REMOTE_HOST="${1:-127.0.0.1}"
export EMAIL_TO=${2:-HarryTheDevOpsGuy@gmail.com}

if [[ -z ${msend_bin} ]]; then
  echo "Please install mSend and configure."
  echo "Follow to Install : https://github.com/harry41/mSend"
  exit 1
fi
monitor(){
  # REMOTE_HOST="${1}"
  # EMAIL_TO=${2:-HarryTheDevOpsGuy@gmail.com}
  REPORT_NAME="ServerHealthReport"
  REPORT_FILE="/tmp/health_reports/${REPORT_NAME}.html"
  LOCAL_FILE="/tmp/${REPORT_NAME}.html"
  msysmon=$(ssh ${REMOTE_HOST} "which msysmon")

  if [[ ${msysmon} == "/usr/bin/msysmon" ]]; then
    ssh ${REMOTE_HOST} "msysmon '${REPORT_NAME}'"
    scp  ${REMOTE_HOST}:${REPORT_FILE} ${LOCAL_FILE}

    if [[ -f ${LOCAL_FILE} ]]; then
      grep 'SM_' ${LOCAL_FILE} > /tmp/remotevars
      source /tmp/remotevars
      ${msend_bin} -t "${EMAIL_TO}" -s "${SM_EMAIL_SUBJECT:- Server Health Report}" -f "${LOCAL_FILE}"
      rm -rf ${LOCAL_FILE} /tmp/remotevars
    fi
  else
    ssh ${REMOTE_HOST} "sudo curl -sL 'https://github.com/harry41/mSend/raw/master/tools/msysmon' -o /usr/bin/msysmon && sudo chmod +x /usr/bin/msysmon"
    ret_val=$?
    if [[ ${ret_val} != 0 ]]; then
      echo "Run Below command to install msysmon on remote server."
      echo "sudo curl -sL 'https://github.com/harry41/mSend/raw/master/tools/msysmon' -o /usr/bin/msysmon
      sudo chmod +x /usr/bin/msysmon"
    else
      echo "Please run again to Generate System Health Report"
    fi
  fi
}
if [[ -z ${REMOTE_HOST} || -z ${EMAIL_TO} ]]; then
  echo "Please pass valid hostname and email"
else
  echo "Please Wait.. : Connecting Remote host ${REMOTE_HOST}"
  monitor "${REMOTE_HOST}" "${EMAIL_TO}"
fi


 Lets Test Script
 
bash rSysMon.sh "ubuntu@13.83.78.23" "myemail@gmail.com"

Or

./rSysMon.sh "ubuntu@13.83.78.23" "myemail@gmail.com"
  
You Need to pass hostip and your email to receive email notifications.


mSend

Getting Start

Step - 1 Installation

sudo curl -L "https://github.com/harry41/mSend/raw/v0.2.6/msend" -o /usr/bin/msend
sudo chmod +x /usr/bin/msend
msend -h
Alt text
Step - 2 : Generate SMTP Auth Token
mSend uses your gmail smtp login credentials to sent email. so you need to generate your smtp auth token by executing below command.
./msend --get-smtp-auth
Output :
  Please Enter Valid Credentials  
  Enter Your Gmail ID : your_email@gmail.com
  Enter Your Gmail PASSWORD : secret@password
  Enter Email Sender Name : Harry

  Your SMTP AUTH TOKEN has been Saved in  ~/.mSend/msend.conf
Step - 3 : Enable Less Secure Application
  1. Go to your Google Account
  2. On the left navigation panel, click Security.
  3. On the bottom of the page, in the Less secure app access panel, click Turn on access.
Step - 4 : Send test email.
You can create your own html templates. send your email by executing below commmand. Here we have created a html email template for you ~/.mSend/email_template.html
msend -t your_email@domain.com -s "mSend Has been Installed" -f ~/.mSend/email_template.html -a /var/log/nginx/error.log

Troubleshooting


How To Configure SMTP credentials in mSend ?

Follow below step to configure SMTP
  1. Go To ~/.mSend Directory.
  2. Open msend.conf file in your text editor.
  3. Update variables value according to your details.
  4. Done.
Here is sample msend.conf
# Replace below variables and uncomment according to your credentials and details.

# EMAIL_SENDER_LIST=("your_smtp_auth_token" "your_smtp_auth_token2")
# SENDER_NAME="Harry"
# REPLY_EMAIL_ADDRESS="Harry 
  1. You can add multiple smtp credentials in EMAIL_SENDER_LIST variable.
  2. REPLY_EMAIL_ADDRESS is very important recipient will reply on this email id.

How To update mSend ?

No Need to worry about updatation. it will update automatically every 30 days. also you can update anytime if it is required.
Run below command to Update
msend --update

How To Setup Zabbix Server On AWS Cloud With MiTE 1 Click Automation.


How To Configure Zabbix on AWS Cloud using MiTE?


In This Video I will show you how we can launch ec2 instance on aws cloud and we will configure zabbix server. and will show you How we can install zabbix agent and configure on some ec2 server Automatically.




How To Install MiTE?

Run Below command to Install MiTE.

For Ubuntu/debian OS:
curl -L 'https://elbo.in/MiTE'|bash - && source ~/.bashrc

Check My Git Repo for more details : https://gitlab.com/DevOpsExpert/MiTE

How To Provisioning AWS Infra?

To Plan or Dry run
MiTE -e mite --plan

To Apply or launch Infra on AWS cloud.
MiTE -e mite --apply


How To Install and Configure Zabbix-Server and Zabbix Agent on ec2 Machine?

To Install and configure zabbix Server
MiTE -e mite --ansible --playbook zabbix-server.yml

To Install and configure Zabbix Agent on machine
# MiTE -e mite --ansible --playbook zabbix-agent.yml -t client
MiTE -e mite --ansible --playbook zabbix-agent.yml -t client


- : Thanks for Watching : -

How to Install and Configure PyDash Performance Monitoring Tool on ec2.

Hi Everybody,

Today i am going to show you how we can setup performance monitoring tool "PyDash" on aws cloud with Infra Monitoring tool MiTE.



What resources we are going to Create on AWS Cloud ?

   We are going to Create below resources on aws cloud with MiTE AWS Platform Tool.
  1.  EC2 Instance  -  Used to Install pydash application.
  2.  Security Group - we will allow ssh, http, https, and other ports.
  3.  KeyPair  -  We will attach our public ssh key, it will use to access ec2 instance.

 Lets Create EC2 Instance

 Step 1:  Copy Below code.
# What Do You Want to Create?
##==================================================##

# To Create Perfect Infrastructure Please Fill Carefully This file will use in script.
# Please fill only Value. don't need to add more lines.
############################################### Created by: Harry
###############################################  Email : HarryTheDevOpsGuy@Gmail.com


# Basic Details about Project:
##==================================================##
NEW_PROJECT_NAME="Mite AWS Platform"
AWS_SERVICES="EC2"

# AWS Secrets Configuration:
##==================================================##
AWS_ACCOUNT_OWNER="{aws account owner}"
YOUR_AWS_ACCESS_KEY="{Your Access KEY}"
YOUR_AWS_SECRET_KEY="{Your Secret key}"
YOUR_INFRA_REGION="us-east-2"

# EC2 Instance Configuration:
##==================================================##
REQUIRED_PACKAGES="nginx php7.2 git"
WEB_SERVER_ENVIRONMENT="nginx"
PROJECT_DOMAIN_NAME="Harry-pc"
ENVIRONMENT_SETUP="PyDash"
INSTANCE_TYPE="t2.micro"
VOLUME_SIZE="8"

# RDS Server Configuration:
##==================================================##
RDS_INSTANCE_TYPE="db.t2.micro"
RDS_DB_VOLUME_SIZE="8"
#mariadb/postgres/mysql
RDS_DB_ENGINE="mysql"
RDS_DB_ENGINE_VERSION="5.7.21"
RDS_DB_PORT="3306"
RDS_DB_NAMES="db1 db2 db3"
RDS_DB_USERS="user1 user2 user3"


# S3 Bucket Configration:
##=====================================##
S3_BUCKETS_NAME="bucket1 bucket2 bucket3"


# Environment tag Details:
##=====================================##
ENVIRONMENT_REQUESTED_BY="Hari"
ENVIRONMENT_CREATED_BY="Harry The DevOps Guy"
OFFICIAL_EMAIL="HarryTheDevOpsGuy@gmail.com"
ENVIRONMENT_TICKET_ID="1112"


run below commands and paste above code into mite_initial_configs.sh file

mkdir -p ~/AWS_ENVIRONMENT_CONFIGS
vim ~/AWS_ENVIRONMENT_CONFIGS/mite_initial_configs.sh

Modify variable value accordingly and run below commands
 MiTE -e mite --plan

if plan has been executed successfully and everything looks good then we can execute apply command to Create ec2 instance on aws cloud.

MiTE -e mite --apply

 if every thing looks good then pass yes value on the terminal. ec2 instance will be create automatically.




After executed above command successfully then we have to execute below command to install PyDash and it will configure automatically.

MiTE -e mite --ansible --playbook pydash.yml


Once above command will execute successfully you will be able to access PyDash home page.

http://your-server-ip


testimonial

@Harry, Thanks you so much to Taking care of My Live environment and resolved all of my issue. Now its working good. You are doing Great.

Jay

Manager of Hi Tech

Good and impressive service you provided. He has excellent knowledge all about linux as well as automation. i like it.

Satya

CEO of EITS

you are doing good Harry. keep it up i like your AWS Automation tools and i am using this in my company to Creat Dev QA and stage environments.

Sanjay

Linux Administrator in Spoire Soft Technologies

Harry
+91-750-3721-297
Delhi, India

SEND ME A MESSAGE