Archive for October, 2015

I installed WDS using PowerShell:

get-windowsfeature wds* | install-windowsfeature

In this post i configured DHCP scope.New client machines will use addresses from this scope.

To configure WDS,from server manager click WDS on the left and right click on server name on the left

Untitled

In WDS console,rught click on server name and choose configure server

Untitled

Check intergated with Active Directory

Untitled

Select location for boot and image files

Untitled

Because WDS and DHCP are on the same machine,i checked both check-boxes

Untitled

Decide if you want to respond to computers objects first created in AD (prestaged) or to any computers on which F12 is pressed (unknown)

Untitled

After you click Next,WDS service will start.Right click again on server name in WDS console,click AD DS tab to choose naming convention and where to store domain joined clients.Because for me domain join didn’t work,these settings weren’t neccessary.

Untitled

On boot tab,we can set if clients can download boot image from WDS without need to press F12 button

Untitled

Sysprepping referenced computer

Although i specified domain username/password in xml file,i couldn’t get win 10 to be domain member,i tried many,many times,with no success

Error [0x0b003a] WDS <GetNameInfo failed; status 0x8007276d>[gle=0x0000276d]</>

To overcome this issue i had to add PowerShell script to  c:\windows\setup\scripts folder

Untitled21

After last restart in installation process,Windows will serach for any script in Scripts folder and if find any,it will be executed

SetupComplete.cmd calls jd.ps1 powershell script

powershell.exe -nologo -executionpolicy bypass -noprofile -file "C:\Windows\Setup\Scripts\jd.ps1"

By default,powershell doesn’t allows running custom PS scripts,that’s why we need to bypass it

ps1.ps joins computer to domain

$domain = "test.com"
$password = "Mypass" | ConvertTo-SecureString -asPlainText -Force
$username = "$domain\administrator"
$credential = New-Object System.Management.Automation.PSCredential($username,$password)
$ouPath="OU=workstations,DC=test,DC=com"
add-computer -Credential $credential -DomainName $domain -OUPath $ouPath -restart -force

Now we need to capture image from this client computer (so that content of scripts folder can be available to all newly deployed computers)  and upload it to WDS server so it can be available for deployement.We also can install all neccesarry applications needed for users,and adjust system to comply to company policies.I didn’t join reference computer to domain.

SYSPREP is a tool that allows an admin to create a custom install OS image with all the necessary programs preinstalled.

Sysprep is located on %Windir%\System32\Sysprep

Untitled21

SYSPRER removes system-specific information from a Windows image, including the computer security identifier (SID) which allows you to transfer the image to other systems

Untitled1

After you click OK,SYSPRER will remove system-specific info from the system and shutdown it

Creating Capture image

Capture image is type of boot image that we boot a client computer into to capture the operating system as a .wim file.We create capture image from boot image (located in setup DVD in source folder)-the Microsoft Windows Preinstallation Environment (Windows PE) image.

Windows Preinstallation Environment (Windows PE) is a minimal Win32 operating system with limited services, built on the Windows kernel. It is used to prepare a computer for Windows installation, to copy disk images from a network file server, and to initiate Windows Setup.

In WDS console,right click on Boot Image-Add Boot image

Untitled2

browse to install DVD-source folder-and click Next

Untitled3

Right click on just imported boot image and select create capture image

Untitled4

