Windows server 2012 replication monitor

Мониторинг репликации Active Directory с помощью PowerShell

Большинство администраторов AD для контроля репликацией в Active Directory используют консольные утилиты repadmin (появилась еще в Windows Server 2003) и replmon (нужно копировать из Support Tool для WS2003). Microsoft в Windows Server 2012 добавила ряд командлетов PowerShell, которые можно использовать для управления и проверки статуса репликации в лесу Active Directory. В этой статье мы рассмотрим основные полезные командлеты PoSh, которые может использовать администратор AD для контроля за своей инфраструктурой.

Командлеты для управления и мониторинга репликации AD входят в состав модуля Active Directory для PowerShell. Его можно включить после установки RSAT. Для импорта модуля в сессию PowerShell нужно выполнить команду:

Полный список командлетов, связанных с репликацией, в модуле activedirectory можно вывести так:

get-command -module activedirectory -name *ADReplicat*

Для сбора информации об ошибках редупликации на конкретном контролере домена, нужно использовать команддет Get-ADReplicationFailure:

Get-ADReplicationFailure -Target DC01

В том случае, если ошибок нет, командлет ничего не вернет, в противном случае вы увидите список сбойных объектов и причины ошибок репликации.

Можно опросить сразу несколько DC:

Get-ADReplicationFailure -Target DC01,DC02

В данном случае видно, что 22 февраля была проблема связи с контроллером домена dc02 (link failure), но на данный момент ошибка не наблюдается.

Для быстрого получения статуса репликации для всех DC в указанном сайте:

Get-ADReplicationFailure -scope site -target Kursk | FT Server, LastError, Partner-Auto

Либо сразу все контроллеры домена в домене или лесу ( -Scope Forest ):

Get-ADReplicationFailure -Target «winitpro.ru» -Scope Domain

Командлет Get-ADReplicationConnection используется для вывода информацию о партнерах репликации для текущего контролера домена.

Если нужно вывести подключения репликации с конкретным DC, выполните команду:

Для запуска принудительной синхронизации конкретного объекта между контроллерами домена, используется командлет Sync-ADObject. К примеру, возмем ситуацию, когда некий объект AD удален, помещен в корзину AD и впоследствии восстановлен. Сразу после восстановления объекта можно выполнить принудительную репликацию восстановленного объекта на все контроллеры домена (список DC можно получить командлетом Get-ADDomainController) с помощью командлета Sync-ADObject:

Get-ADDomainController -filter * | foreach

Командлет Get-ADReplicationPartnerMetadata позволяет получить информацию о метаданных репликации между DC и партнерами. К примеру, для получения со всех DC информации о времени последней попытки выполнить репликацию с партнером и времени последней успешной репликации, наберите:

Get-ADReplicationPartnerMetadata -Target «$env:userdnsdomain» -Scope Domain | Select-Object Server, LastReplicationAttempt, LastReplicationSuccess, Partner

Можно получить статус репликации конкретного объекта:

Get-ADReplicationAttributeMetadata -Object «CN=Maxim Vetrov,OU=Users,DC=winitpro,DC=ru» -Server DC01

С помощью командлета Get-ADReplicationQueueOperation можно получить список ожидающих операций репликации на конкретном сервере.

Командлет Get-ADReplicationUpToDatenessVectorTable позволяет получить список значений USN для партнеров по репликации:

Get-ADReplicationUpToDatenessVectorTable * | ft Partner,Server,UsnFilter

Таким образом, PowerShell предоставляет мощный и удобный инструмент для мониторинга и решения проблем с репликацией в лесу AD, который на 100% может заменить функционал утилиты repadmin по мониторингу и управлению репликацией в Active Directory.

Диагностика репликации контроллеров домена Windows 2012 R2

Хорошая практикой является — регулярная диагностика правильной репликации между контроллерами домена. Для диагностики чаще всего используются встроенные в ОС Windows сервер утилиты repadmin и dcdiag.

Читайте также:  Драйвер для руля speedlink sl 6684 bk windows 10

Утилита repadmin, предназначена для отслеживания событий о сбоях возникающих при репликации между контроллерами домена(ов).

Синтаксис утилиты repadmin:

Примеры применения команд:

repadmin /showrepl /u:имя-домена\логин /pw:пароль — отобразит все состояние репликации входящих соседей

ключ /verbose к любой команде указывать показывать детализированную информацию

repadmin /replsummary — отображает краткое состояние репликации и относительную работоспособность леса

repadmin /syncall — синхронизирует контроллер домена (указанный) со всеми партнерами репликации

repadmin /kcc — принуждает перерасчитать входящую топологию репликации

