Template Zabbix untuk memantau replikasi DFS

Untuk waktu yang lama saya akan mengonfigurasi pemantauan layanan Replikasi DFS di Zabbix kami, tetapi saya tidak menemukan templat yang sudah jadi di jaringan. Saya menemukan beberapa proyek terbengkalai di sini dan di sini , tetapi penulis pertama tidak menyelesaikannya, dan di tautan kedua untuk mengunduh templat tidak berfungsi. Selain itu, keduanya hanya sebatas pemantauan backlog, meski sebenarnya metriknya jauh lebih banyak. Oleh karena itu, saya memutuskan untuk membuat sepeda saya dengan stang bundar dan templat turbin dengan penemuan dan skrip. Saya memulainya sejak lama, tetapi tangan saya tidak mencapai akhir. Seperti kata pepatah, ada lapisan perak: di lokasi terpencil dalam isolasi diri, saya akhirnya menyelesaikannya. Banyak pekerjaan telah dilakukan, tapi saya tidak serakah, jadi saya berbagi. :)

Sebelum kamu memulai

  • Lebih lanjut dalam teks di bawah host yang saya maksud adalah server dengan peran DFSR, yang pemantauannya dikonfigurasi.

  • Kadang-kadang, untuk singkatnya, saya akan menggunakan singkatan RG dan RF, bukan grup replikasi dan folder yang direplikasi .

Secara keseluruhan

Pertama-tama, penting untuk menentukan apa yang akan dimonitor dan bagaimana memonitor.

Mudah bagi saya untuk menjawab pertanyaan kedua. Tentu saja, ini akan dipantau oleh agen dengan LLD dan skrip kustom. Memilih bahasa untuk skrip, tanpa ragu-ragu, saya memilih PowerShell. Banyak peluang, Microsoft secara aktif mempromosikan, kami sangat mencintaiku :). Ada juga pemikiran untuk melakukannya di VBScript untuk kompatibilitas dengan versi lama Windows, tetapi setelah merenungkan , saya menyerah pada ide ini.

Ada dua skrip PS dalam solusi: Get-DFSRObjectDiscovery.ps1 dan Get-DFSRObjectParam.ps1

, - (item Zabbix), - . WMI-. , .. .

" ?" . DFSR , , DFSR, , .

, :

  • ;

  • ;

  • ;

  • DFSR;

  • ;

  • .

.

DFSR, . , Active Directory MyRG3, , . .

Microsoft.

Zabbix 2.2 5.0 Windows 2008R2 SP1 2019, Zabbix 3.4, Zabbix 5.0 Windows 2012 R2.

(value mapping), Zabbix.

(DFS Replication Groups)

:

  • (outbound connections);

  • (inbound connections);

  • (number of folders);

  • (blank schedule).

DFS Replication Groups LLD.

, , , . , , . . , , 1, 0.

, . , .

(DFS Replicated Folders)

:

  • (backlog size);

  • (state)

  • (enabled)

  • " " ('read-only' mode)

  • " " ('remove deleted' enabled)

  • (redundancy)

  • , (stage quota)

  • (stage used)

  • (stage free (percentage))

  • , (conflict quota)

  • (conflict used)

  • (conflict free (percentage))

  • ;

DFS Replicated Folders Backlog LLD. . -, DFSR - , , , DFSR-. , , = , , . -, , , , , .

3 :

{$BACKLOGMAXWARNING} - warning- ( 10);

{$BACKLOGMAXAVERAGE} - average- ( 100);

{$BACKLOGPERIOD} - ( 15 ).

, 10 15 , warning-. 100, average-.

, DFSR, , Managment Pack SCOM ("" Microsoft) . , . :

( ) DFS Replicated Folders LLD. , state redundancy.

State - , :

  • Uninitialized (0)

  • Initialized (1)

  • Initial Sync (2)

  • Auto Recovery (3)

  • Normal (4)

  • In Error (5)

Redundancy - , Normal. , , .

stage free (percentage) conflict free (percentage), . , , , zabbix-.