Browse to uploaded boot image (partition set during WDS initial configuration\Boot\X64\Images

Untitled5

Type image and file name

Untitled6

Right click anywhere on the right and choose Add Boot  image

Untitled7

Select image created in previous step

Untitled8

Give it name and click next

Untitled9

Now,power on referenced computer (on which we run Sysprep)  press F12 and choose captured image we’ve just created

Untitled10

Untitled11

Untitled12

In name and location,browse somewhere on C disk and give image descriptive name,check upload image to WDS,
by default ImageGroup1 is created and click next,image of referenced client computer,represented in wim file will be uploaded to WDS.

Untitled13

After upload completes (time depends on client disk size and network bandwith),in WDS console rigtr click
Install image and choose Add install image

Untitled14

Captured image is stored in Images\ImageGroup folder

Untitled15

Now,when we have imported image of client computer,we can create xml file which would ensure automatic Win10

installation.Download Windows Assesement and Deployement Kit to WDS http://download.microsoft.com/download/8/1/9/8197FEB9-FABE-48FD-A537-7D8709586715/adk/adksetup.exe

Select Deployement Tools

Untitled14

In C:\Program Files (x86)\Windows Kits\10\Assesement and Deployement Kit\Deployement Tools\Wsim folder,run imgmgr.exe file

Untitled14

Windows System Image Manager opens,using this tool,we’ll create unattended.xml files needed for automatic Windows 10 installation.

Windows System Image Manager (WSIM) uses Windows image (.wim) files and catalog (.clg) files to display the available components and packages that can be added to an unattended answer file. Windows images and catalog files contain configurable settings that you can modify once the component or package is added to an answer file.

I tried to create catalog file from captured image and WSIM thrown an “unspecified error”,so i used default wim file from Win 10 install media

I had to copy install.wim from DVD to local disk

In WSIM click file-Select windows image

Untitled14

Browse to install.wim (copied from DVD),you’ll be promted to create catalog file

A “catalog” file is a binary file that lists the state of all the settings and packages in a Windows image. When a catalog is created, it queries the Windows image for a list of all the settings in that image

Untitled14

After creating catalog file,click New Answer File

Untitled14

Expand Conponents right click amd64_Microsoft-Windows-International-Core-WinPE_10.0.10240.16384_neutral

and select Pass1 WindowsPE (used in Windows Preinstallation environment)

Untitled14

Here we set Input,System,Language and User locale

Untitled14

Untitled14

Now select Microsoft-Windows-Setup_10.0.10240.16384_neutral and again select Pass 1 WindowsPE

Untitled14

In this stage we configure HDD-partition,label and letter

Untitled14

Untitled14

Untitled14

Under Windows deployement service (part of Microsoft-Windows-Setup_10.0.10240.16384_neutral)we specify image name,image group and wim filename

Untitled14

On which disk and partition to install wim image

Untitled14

And WDS credentials

Untitled14

Untitled

select amd64_Microsoft-Windows-Shell-Setup_10.0.10240.16384_neutral and choose pass 4 specialize (varius system desktop related settings)

Untitled
Save xml file to folder where images are stored.

In WDS console,right click on WDS server-Client properties and browse to xml file we just created

Untitled14

Win10.xml

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-us</UILanguage>
</SetupUILanguage>
<InputLocale>en-us</InputLocale>
<SystemLocale>en-us</SystemLocale>
<UILanguage>en-us</UILanguage>
<UILanguageFallback>en-us</UILanguageFallback>
<UserLocale>en-us</UserLocale>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DiskConfiguration>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Extend>true</Extend>
<Order>1</Order>
<Type>Primary</Type>
</CreatePartition>
</CreatePartitions>
<DiskID>0</DiskID>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Format>NTFS</Format>
<Label>SYSTEM</Label>
<Letter>C</Letter>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>
<WindowsDeploymentServices>
<Login>
<Credentials>
<Domain>test</Domain>
<Password>Zemun2013</Password>
<Username>administrator</Username>
</Credentials>
</Login>
<ImageSelection>
<InstallImage>
<Filename>w10-(2).wim</Filename>
<ImageGroup>ImageGroup1</ImageGroup>
<ImageName>w10_custom_image</ImageName>
</InstallImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
</ImageSelection>
</WindowsDeploymentServices>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<TimeZone>Central Europe Standard Time</TimeZone>
<ProductKey>NPPR9-FWDCX-D2C8J-H872K-2YT43</ProductKey>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:c:/users/administrator/desktop/win10.wim#Windows 10 Enterprise" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

Create new XML file

Select amd64_Microsoft-Windows-International-Core_10.0.10240.16384_neutral and choose

pass 7 oobeSystem: In this configuration pass, settings are applied before the LogOn screen appears

Untitled14

Untitled14

Again,select amd64_Microsoft-Windows-Shell-Setup_10.0.10240.16384_neutral and choose

pass 7 oobeSystem

Untitled14

Here you can set Time Zone

Untitled14

Untitled14

Setting Local Admin Account

Untitled14

Untitled14

Save file and assign it to captured image

Untitled16

Untitled17

deploy.xml

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>en-us</InputLocale>
<SystemLocale>en-us</SystemLocale>
<UILanguage>en-us</UILanguage>
<UILanguageFallback>en-us</UILanguageFallback>
<UserLocale>en-us</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>UABhAHMAcwB3ADAAcgBkADAANgBQAGEAcwBzAHcAbwByAGQA</Value>
<PlainText>false</PlainText>
</Password>
<Description>machine admin</Description>
<DisplayName>admin</DisplayName>
<Group>administrators</Group>
<Name>admin</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<ProtectYourPC>1</ProtectYourPC>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
</OOBE>
<TimeZone>Central Europe Standard Time</TimeZone>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:c:/users/administrator/desktop/win10.wim#Windows 10 Enterprise" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

Fire off workstation and installation should proceed without user intervention

In this blog we’ll set date and time,IP address,hostname (dc) on Windows Server 2016,install AD,DNS and DHCP roles,

and finally add windows 10 client to the domain,all of this will be done using PowerShell commands.

 rename-computer dc -restart

To set date and time:

 Set-Date -date "10/20/2015 22:23"

 

Untitled4

 

 

Setting TCP/IP properties (IP,Network mask,default gateway and DNS server)

get-netadapter | new-netipaddress -ipaddress 192.168.0.10 -prefixlength 24 -defaultgateway 192.168.0.1"
get-netadapter | new-netipaddress -ipaddress 192.168.0.10 -prefixlength 24 -defaultgateway 192.168.0.1"
get-netadapter | Set-DNSClientServerAddres -interfacealias "ethernet" -ServerAddresses 192.168.0.10

In above examples,we set servers ip address to 192.168.0.10,gateway to 192.168.0.1 and pointed preferred DNS toserver itself (192.168.0.10)

Installing AD (test.com) and promoting server to domain controller (installing DNS role in process)

Install-ADDSForest -creatednsdelegation:$false -databasepath "c:\windows:\ntds” -domainmode "win2012r2" -domainname "test.com" -domainnetbiosname "TEST" -forestmode "winr2012r2" -installdns:$false -logpath "c:\windows\ntds" -norebootoncompletion:$false -syswolpath "c:\windows\sysvol" -force:$true

Take a look at DNS zone file:
 

get-dnsserverresourcerecord -zonename "test.com"

Untitled

 

Installing and configuring DHCP on domain controller (DC)

install-windows-feature dhcp

Configure DHCP to listen on it’s ethernet interface

get-netadapter | Set-DhcpServerv4Binding -BindingState $true

Authorize DHCP in AD. An unauthorized DHCP server on a network can disrupt network operations by allocating incorrect addresses or configuration options.

Add-DhcpServerInDC -DnsName DC.test.com -IPAddress 192.168.0.10

Create and activate DHCP scope which will lease addresses in range 192.168.0.15/20

add-dhcpserverv4scope -startrange 192.168.0.15 -endrange 192.168.0.20 -subnemask 255.255.255.0 -name "test scope" -state active

Set default gateway and DNS  for DHCP scope

Set-DhcpServerv4OptionValue -ScopeId 192.168.0.0 -Router 192.168.0.1
Set-DhcpServerv4OptionValue -DnsServer 192.168.0.10 -DnsDomain test.com

Get scope properties:

Get-DhcpServerv4Scope –ComputerName dc | FL *

 
 
Untitled1

See leased addresses:

get-dhcpserverv4lease -scopeid 192.168.0.0

 
 
Untitled2

Create OU for win10 client:

New-ADOrganizationalUnit -name "workstations" -path "DC=test,dc=com"

Join win10 client to AD (type this from client computer)

add-computer -domain test.com oupath "ou=workstations,dc=test,dc=com"

Review AD computers:

get-adcomputer -filter * | ft

 
 
Untitled3

 

 

 

Replication in WMware vSphere 5.5

Posted: October 14, 2015 in VMWare

VMware vSphere Replication is a hypervisor-based, asynchronous replication solution for vSphere virtual machines. It is fully integrated with VMware vCenter Server and the vSphere Web Client.

vSphere Replication is provided in open virtualization format (OVF) or with a standard vCenter Server installation.OVF consist of vSphere Replication Server and components being used to administer and manage vSphere replications.With vSphere Replication, you can replicate virtual machines from a source datacenter to a target site quickly and efficiently

OVF appliance can be freely downloaded here,with your VMWare account

After downloading,right click your cluster in vSphere Web Client and choose deploy OVF template

Untitled

Browse to downloaded OVF file and click next

Untitled1

Accept EULA,provide a name,select appliance location,datastore.destination network,IP protocol,if you choose static IP allocation provide DNS,Gateway and subnet mask info and set root passwordReview service binding information and verify that Binding status is OK and click finish.

After successfuly deployement,open console and check if applianced has booted properly:

Untitled

Restar vCentar server (in my case i restarted vCenter appliance)

After restart click on vCenter Server,click manage tab,you shoud see vSphere replication tab.Click on it,click Replication Servers,you should see replication appliance

Untitled2

In this example we’ll migrate xp VM from one datastore to another.Please,take note that i am doing this in lab environment,in the real world,we would transfer VM to another vCenter server.

Right click on running VM and select AllvSphere Replication Actions-Configure replication

Untitled

Select replicate to a vCenter Server

Untitled4

Select vCenter server,i used same vCenter server i am logged in,in real time environment we would use another vCenter server.

Untitled5

Select vSphere replication server,which will conduct migration (in this case our OVA imported template)

Untitled6

select datastore on destination vCenter where VM shold be replicated to

Untitled7

Configure replication for VM.With a Recovery Point Objective (RPO) value we determine the maximum data loss that can be tolerated.If we set the RPO to 10 minutes,it means that vSphere Replication can tolerate losing the data for up to 10 minutes.In our example,the latest available replication instance can never be in a state that is older than 10 minutes. A replication instance refers to the state of a virtual machine at the time the replication starts.We can also enable multiple snapshot instances (Point in time instances) .

Untitled8

Click next and finish.

Click on vCenter Server-Monitor-vSphere Replication-outgoing replication

Untitled

If we want to configure additional recovery point,right click on VM and choose Sync now

Untitled1

Untitled

Recovering VM

To quickly recover recent version of VM,select vCenter server that vSphere Replication appliance is registered to from left sidebar-Monitor tab-vSphere Replication-incoming replication.

Select powered off VM,right click and choose recovery

Untitled10

Synchronize recent changes-Performs a full synchronization of the virtual machine from the source site to the target site before recovering the virtual machine,only available if the data of the source virtual machine is accessible

Use latest available data- Recovers the virtual machine by using the data from the most recent replication on the target site, without performing synchronization. Use this option if the source virtual machine is inaccessible or if its disks are corrupted.

Untitled11

Power on virtual machine after recovery

Untitled13

This is extension of my prevoius post regrading Check_MK setup

Check_MK server,by default,doesn’t install check_mk agent on windows machines.

In this example we will create Samba share on Check_MK server (folder with Check_MK agent setup),map that share from Windows machine and install it on Windows server.The beauty is that we won’t login in to Windows server at all !!!.

I got valuable support from colleague of mine,Matija Resimic https://www.linkedin.com/pub/matija-resimic/b8/b10/493 while creating material for this article

We will be using CentOS (Check_MK installed) to accomplish this task.

Creating Samba shares

root@nm- ~]#yum install samba