repadmin /replicate — запускает немедленную репликацию (указанного раздела)

repadmin /? — покажет подробную справку по командам

Также для диагностики репликации доменных служб Active Directory используется встроенная в Windows утилита Dcdiag. Dcdiag является средством командной строки, с его помощью можно диагностировать состояние контроллеров домена в лесу, диагностировать ДНС регистрацию контроллеров домена, проводить другие важные элементы диагностики и выявления ошибок в доменной структуре предприятия.

Для того чтобы выполнить проверку на наличие ошибок репликации между контроллерами домена с помощью Dcdiag, необходимо запустить утилиту со следующими ключами:

dcdiag /test:replications Ключи утилиты dcdiag:

/s: — указать использовать сервер каталогов в качестве основного

/u:домен\логин /p:пароль — указать использовать учетные данные

/e: проверка всех доступных серверов

/q: — выводит только сообщения об ошибках

dcdiag /? — покажет подробную справку по командам

Запуск монитора репликации Start the Replication Monitor

Применимо к: Applies to: SQL Server SQL Server (все поддерживаемые версии) SQL Server SQL Server (all supported versions) Управляемый экземпляр SQL Azure Azure SQL Managed Instance Управляемый экземпляр SQL Azure Azure SQL Managed Instance Применимо к: Applies to: SQL Server SQL Server (все поддерживаемые версии) SQL Server SQL Server (all supported versions) Управляемый экземпляр SQL Azure Azure SQL Managed Instance Управляемый экземпляр SQL Azure Azure SQL Managed Instance

Монитор репликации может быть запущен из командной строки или в среде SQL Server Management Studio SQL Server Management Studio на любом экземпляре SQL Server SQL Server . Replication Monitor can be started from SQL Server Management Studio SQL Server Management Studio on any instance of SQL Server SQL Server , or from the command prompt. Запустив монитор репликации, добавьте в монитор одного или несколько издателей. After starting Replication Monitor, add one or more Publishers to monitor. Дополнительные сведения см. в статье Добавление и удаление издателей в мониторе репликации. For more information, see Add and Remove Publishers from Replication Monitor.

Запуск монитора репликации из среды SQL Server Management Studio To start Replication Monitor from SQL Server Management Studio

Подключитесь к экземпляру SQL Server SQL Server в среде SQL Server Management Studio SQL Server Management Studio , а затем раскройте узел сервера. Connect to an instance of SQL Server SQL Server in SQL Server Management Studio SQL Server Management Studio , and then expand the server node.

Щелкните правой кнопкой мыши папку Репликация или любую из ее вложенных папок, а затем щелкните Запустить монитор репликации. Right-click the Replication folder or any of its subfolders, and then click Launch Replication Monitor.

Запуск монитора репликации из командной строки To start Replication Monitor from the command prompt

Находясь в командной строке, перейдите в каталог установки средств. From the command prompt, navigate to the tools installation directory. Путь по умолчанию: C:\Program Files\Microsoft SQL Server\nnn C:\Program Files\Microsoft SQL Server\nnn \Tools\Binn. The default path is C:\Program Files\Microsoft SQL Server\nnn C:\Program Files\Microsoft SQL Server\nnn \Tools\Binn\ .

Windows server 2012 replication monitor

We have made improvements to the way we display Replication Health in Windows Server 2012 R2 to support Extend Replication. If you are new to measuring replication health, I would strongly suggest you to go through this two part blog series on Interpreting Replication Health. I would discuss specifically on the additional changes we made in Windows Server 2012 R2.

Читайте также:  Intel gma 945 драйвер windows 10

Replication Tab in Replica Site Hyper-V Manager:

Replication tab in Replica Site now shows replication health information for both Primary Replication Relationship and Extended Replication relationship. It neatly captures the Health values separately for both primary and extend replication in a single pane separating them by a line.

Replication Health Screen in Replica Site:

Replication Health information about Extend Replication can be captured through “ Extended Replication ” tab in Replication Health screen. To view Replication Health Screen, go to Hyper-V Manager/Failover Cluster Manager and right click on protected VM and choose “ View Replication Health ”.

Replication health information about primary replication relationship is shown in “Replication” tab while extended replication screen displays Replication Health information about extend replication. What’s more, Extended Replication tab looks exactly like Replication Health screen in Primary Server to give a consistent view while Replication tab continues to display the content the way it used to. You can even “Reset Statistics” or “Save as CSV file” on a relationship basis.

Replication Health through PowerShell:

I can get Replication Health details of Extended Replication through Powershell by setting “ ReplicationRelationshipType ” **** parameter to “ Extended ”. To view the health of Replication from primary to replica, use the value of “ Simple ” as input to ReplicationRelationshipType parameter.

