Saturday, November 12, 2016

AWS - Create VPC


1) Go to the AWS console and  Click on VPC Tab

















2) Click on Create VPC












Fill-up  the VPC details eg, VPC Name, Subnet - 172.16.0.0/16 



















3) Create Subnet











Subnet Tag, Select VPC , Available zone and all Network Range (IP )


 Create Subnet, Select Region , Add IP  Range 

 Create 1 Subnet Name: test_data_flow and region : us-east-2a, IP  Range -172.16.0.0/24
 Create 2 Subnet Name: test_backup and region : us-east-2b, IP  Range -172.16.1.0/24
 Create 3 Subnet Name: test_App and region : us-east-2c, IP  Range -172.16.2.0/24
Please find the below Subnet details4 ) Create Internet Gateway













Internet Gateway Tag


Attached ro VPC and enable internet gateway
5) Create Route Table

Select VPC and Add Tag

Ad
d Route, you get the route table details 

Add (Associate) created Subnet to route table 


If you like my post please comment and share

Install NRPE on Ubuntu and LinuxMint

Install and configure nagios nrpe client in Ubuntu with apt-get command

NRPE (Nagios Remote Plugin Executor) is used for executing Nagios plugins on remote client systems. In previous article we had described about installation of Nagios Server on Ubuntu operating system. This article will help you to install NRPE on Ubuntu 15.04, 14.04, 12.04 & LinuxMint systems.

Step 1. Install NRPE and Nagios Plugins

NRPE is available under default apt repositories of Ubuntu systems. Execute the following command to install it
$ sudo apt-get install nagios-nrpe-server nagios-plugins
Step 2. Configure NRPE

In NRPE configuration, first we need to nrpe to which nagios servers it accepts requests, For example your nagios server ip is 192.168.1.x, then add this ip to allowed hosts list. Edit NRPE configuration file /etc/nagios/nrpe.cfg and make changes like

allowed_hosts=127.0.0.1, 192.168.1.X (nagios server ip )
we can add more Nagios servers in allowed hosts by comma separated list.

Backup  /etc/nagios/nrpe.cfg file
mv /etc/nagios/nrpe.cfg /etc/nagios/nrpe.cfg_bkp
Create symlink for /usr/local/nagios/etc/nrpe.cfg to /etc/nagios/nrpe.cfg

ln -s /usr/local/nagios/etc/nrpe.cfg /etc/nagios/nrpe.cfg

Now restart NRPE service. Now its ready to listen requests from Nagios server

$ sudo /etc/init.d/nagios-nrpe-server restart
Let’s login to your Nagios server and verify that your Nagios server can communicate with NRPE service properly. Execute following command from nagios server plugin directory, and we are assuming that your nrpe client-server ip is 192.168.1.11.

# check_nrpe -H 192.168.1.11

NRPE v2.15
The output “NRPE v2.15” shows that nagios server successfully communicated with nrpe.


Step 3. Add Check Commands in NRPE

All the services check commands with the nagios plugins packages, which is by default installed in /usr/lib/nagios/plugins/ for 32 bit systems. Default installation adds few commands in configuration file. Add more commands as per your requirements like below

command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
Step 4. Start/Stop NRPE Service

Use following commands to start, stop or restart nrpe service. Each time we make any changes in configuration file required to restart service

$ sudo /etc/init.d/nagios-nrpe-server stop
$ sudo /etc/init.d/nagios-nrpe-server start
$ sudo /etc/init.d/nagios-nrpe-server restart

If you like my post please comment and share

Wednesday, November 9, 2016

AWS-Launch new Instance

1 ) Go to the AWS console and click on the EC2 Management Console 



2) Click on Launch Instance Option  

3) Choose an  Amazon Machine Image (AMI) 

















 Select Free tier only 
















4) Choose an Instance Type

















5) Configure Instance Details  
eg.Zzone, Role, VPC, Shutdown Behavior and Termination Agent Protection 

















6)  Add Storage

















7) Tag Tnstance -  Instance Name

















8)  Configure Security Group or Select Existing or  Add rules as per your requirement 

















9) Review Instance launch  ( Full Instance details)

















10) Select Existing key pair  or Create a new key pair




























11) After Launch Instance you get instance id, just check on Instance Id ( Instance Initializing)




12) Now you can find Instance details , eg. IP, VPC, Role, DNS, Status and HDD details 



















If you like my post please comment and share



Monday, November 7, 2016

AWS-AMI-image creation and Launch Instance

Go to the AWS console and check on the EC2 Management Console and Search Server that you want to create image,
1) Search IP or Instance ID


 2) Right click on server and Create Image


3) fill the Image and description and select no reboot option otherwise image is created then original server will reboot automatically   

if you want to delete attached hdd then just click on attached hdd cross mark 




 4) Find the created image details



5) How to launch Image to Instance 
Select Image ID  and click on launch 

6) After Launch Instance, Choose an  Amazon Machine Image (AMI) 

7) Configure Instance Details ,
eg.Zzone, Role, VPC, Shutdown Behavior and Termination Agent Protection  

8) Add storage

9) Tag Instance -  Instance Name

10) Configure Security Group or Select Existing or  Add rules as per your requirement  

11) Review Instance launch  ( Full Instance details)



12)  Select existing key pair  or Create a new key pair



13)  After Launch Instance you get instance id, just check on Instance id ( Instance Initializing)



14)  Now you can find Instance details , eg. IP, VPC, Role, DNS, Status and HDD details 


If you like my post please comment and share