root@nm- ~]#vi /etc/samba/smb.conf

 

#======================= Global Settings =====================================

 

[global]

 

workgroup = MYGROUP

server string = Samba Server Version %v

netbios name = MYSERVER

interfaces = lo eth0 192.168.1.14/24

hosts allow = ALL

security = user

map to guest = bad user

Note:/opt/omd/versions/1.20/share/check_mk/agents/windows/ is default path for windows agents,I mapped windows folder.

/opt/omd/versions/1.20/share/check_mk/agents/windows/ is default path for windows agents,I mapped whole folder.

[check_mk]

path=/opt/omd/versions/1.20/share/check_mk/agents/windows/

browseable = yes

public = yes

# create mask = 666

# directory mask = 777

valid users = root

writable = yes

guest ok = yes

read only = no

;       valid users = %S

;       valid users = MYDOMAIN\%S

Set samba password for root user:

[root@check_mk build]# smbpasswd -a root

New SMB password:

Restart smb service:

[root@check_mk build]# service smb restart

Always test if you can access Samba share from windows (username root,password mypassword-set by smbpasswd command)

1

If you have any errors check /var/log/samba/log.smbd

Note:if you’re using firewall,make sure ports 137,138,139 and 445 (TCP and UDP) are opened

Installing Winexe