Measure-VMReplication –VMName -ReplicationRelationshipType Extended

While we have added support to display extended replication in our UI/PS, getting details about primary replication relationship remain same

How can monitoring DFS Replication in Windows Server 2012

DFS Replication it’s a great feauture to use it in your File Servers and Replicate them in LAN or WAN. Why not include this technology in your Disaster Recovery Plan ?

Today I will describe how can monitoring Health Status of DFS Replication , files that are replicated or not and what are supported limits of DFS Replication.

If you thinking to go with Windows Server 2016 you can find out the new articles

So let’s s start !!

Supported limits of DFS Replication

Base on Microsoft in https://technet.microsoft.com/library/cc773238.aspx#BKMK_00 for the Windows Server 2012 R2 the limits are:

  • Size of all replicated files on a server: 100 terabytes.
  • Number of replicated files on a volume: 70 million.
  • Maximum file size: 250 gigabytes.

So if you have File Server with more than the below guideline then it’s better to use another solution for your Replication.

How to Check DFS Replication Status

It’s very important to keep DFS Replication healthy and avoid unexpected Replications.

After create Replication how can check Health and effectively of your Replications in Member Servers? Follow the steps to create Reports that can give you important information’s of DFS Replication

  • Open DFS Management.
  • Expand Replication and Select the Group that you want to create the Report.
  • From the right side click Create Diagnostic Report.

  • Select the first option Health Report and click Next.

  • Select the path that you want to extract the Report or leave the Default. Click Next.

  • All the Server are in Include Members. If you want to create Diagnostic Report for specific Server select the Server and click Remove. Click Next.

  • I will leave the option Yes, count backlogged files in this Report. Be carefully with the Reference Member. Must be the Server that has the most update files. Click Next.
Читайте также:  Windows with metal doors

  • Just a review of your settings. Click Create and wait until finish the Report.

  • When the report finish will open an Internet Explorer with the Results. Or go in C:\DfsReports (Default Path) or in any other Path if has change it while run the Wizard.
  • Now what we have here.

After some info like Replication Group, Reference Member and more it has interesting results like

ERRORS

Here you can see a simple explanation of the Errors

WARNING

Here you can see a simple explanation of the Warnings

SERVERS UNAVAILABLE FOR REPORTING

If any Server is Unavailable in the Specific Report.

SERVERS DETAILS

Detail Explanation of Errors and Warnings that found per Server.

  • Expand the ERRORS to see in which Server has Errors and click View Server Details.
  • The most important info are in SERVER DETAILS because include all the info from the above Options and details for every ERROR or WARNING.
  • Expand SERVER DETAILS and the Server Name which has Errors.
  • As we can see here in my Report i have some sharing violations for 176 files in 1 folder.
  • If you Expand the . Replicated Folder you can see the first 100 Files that hasn’t Replicated because of sharing Violations.

  • With the same way you can check and the WARNINGS.

Health Report include some good info for the Replications but it’s not the Report that can cover you if you would like to know exactly what’s going on.

In the following section i will explain suggested ways that can use for better controlling and monitoring in DFS Replication.

Monitoring files that are replicated or not

As explain in previous Section with Health Reports you can get ERRORS and WARNINGS for the Replication between Members. Read the previous section > to understand how can use it.

  1. Backlog Files Report

If you would like to get a Report only for the Files that aren’t replicated you can use the following command in Powershell

Get-DfsrBacklog -GroupName «GroupName» -FolderName «FolderName» -SourceComputerName «SourceComputerName» -DestinationComputerName «DestinationComputerName» –Verbose

This will be the Output with lot of details that can use to resolve replication issues.

  1. Use the Event Logs to identify Warnings and Errors .

Logs files of DFS Replication can find it in Application and Services Logs. If you expand it you can see specific file for Logs of DFS Replication. There find general Errors of Staging , Communication between Member Servers, when Replication start and stop but you can’t see errors for Files that aren’t Replicated.

These are some of the recommended ways to use and identify different problem of DFS Replication. Unfortunately Microsoft don’t has a good Monitoring or Report Solution for DFS. But if you use these ways you can have a good feedback for what is going on in your DF Replication.

Are you looking for more in Monitiroing Solutions?

Let’s take a look in some of my Articles

How to use Resource Metering in HYPERV . What is Resource Metering ? A feature that was introduced in Windows Server 2012 Hyper-V that isn’t immediately obvious and is driven by using Windows PowerShell.

Have a nice Weekend!!

Are you familiar with DFS Replication. Do you have face errors ? Share your experience in our commented system and get opinion or solution from other IT Pro.

Оцените статью