5% , . 5% {$STAGEDIRPFREEMIN} {$CONFLICTDIRPFREEMIN}.

DFS Replicated Folders PerfCounters LLD. , .., , , . , . , , .

, , Conflict Files Generated, , RF. . :

{$CONFLICTSGENERATEDCHANGEWARNING} - , warning- ( 10);

{$CONFLICTSGENERATEDCHANGEAVERAGE} - average- ( 100);

{$CONFLICTSGENERATEDPERIOD} - , , ( 5 ).

, 5 10- , warning-, 100 - average-.

? . ,   DFSN \\abc.com\Share. ( ): \\server1\Share \\server2\Share. + . AD- ( Office1 Office2). Office1, \\abc.com\Share, server1, Office2 - server2 (, , , ). \\abc.com\Share\_.xlsx ( - ) . , , , , , , Ctrl+S 5 , . , , , , .

, , - , - , DFS-. , .

RF 4 :

  • (conflict space usage)

  • (stage space usage)

  • , (received bytes)

  • (received files and conflicts)

(DFS Replication Connections)

:

  • (state);

  • (enabled);

  • (blank schedule);

  • .

: DFS Replication Connections LLD - , DFS Replication Connections PerfCounters LLD - .

State - , :

  • Connecting (0)

  • Online (1)

  • Offline (2)

  • In Error (3)

Enabled - .

Blank schedule - RG. , , RG.

RF, , bytes received per second, :

DFSR (DFS Replication Service Volumes)

:

  • (state);

  • .

: DFS Replication Service Volumes LLD DFS Replication Service Volumes PerfCounters LLD. - state, :

  • Initialized (0)

  • Shutting Down (1)

  • In Error (2)

  • Auto Recovery (3)

.

(DFS Replication Partners)

:

  • PING (ping check);

  • WMI (WMI check).

DFS Replication Partners LLD. , : , "" ICMP WMI. WMI , - zabbix-. WMI- - , DFSR- backlog size redundancy ( ). , zabbix- . , WMI- , - . :

(General)

:

  • DFSR (DFS Replication role installed);

  • , (Number of replication groups);

  • DFSR (DFSR Event Log);

  • (DFS Replication service state);

  • (DFS Replication service uptime);

  • (DFSR Service Version);

  • DFSR (DFSR Provider Version);

  • DFSR (DFSR Monitoring Provider Version);

.

, Items .

. 3 , :

  • DFSR Event Log: number of warnings

  • DFSR Event Log: number of errors

  • DFSR Event Log: number of critical errors

, - PS-. (, , ) , . , . , . :

{$DFSRLOGCRITICALMAX} - "" DFSR, high- ( 0);

{$DFSRLOGERRORSMAX} - "" DFSR, average- ( 0);

{$DFSRLOGWARNINGSMAX} - "" DFSR, warning- ( 0);

{$DFSRLOGPERIOD} - ( 1 )

:

  • Service Starting (0)

  • Service Running (1)

  • Service Degraded (2)

  • Service Shutting Down (3)

  • Stopped (100)

  • Not Found (101)

, .

, RG Zabbix- RG , .

:

- RF: Zabbix "perf_counter[\XXX\YYY]" is not supported: Cannot obtain performance information from collector. Windows (perfmon, typeperf, Get-Counter) . Zabbix Agent. RF-, (, ) .

GitHub Zabbix Share. !

.

Monitoring DFSR

DFSR WMI Classes

DFSR Performance Objects, Their Counters, Corresponding WMI Classes, and Using WMIC or Vbscript to View Them

Get-DFSRBacklog (Technet gallery)

DFS Replication Backlog Discovery

DFS Replication Management Pack for Windows Server 2008 R2

Optional configuration for the DFS Replication Management Pack

PowerShell — Zabbix — Json ConvertTo-Json2

Displaying Unicode in Powershell

powershell : changing the culture of current session

Searching the Active Directory with PowerShell

PowerShell scripting performance considerations




All Articles