Using WinExe we can connect to Command Prompt of remote Windows machine and perform any command as if we are sitting in front of windows server

First,install dependencies:

yum update
yum install samba-client
yum install git
yum install gcc
yum install perl
yum install mingw*
yum install libcom_err-devel
yum install popt-devel
yum install zlib-devel
yum install zlib-static
yum install glibc-devel
yum install glibc-static
yum install python-devel
yum install gnutls-devel
yum install libacl-devel
yum install openldap-devel
yum install samba-devel

then download WinExe:

root@nm- ~]#git clone http://git.code.sf.net/p/winexe/winexe-waf winexe

After executing this command,new folder,winexe will appear,

cd to source folder (inside winexe)

Waf is a python script located at the root of any project directory. It is invoked by calling the script like a shell script.For more info click here

[root@check_mk tmp]# cd winexe/source/
[root@check_mk source]# ./waf configure build

1

Navigate to folder build:

1

[root@check_mk build ]# ./winexe --user=\administrator%MyPass //192.168.1.12 --system 'cmd /c net use X: \\192.168.1.14\check_mk MyPassword /USER:root /P:yes & X: & start /wait install_agent.exe /S & net use x: /delete /yes'

We’re connecting to remote windows server with IP 192.168.1.12 username administrator,password MyPass,mapping Samba share as X drive (\\192.168.1.14\check_mk) with user root,password MyPassword,then CD into that share (X:),install check_mk agent (start /wait install_agent.exe /S) /S install silently and after installation,delete X share (net use x: /delete /yes)

