Posts

Study Splunk

Want to learn about Splunk,  Click here ! https://studysplunk.blogspot.com/  What does above blog contains?  What is Splunk? Splunk Enterprise Components? Installing Splunk? Installing Splunk Universal Forwarder? Walkthrough of Splunk Interface Search Modes Searching in Splunk #1 Splunk sub(commands) [top, rare, fields, table, rename, sort] #2 Splunk sub(commands) [eval, trim, chart, showperc, stats, avg] #3 Splunk sub(commands) [eval, round, trim, stats, ceil, exact, floor, tostring] #4 Splunk sub(commands) [timechart, geostats, iplocation] #5 Splunk sub(Commands) [sendemail, dedup, eval, concatenate, new_field] #6 Splunk sub(Commands) [fields, rename, replace, table, transaction] Bringing data into Splunk Bringing data into Splunk (Continued...) Enable receiving port on Splunk server Dealing with Time Still I am in a process of writing couple of more topics related to Splunk, but you can go thru any of the links given above !! D...

Study Puppet

Want to learn about Puppet,  Click here ! https://managepuppet.blogspot.com What does above blog contains?  Introduction to Puppet puppet resource??? puppet apply??? puppet describe??? puppet agent??? puppet cert??? Un-revoke the revoked certificate in Puppet puppet master??? Puppet modules??? Facter??? Puppet installation on agent/server Creating a module in Puppet Dry run in Puppet --noop Puppet agent run Exec in Puppet Though it is still in progress....

Accessing a Private hosted application via Public/Bastion instance [AWS]

Image
Let's say you have an application which you have deployed in your Private subnet in AWS and you want to access that application via your Bastion instance / Browser. 1. Assuming that you already have deployed the application on one of your Private Subnet EC2 instance. 2. If deployed correctly, that application should be accessible via http://PRIVATE_IP:PORT/ but since your private instance doesn't have internet access and you cannot directly connect to it. We will use an alternative to it. So to achieve this we will set-up an SSH tunnel and then use it to connect to our application via any Browser. $ ssh -N -R LOCAL_PORT:REMOTE_APP_HOST:REMOTE_APP_PORT USER@LOCAL_HOST -i KEY.PEM Man entry for -R flag: -R [bind_address:]port:host:hostport -R [bind_address:]port:local_socket -R remote_socket:host:hostport -R remote_socket:local_socket Specifies that connections to the given TCP port or Unix socket on the remote (server) host are to be forwarded to the gi...

Introduction to GIT

We can do a lot with  git , before trying anything on PROD machines make sure to play with  git  on your local machine or test machine. Prerequisites => Install git. => Be familiar a bit with the command line. => Play with the repository. Install git => yum install git -y Configure user/email => git config --global user.name "Sunny Bhambhani" => git config --global user.email "bhambhani147@gmail.com" => git config -l user.name=Sunny Bhambhani user.email=bhambhani147@gmail.com Initializing a new git repo => pwd /root/git-test => git init Initialized empty Git repository in /root/git-test/.git/ A new hidden directory called .git will now be present in your project directory. This is where Git stores its database and configuration information so that it can track your project. Cloning a repository => pwd /root => git clone  https://github.com/bhambhani147/TT-Help.git Cloning into 'TT-H...

Installing Tomcat8 on RHEL6

Image
Apache-HTTP v/s Apache-Tomcat: The basic difference is Apache-Tomcat is written in Java but Apache-HTTP is written in C. Apart from this Apache-Tomcat is used as a webserver as well as to deploy Java Servlet's and JSP's [Java server pages] so basically Apache-Tomcat is used to serve Java Technologies whereas Apache-HTTP is used to serve HTTP. Prerequisites: Appropriate version of JRE [Java run-time environment] for instance jre1.7 is required to run tomcat-8[.X.X]. Tomcat binaries, for version 8 check this link . Sudo/Root access to the machine. Step1: Install JRE Download JRE from Java's official website. You can keep Java at any location but for my ease I have kept both Tomcat and Java in /opt. # cd /opt # cp jre-7u45-linux-x64.tar.gz . # tar -zxvf jre-7u45-linux-x64.tar.gz  The above command will create a folder with JRE binaries. In my case it was "jre1.7.0_45". Now set JRE_HOME [Required by Tomcat] and PATH. export JRE_HOME=/opt/jre1.7....

Some important commands

# Find CPU specifications cat /proc/cpuinfo # System information via uname: uname -r [Kernel release] uname -a [All information about the kernal] uname -s [Kernel name] uname -m [Machine hw name] uname -p [Processor type] uname -o [OS] uname -n [Node name] # Running kernel and compiler: cat /proc/version # X server version: X -showconfig or Xorg -version # List of Kernel modules loaded: lsmod # Memory and swap information cat /proc/meminfo free free -m [in MB] # Hard drives information: fdisk -l # Free/used drive space or mount points: df -h # Distribution ?? cat /etc/issue cat /etc/issue.net # Finding or locating files find locate which whereis # Log messages as they happen: tail -f /var/log/messages (shows last 10 lines). # What processes are running [concise information]: ps -A ps -A | grep <PROCESS_NAME/PID> [For specific process] # What process are running [Brief information]: ps -ef ps -ef | grep -i <PROCESS_NAME/PID...

Ways of searching a disk/hdd in RHEL6

There must be an entry in /sys/block/XXX # ls -lrt /sys/block/ /proc/partitions ==> cat /proc/partitions  major minor  #blocks  name    8        0   15728640 sda    8        1     512000 sda1    8        2   15215616 sda2    8       16    2097152 sdb  253        0   13148160 dm-0  253        1    2064384 dm-1 To list all the disk in the machine ==> fdisk -l # fdisk -l /dev/?d? To avoid all the dm devices. # fdisk -l 2>/dev/null | grep "Disk \/" Disk /dev/sda: 16.1 GB, 16106127360 bytes Disk /dev/sdb: 2147 MB, 2147483648 bytes Disk /dev/mapper/VolGroup-lv_root: 13.5 GB, 13463715840 bytes Disk /dev/mapper/VolGroup-lv_swap: 2113 MB, 2113929216 bytes # lsblk NAME                   ...