Note that every of these commands are separated by &

First command:connect to remote Windows machine (192.168.1.12) and map share from Samba server (192.168.1.14) using username root and password MyPassword and X letter

–user=\administrator%MyPass //192.168.1.12 –system ‘cmd /c net use X: \\192.168.1.14\check_mk MyPassword /USER:root /P:yes

Second command:go into X: share

X:

Third command:install check_mk agent silently:

start /wait install_agent.exe /S

Fourth command,delete Samba share

net use x: /delete /yes’

In this way,we installed check_mk agent on remote Windows server without connecting to it,of course,we need to know server’s IP address and credentials

This post wouldn’t be possible without selfless contribution colleagues of mine,Matija Resimic,https://www.linkedin.com/pub/matija-resimic/b8/b10/493. and Nikola Markovic https://rs.linkedin.com/pub/nikola-markovic/18/a01/58a

Check_MK is an Open Source extension of the Nagios monitoring system that allows creating rule-based configuration using Python.It allows users to monitor their entire IT infrastructure and spot any problems on monitored host.

Installing Check_MK

Check_MK is installed using Open Monitoring Distribution (OMD).It is a self-contained bundle that includes Nagios together with add-ons for gathering, monitoring, and graphing data.

Red Hat based packages can be found here.

First update your distro

[root@nm- ~]# yum upgrade

install it using rpm –ivh <path to rpm package>

Note:you will be asked for dependencies,so install them first

After successfully installation,create OMD site (in this example I created site named monitor)

[root@nm- ~]# omd create <sitename>

Then restart omd:

[root@nm- ~]# omd restart

Then,in your browser type http://<ip address of check_mk>/<sitename>

Default username:omdadmin,password:omd

Untitled

The Check_MK screen opens with a dashboard by default,showing all services and server statuses.

Untitled

Configuring smart host on Check_MK server

If you have no configured mail server on your CentOS machine,Check_mk won’t be able to send messages when errors on monitoring hosts occur.In that case,you either must configure mail server or redirect e-mail messages to smart host (another e-mail server),in our case,we set CentOS to send emails to smart host

Install sendmail:

[root@nm- ~]# yum install sendamail sendamil-cf -y

Go to /etc/mail and open file sendmail.mc

Find line SMART_HOST and edit it as follows

define(`SMART_HOST', ‘your-smtp server')

Close file

Now,in terminal,type

root@nm- ~]# m4 sendmail.mc > sendmail.cf

restart sendamil:

root@nm- ~]#service sendmail restart

Now try to send test mail

root@nm- ~]#mail –s "test" someone@example.com

If you get any issue,check /var/log/maillog for errors

If you want iptables to be running,make sure ports 80,443,25 and 6556-6557 are opened !!!

Configuring OMD

Creating contact groups

Contact groups are needed when creating mail notifications for users.

Contact groups are assigned to users:

From main menu click contact groups

Untitled

Enter group name and click save

Creating users:

Click users:

Untitled

Click new user

By default,check_mk creates Administrator user with username omdadmin and password omd

Untitled

Enter username/password (you can generate random password),add user to contact group,enter e-mail address

Untitled

Give user desired role (Administrator or Normal monitoring users)

Untitled

Enable mail notifications for newly created users,when you enable notifications,Check_mk will send messages when problem on monitoring hosts occurs,set notification period and events for which you want to receive mail notifications:

Untitled

Creating notification time periods

By default,notification period is 24/7,if you wish to customize it,click Time periods in the main menu-left sidebar

Untitled

Untitled

Untitled

This time period can be assigned to users

Untitled

To activate any changes,click Changes button

Untitled

And then click Activate changes

Untitled

Creating Host Tags

Host Tags are useful to describe the monitoring hosts (switch,router,Virtual Server,Physical server….)

In this example,we will create tag for routers

In main menu,click Host Tags

Untitled

Click new Tag Group

Untitled

Untitled

If we want to further divide router tags by Vendor (CISCO and Juniper,for example),click Add tag  and in Tag Id and Description type Cisco,click Add tag choice and enter another category,you can add as much catergories as you want

Untitled

Adding Monitoring hosts

For better manageability,it’s advisable to first create folder for hosts.In main menu click Hosts

Untitled

Click new folder

Untitled

Enter folder name and Click Save & Finish and apply changes.

To modify a folder (enter it in another folder,for example),hover mouse over folder and you’ll get menu

Untitled

Adding hosts

Click on the folder to enter in it and add hosts:

Untitled

Enter host name,ip address,add tags,agent types.

Untitled

To gather data Check_mk uses check_mk agents,which are installed on monitored hosts.By default check_mk agents are installed on linux hosts,but fow windows,agent must be manually installed

The path to agent is:

/opt/omd/versions/<check_mk_version>/share/check_mk/agents/windows

Untitled

Simple copy install_Agent.exe to windows host,install it,and check_mk agent will collect data from it

To see all hosts click All hosts in left sidebar

Untitled

Untitled

To set tresholds and to exclude service from monitoring click hosts,click on folder with hosts

Untitled

To edit services for particular host,click pencil icon

Untitled

Click services:

Untitled

To set threshold click on marked icon:

Untitled

Click Create rule in folder (select folder in drop-down list)

Untitled

Untitled

To exclude service from monitoring click “X” mark:

Untitled

Distributed Monitoring

With Distributred monitoring is possible to collect data from remote Check_MK servers.

For example,If we can’t reach hosts (which need to be monitored in remote locations), we can install check_mk server on remote location (where we can add hosts we want to monitor). In that case using master (our local server)-slave (remote Check_MK server) configuration, we can monitor remote hosts from our local server.

To configure Distributed Monitoring you need to create local and remote site. Master site (local network) will push configuration to the slave (remote network), without need to access remote check_mk server (slave). All changes are made on master will be replicated on slave

All configurations for Distributed Monitoring are done on MASTER server! (Check_MK server on our local network).If we have Check_MK server on remote location (192.168.1.1,for example),on our local server,we can create local site as per examples bellow:

From main menu click Distribured monitoring-New Connection

Untitled

Untitled

Create New Connection for remote location (on 192.168.1.1 Check_MK server)

Untitled

Save and apply changes

Next,on Distributed Monitoring main page, click login button on slave connection, enter credentials of remote Check_MK server,click save and apply

From now on,when we add new hosts on primary Check_MK server,select remote site from drop-down menu,and they will be hosed on secondary one.

Untitled

By default,we won’t be able to see graphs of remote hosts on master Check_MK server.To overcome this,in /etc/httpd/conf.d directory  create file multisite_proxy.conf file

(slave in screenshots is used as name of remote OMD instance)

<Location /slave>

RewriteEngine On

RewriteRule ^/.+/slave/(.*) http://192.168.1.1/slave/$1 [P]

</Location>

Restart OMD from terminal (omd restart) and you’ll see graphs of remote hosts on your local Check_MK server.