From 4c0ec04418e89fcea4037976c0969e4d0fd08e9a Mon Sep 17 00:00:00 2001 From: JaromirK Date: Mon, 16 Oct 2023 23:57:31 +0200 Subject: [PATCH 1/2] grafana scenario update --- .../Dashboards/AzSHCI-Cache.json | 0 .../AzSHCI-Host_Health_Dashboard.json | 0 .../Dashboards/AzSHCI-Hyper-V_Metrics.json | 0 .../Dashboards/AzSHCI-Network_Dashboard.json | 0 .../Dashboards/AzSHCI-Overview.json | 0 .../Dashboards/AzSHCI-Storage_Dashboard.json | 0 .../AzSHCI-Storage_Dashboard_Small.json | 0 .../Dashboards/AzSHCI-VMFleet.json | 0 Scenarios/AzSHCI and Grafana/Labconfig.ps1 | 11 ++ .../Scenario.ps1 | 113 +++++++----------- .../Screenshots/AutoEnrolledCerts.png | Bin .../Screenshots/CATemplates01.png | Bin .../Screenshots/CATemplates02.png | Bin .../Screenshots/CATemplates03.png | Bin .../Screenshots/ConnectionSecurityRule.png | Bin .../Screenshots/Dash-AzSHCI-Cache.png | Bin .../Dash-AzSHCI-Host_Health_Dashboard.png | Bin .../Dash-AzSHCI-Hyper-V_Metrics.png | Bin .../Dash-AzSHCI-Network_Dashboard.png | Bin .../Screenshots/Dash-AzSHCI-Overview.png | Bin .../Dash-AzSHCI-Storage_Dashboard.png | Bin .../Dash-AzSHCI-Storage_Dashboard_Small.png | Bin .../Screenshots/Dash-AzSHCI-VMFleet.png | Bin .../Screenshots/DownloadedFiles.png | Bin .../Screenshots/EncryptedTrafficPosh.png | Bin .../Screenshots/EncryptedTrafficWFmsc.png | Bin .../Screenshots/FWRuleGrafana.png | Bin .../Screenshots/FWRuleInfluxDB.png | Bin .../FWRuleInfluxDBAuthorizedComputers.png | Bin .../Screenshots/FoldersInProgramFiles.png | Bin .../Screenshots/GrafanaAddDatasource01.png | Bin .../Screenshots/GrafanaAddDatasource02.png | Bin .../Screenshots/GrafanaAddDatasource03.png | Bin .../Screenshots/GrafanaAddDatasource04.png | Bin .../Screenshots/GrafanaDashboard.png | Bin .../Screenshots/GrafanaImportDashboard01.png | Bin .../Screenshots/GrafanaImportDashboard02.png | Bin .../Screenshots/GrafanaService.png | Bin .../Screenshots/GrafanaServiceNSSM.png | Bin .../Screenshots/GrafanaUsers.png | Bin .../Screenshots/GrafanaWeb.png | Bin .../Screenshots/InfluxDBFiles.png | Bin .../Screenshots/InfluxDBFolders.png | Bin .../Screenshots/InfluxDBService.png | Bin .../Screenshots/InfluxDBServiceNSSM.png | Bin .../Screenshots/LDAPtoml.png | Bin .../Screenshots/LDP.png | Bin .../Screenshots/Scenario.png | Bin .../Screenshots/VMs.png | Bin .../readme.md | 102 ++++++++-------- .../telegraf.conf | 2 +- .../telegraf.ps1 | 0 .../todelete/dashboard_s2d_old.json | 0 .../todelete/telegraf_old.conf | 0 .../todelete/telegraf_old.ps1 | 0 .../todelete/telegraf_old2.conf | 0 Scenarios/S2D and Grafana/Labconfig.ps1 | 14 --- 57 files changed, 107 insertions(+), 135 deletions(-) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Dashboards/AzSHCI-Cache.json (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Dashboards/AzSHCI-Host_Health_Dashboard.json (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Dashboards/AzSHCI-Hyper-V_Metrics.json (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Dashboards/AzSHCI-Network_Dashboard.json (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Dashboards/AzSHCI-Overview.json (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Dashboards/AzSHCI-Storage_Dashboard.json (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Dashboards/AzSHCI-Storage_Dashboard_Small.json (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Dashboards/AzSHCI-VMFleet.json (100%) create mode 100644 Scenarios/AzSHCI and Grafana/Labconfig.ps1 rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Scenario.ps1 (87%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/AutoEnrolledCerts.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/CATemplates01.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/CATemplates02.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/CATemplates03.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/ConnectionSecurityRule.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/Dash-AzSHCI-Cache.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/Dash-AzSHCI-Host_Health_Dashboard.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/Dash-AzSHCI-Hyper-V_Metrics.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/Dash-AzSHCI-Network_Dashboard.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/Dash-AzSHCI-Overview.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/Dash-AzSHCI-Storage_Dashboard.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/Dash-AzSHCI-Storage_Dashboard_Small.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/Dash-AzSHCI-VMFleet.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/DownloadedFiles.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/EncryptedTrafficPosh.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/EncryptedTrafficWFmsc.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/FWRuleGrafana.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/FWRuleInfluxDB.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/FWRuleInfluxDBAuthorizedComputers.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/FoldersInProgramFiles.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/GrafanaAddDatasource01.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/GrafanaAddDatasource02.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/GrafanaAddDatasource03.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/GrafanaAddDatasource04.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/GrafanaDashboard.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/GrafanaImportDashboard01.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/GrafanaImportDashboard02.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/GrafanaService.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/GrafanaServiceNSSM.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/GrafanaUsers.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/GrafanaWeb.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/InfluxDBFiles.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/InfluxDBFolders.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/InfluxDBService.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/InfluxDBServiceNSSM.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/LDAPtoml.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/LDP.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/Scenario.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/Screenshots/VMs.png (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/readme.md (73%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/telegraf.conf (99%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/telegraf.ps1 (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/todelete/dashboard_s2d_old.json (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/todelete/telegraf_old.conf (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/todelete/telegraf_old.ps1 (100%) rename Scenarios/{S2D and Grafana => AzSHCI and Grafana}/todelete/telegraf_old2.conf (100%) delete mode 100644 Scenarios/S2D and Grafana/Labconfig.ps1 diff --git a/Scenarios/S2D and Grafana/Dashboards/AzSHCI-Cache.json b/Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Cache.json similarity index 100% rename from Scenarios/S2D and Grafana/Dashboards/AzSHCI-Cache.json rename to Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Cache.json diff --git a/Scenarios/S2D and Grafana/Dashboards/AzSHCI-Host_Health_Dashboard.json b/Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Host_Health_Dashboard.json similarity index 100% rename from Scenarios/S2D and Grafana/Dashboards/AzSHCI-Host_Health_Dashboard.json rename to Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Host_Health_Dashboard.json diff --git a/Scenarios/S2D and Grafana/Dashboards/AzSHCI-Hyper-V_Metrics.json b/Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Hyper-V_Metrics.json similarity index 100% rename from Scenarios/S2D and Grafana/Dashboards/AzSHCI-Hyper-V_Metrics.json rename to Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Hyper-V_Metrics.json diff --git a/Scenarios/S2D and Grafana/Dashboards/AzSHCI-Network_Dashboard.json b/Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Network_Dashboard.json similarity index 100% rename from Scenarios/S2D and Grafana/Dashboards/AzSHCI-Network_Dashboard.json rename to Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Network_Dashboard.json diff --git a/Scenarios/S2D and Grafana/Dashboards/AzSHCI-Overview.json b/Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Overview.json similarity index 100% rename from Scenarios/S2D and Grafana/Dashboards/AzSHCI-Overview.json rename to Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Overview.json diff --git a/Scenarios/S2D and Grafana/Dashboards/AzSHCI-Storage_Dashboard.json b/Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Storage_Dashboard.json similarity index 100% rename from Scenarios/S2D and Grafana/Dashboards/AzSHCI-Storage_Dashboard.json rename to Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Storage_Dashboard.json diff --git a/Scenarios/S2D and Grafana/Dashboards/AzSHCI-Storage_Dashboard_Small.json b/Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Storage_Dashboard_Small.json similarity index 100% rename from Scenarios/S2D and Grafana/Dashboards/AzSHCI-Storage_Dashboard_Small.json rename to Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Storage_Dashboard_Small.json diff --git a/Scenarios/S2D and Grafana/Dashboards/AzSHCI-VMFleet.json b/Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-VMFleet.json similarity index 100% rename from Scenarios/S2D and Grafana/Dashboards/AzSHCI-VMFleet.json rename to Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-VMFleet.json diff --git a/Scenarios/AzSHCI and Grafana/Labconfig.ps1 b/Scenarios/AzSHCI and Grafana/Labconfig.ps1 new file mode 100644 index 00000000..7c345735 --- /dev/null +++ b/Scenarios/AzSHCI and Grafana/Labconfig.ps1 @@ -0,0 +1,11 @@ +$LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!';<# Prefix = 'MSLab-';#> SwitchName = 'LabSwitch'; DCEdition='4'; Internet=$true ; AdditionalNetworksConfig=@(); VMs=@()} + +#Azure Stack HCI 22H2 +1..4 | ForEach-Object {$LABConfig.VMs += @{ VMName = "AzSHCI$_" ; Configuration = 'S2D' ; ParentVHD = 'AzSHCI22H2_G2.vhdx' ; HDDNumber = 4 ; HDDSize= 2TB ; MemoryStartupBytes= 1GB; VMProcessorCount=4 ; vTPM=$true}} +#Or with nested virtualization enabled +#1..4 | ForEach-Object {$LABConfig.VMs += @{ VMName = "AzSHCI$_" ; Configuration = 'S2D' ; ParentVHD = 'AzSHCI22H2_G2.vhdx' ; HDDNumber = 4 ; HDDSize= 2TB ; MemoryStartupBytes= 4GB; VMProcessorCount=4 ; vTPM=$true ; NestedVirt=$true}} + +$LabConfig.VMs += @{ VMName = 'Management' ; ParentVHD = 'Win2022_G2.vhdx' ; MGMTNICs=1} +$LabConfig.VMs += @{ VMName = 'CA' ; ParentVHD = 'Win2022Core_G2.vhdx' ; MGMTNICs=1} +$LabConfig.VMs += @{ VMName = 'Grafana' ; ParentVHD = 'Win2022Core_G2.vhdx'; MemoryStartupBytes= 1GB ; MGMTNICs=1} +$LabConfig.VMs += @{ VMName = 'InfluxDB' ; ParentVHD = 'Win2022Core_G2.vhdx'; Configuration = 's2d' ; SSDNumber = 1 ; SSDSize=1GB ; HDDNumber = 0 ; HDDSize= 4TB ; MemoryStartupBytes= 1GB ; MGMTNICs=1} diff --git a/Scenarios/S2D and Grafana/Scenario.ps1 b/Scenarios/AzSHCI and Grafana/Scenario.ps1 similarity index 87% rename from Scenarios/S2D and Grafana/Scenario.ps1 rename to Scenarios/AzSHCI and Grafana/Scenario.ps1 index 00b2044e..40651168 100644 --- a/Scenarios/S2D and Grafana/Scenario.ps1 +++ b/Scenarios/AzSHCI and Grafana/Scenario.ps1 @@ -2,7 +2,7 @@ #grafana and influxdb variables $GrafanaServerName="Grafana" $InfluxDBServerName="InfluxDB" - $InfluxDBPath="E:\InfluxDB\" #path for DB and config. In lab is E drive, that is not initialized and will be formatted + $InfluxDBPath="E:\InfluxDB" #path for Database. In lab is E drive, that is not initialized and will be formatted $InfluxDBConfigPath=$InfluxDBPath+"influxdb.conf" #Certification Authority @@ -20,58 +20,27 @@ $Grafana_Admins_To_Add = "LabAdmin" #firewall vars - $IPSecEnabledServers="DC",$GrafanaServerName,$InfluxDBServerName,"S2D1","S2D2","S2D3","S2D4" - $InfluxDBAuthorizedServers="DC",$GrafanaServerName,"S2D1","S2D2","S2D3","S2D4" + $IPSecEnabledServers="Management",$GrafanaServerName,$InfluxDBServerName,"AzSHCI1","AzSHCI2","AzSHCI3","AzSHCI4" + $InfluxDBAuthorizedServers="Management",$GrafanaServerName,"AzSHCI1","AzSHCI2","AzSHCI3","AzSHCI4" #telegraf - monitored servers - $clusters=@("S2D-Cluster") + $clusters=@("AzSHCI-Cluster") #$clusters=(Get-Cluster -Domain $env:USERDOMAIN | Where-Object S2DEnabled -eq 1).Name #endregion #region download required files to downloads folder -#influxDB and telegraph -Start-BitsTransfer -Source https://dl.influxdata.com/influxdb/releases/influxdb-1.8.3_windows_amd64.zip -Destination "$env:USERPROFILE\Downloads\influxdb-1.8.3-1.zip" -Start-BitsTransfer -Source https://dl.influxdata.com/telegraf/releases/telegraf-1.16.2_windows_amd64.zip -Destination "$env:USERPROFILE\Downloads\telegraf-1.16.2.zip" -#Grafana -Start-BitsTransfer -Source https://dl.grafana.com/oss/release/grafana-7.3.4.windows-amd64.zip -Destination "$env:USERPROFILE\Downloads\grafana-7.3.4.zip" -#NSSM - the Non-Sucking Service Manager -Start-BitsTransfer -Source https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip -Destination "$env:USERPROFILE\Downloads\NSSM.zip" + #influxDB and telegraph + Start-BitsTransfer -Source https://dl.influxdata.com/influxdb/releases/influxdb-1.8.10_windows_amd64.zip -Destination "$env:USERPROFILE\Downloads\influxdb-1.8.10.zip" + Start-BitsTransfer -Source https://dl.influxdata.com/telegraf/releases/telegraf-1.28.2_windows_amd64.zip -Destination "$env:USERPROFILE\Downloads\telegraf-1.28.2.zip" + #Grafana + Start-BitsTransfer -Source https://dl.grafana.com/oss/release/grafana-10.1.5.windows-amd64.zip -Destination "$env:USERPROFILE\Downloads\grafana-10.1.5.zip" + #NSSM - the Non-Sucking Service Manager + Start-BitsTransfer -Source https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip -Destination "$env:USERPROFILE\Downloads\NSSM.zip" #endregion -#region Download and Install Edge -Start-BitsTransfer -Source "https://aka.ms/edge-msi" -Destination "$env:USERPROFILE\Downloads\MicrosoftEdgeEnterpriseX64.msi" -#start install -Start-Process -Wait -Filepath msiexec.exe -Argumentlist "/i $env:UserProfile\Downloads\MicrosoftEdgeEnterpriseX64.msi /q" -#start Edge -start-sleep 5 -& "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" -#endregion - -#region install management tools - $WindowsInstallationType=Get-ItemPropertyValue -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\' -Name InstallationType - $CurrentBuildNumber=Get-ItemPropertyValue -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\' -Name CurrentBuildNumber - if ($WindowsInstallationType -eq "Server"){ - Install-WindowsFeature -Name RSAT-Clustering,RSAT-Clustering-Mgmt,RSAT-Clustering-PowerShell,RSAT-AD-PowerShell,RSAT-ADCS,Web-Mgmt-Console,Web-Scripting-Tools - }elseif ($WindowsInstallationType -eq "Server Core"){ - Install-WindowsFeature -Name RSAT-Clustering,RSAT-Clustering-PowerShell,RSAT-AD-PowerShell - }elseif (($WindowsInstallationType -eq "Client") -and ($CurrentBuildNumber -lt 17763)){ - #Validate RSAT Installed - if (!((Get-HotFix).hotfixid -contains "KB2693643") ){ - Write-Host "Please install RSAT, Exitting in 5s" - Start-Sleep 5 - Exit - } - }elseif (($WindowsInstallationType -eq "Client") -and ($CurrentBuildNumber -ge 17763)){ - #Install RSAT tools - $Capabilities="Rsat.ServerManager.Tools~~~~0.0.1.0","Rsat.FailoverCluster.Management.Tools~~~~0.0.1.0","Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0","Rsat.CertificateServices.Tools~~~~0.0.1.0" - foreach ($Capability in $Capabilities){ - Add-WindowsCapability -Name $Capability -Online - } - #install IIS management tools - Enable-WindowsOptionalFeature -Online -FeatureName "IIS-WebServerRole","IIS-WebServerManagementTools","IIS-ManagementConsole","IIS-ManagementScriptingTools" - Disable-WindowsOptionalFeature -Online -FeatureName "IIS-WebServer" -NoRestart - } +#region install management tools (assuming you are managing from Windows Server with GUI) + Install-WindowsFeature -Name RSAT-Clustering,RSAT-Clustering-Mgmt,RSAT-Clustering-PowerShell,RSAT-AD-PowerShell,RSAT-ADCS,Web-Mgmt-Console,Web-Scripting-Tools #endregion #region setup Certification Authority @@ -417,18 +386,17 @@ renewServerCertificate: 1 $GrafanaSession=New-PSSession -ComputerName $GrafanaServerName $InfluxDBSession=New-PSSession -ComputerName $InfluxDBServerName - Copy-Item -Path "$env:USERPROFILE\Downloads\influxdb-1.8.3-1.zip" -Destination "$env:temp\influxdb-1.8.3-1.zip" -tosession $InfluxDBSession - Copy-Item -Path "$env:USERPROFILE\Downloads\grafana-7.3.4.zip" -Destination "$env:temp\grafana-7.3.4.zip" -tosession $GrafanaSession + Copy-Item -Path "$env:USERPROFILE\Downloads\influxdb-1.8.10.zip" -Destination "$env:temp\influxdb-1.8.10.zip" -tosession $InfluxDBSession + Copy-Item -Path "$env:USERPROFILE\Downloads\grafana-10.1.5.zip" -Destination "$env:temp\grafana-10.1.5.zip" -tosession $GrafanaSession Copy-Item -Path "$env:USERPROFILE\Downloads\NSSM.zip" -Destination "$env:temp\NSSM.zip" -tosession $GrafanaSession Copy-Item -Path "$env:USERPROFILE\Downloads\NSSM.zip" -Destination "$env:temp\NSSM.zip" -tosession $InfluxDBSession #extract zip files and copy to destination folder invoke-command -Session $InfluxDBSession -scriptblock { - Expand-Archive -Path "$env:temp\influxdb-1.8.3-1.zip" -DestinationPath "$env:temp" -Force - Rename-Item -Path "$env:temp\influxdb-1.8.3-1" -NewName "InfluxDB" + Expand-Archive -Path "$env:temp\influxdb-1.8.10.zip" -DestinationPath "$env:temp" -Force + Rename-Item -Path "$env:temp\influxdb-1.8.10-1" -NewName "InfluxDB" Expand-Archive -Path "$env:temp\NSSM.zip" -DestinationPath "$env:temp" -Force #rename folder to remove version - Get-ChildItem -Path $env:temp | Where-Object name -like influxdb-* | Rename-Item -NewName InfluxDB Get-ChildItem -Path $env:temp | Where-Object name -like nssm-* | Rename-Item -NewName NSSM #move to program files Move-Item -Path "$env:temp\InfluxDB" -Destination $env:ProgramFiles -Force @@ -441,11 +409,10 @@ renewServerCertificate: 1 } invoke-command -Session $GrafanaSession -scriptblock { - Expand-Archive -Path "$env:temp\grafana-7.3.4.zip" -DestinationPath "$env:temp" -Force - Rename-Item -Path "$env:temp\grafana-7.3.4.zip" -NewName "Grafana" + Expand-Archive -Path "$env:temp\grafana-10.1.5.zip" -DestinationPath "$env:temp" -Force + Rename-Item -Path "$env:temp\grafana-10.1.5" -NewName "Grafana" Expand-Archive -Path "$env:temp\NSSM.zip" -DestinationPath "$env:temp" -Force #rename folder to remove version - Get-ChildItem -Path $env:temp | Where-Object name -like grafana-* | Rename-Item -NewName Grafana Get-ChildItem -Path $env:temp | Where-Object name -like nssm-* | Rename-Item -NewName NSSM #move to program files Move-Item -Path $env:temp\Grafana -Destination $env:ProgramFiles -Force @@ -477,7 +444,6 @@ renewServerCertificate: 1 $content=$content.Replace("/var/lib/influxdb/",$using:InfluxDBPathForeSlash) Set-Content -Value $Content -Path $using:InfluxDBConfigPath -Encoding UTF8 } - #endregion #region Configure Grafana and Influx DB services @@ -508,7 +474,7 @@ renewServerCertificate: 1 -Action Allow ` -Name "InfluxDB-HTTP-In-TCP" ` -DisplayName "InfluxDB (HTTP-In)" ` - -Description "Inbound rule for Grafana DB. [TCP-8086]" ` + -Description "Inbound rule for Influx DB. [TCP-8086]" ` -Enabled True ` -Direction Inbound ` -Program "%ProgramFiles%\InfluxDB\influxd.exe" ` @@ -525,7 +491,7 @@ renewServerCertificate: 1 -Action Allow ` -Name "InfluxDBBackup-HTTP-In-TCP" ` -DisplayName "InfluxDBBackup (HTTP-In)" ` - -Description "Inbound rule for Grafana DB. [TCP-8088]" ` + -Description "Inbound rule for Influx DB. [TCP-8088]" ` -Enabled True ` -Direction Inbound ` -Program "%ProgramFiles%\InfluxDB\influxd.exe" ` @@ -650,7 +616,7 @@ Invoke-command -computername $GrafanaServerName -scriptblock { #Grab DN $CAcert=(Get-CertificationAuthority).certificate #download OpenSSL and transfer to GrafanaServer - Start-BitsTransfer -Source "http://wiki.overbyte.eu/arch/openssl-1.1.1g-win64.zip" -Destination $env:USERPROFILE\Downloads\OpenSSL.zip + Start-BitsTransfer -Source "https://wiki.overbyte.eu/arch/openssl-3.1.3-win64.zip" -Destination $env:USERPROFILE\Downloads\OpenSSL.zip #transfer OpenSSL to $GrafanaServer $GrafanaSession=New-PSSession -ComputerName $GrafanaServerName Copy-Item -Path $env:USERPROFILE\Downloads\OpenSSL.zip -Destination $env:USERPROFILE\Downloads\OpenSSL.zip -ToSession $GrafanaSession @@ -676,8 +642,8 @@ Invoke-command -computername $GrafanaServerName -scriptblock { $tomlfilecontent=$tomlfilecontent.Replace("port = 389","port = 636") #configure SSL $tomlfilecontent=$tomlfilecontent.Replace("use_ssl = false","use_ssl = true") - #configure disable CA validation as it root ca is not trusted even all is configured right (fixed in latest release, commenting) - #$tomlfilecontent=$tomlfilecontent.Replace("ssl_skip_verify = false","ssl_skip_verify = true") + #configure disable CA validation as it root ca is not trusted even all is configured right "tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead\n[identity.not-found] no user fund: user not found" + $tomlfilecontent=$tomlfilecontent.Replace("ssl_skip_verify = false","ssl_skip_verify = true") #set content to Toml file $tomlfilecontent | Set-Content -Path "C:\Program Files\Grafana\conf\ldap.toml" #endregion @@ -711,7 +677,7 @@ New-NetFirewallRule -CimSession $GrafanaServerName ` -Description "Inbound rule for Grafana web. [TCP-443]" ` -Enabled True ` -Direction Inbound ` --Program "%ProgramFiles%\Grafana\bin\grafana-server.exe" ` +-Program "%ProgramFiles%\Grafana\bin\grafana.exe" ` -Protocol TCP ` -LocalPort 443 ` -Profile Any ` @@ -722,11 +688,10 @@ New-NetFirewallRule -CimSession $GrafanaServerName ` #region push telegraf agent to nodes $InfluxDBServerURL="http://InfluxDB.corp.contoso.com:8086" - $clusters=@("S2D-Cluster") #expand telegraf - Expand-Archive -Path "$env:USERPROFILE\Downloads\telegraf-1.16.2.zip" -DestinationPath "$env:temp" -Force - Rename-Item -Path "$env:temp\telegraf-1.16.2" -NewName "telegraf" + Expand-Archive -Path "$env:USERPROFILE\Downloads\telegraf-1.28.2.zip" -DestinationPath "$env:temp" -Force + Rename-Item -Path "$env:temp\telegraf-1.28.2" -NewName "telegraf" #provide your telegraf and config $posh = Get-Content -Path $env:userprofile\Downloads\telegraf.ps1 -ErrorAction Ignore @@ -734,8 +699,8 @@ New-NetFirewallRule -CimSession $GrafanaServerName ` #or download telegraf configuration from WSLab Github and configure grafana URL if (!$config -or !$posh){ - $config=(invoke-webrequest -usebasicparsing -uri https://raw.githubusercontent.com/Microsoft/WSLab/dev/Scenarios/S2D%20and%20Grafana/telegraf.conf).content - $posh=(invoke-webrequest -usebasicparsing -uri https://raw.githubusercontent.com/Microsoft/WSLab/dev/Scenarios/S2D%20and%20Grafana/telegraf.ps1).content.substring(1) + $config=(invoke-webrequest -usebasicparsing -uri https://raw.githubusercontent.com/Microsoft/MSLab/dev/Scenarios/AzSHCI%20and%20Grafana/telegraf.conf).content + $posh=(invoke-webrequest -usebasicparsing -uri https://raw.githubusercontent.com/Microsoft/MSLab/dev/Scenarios/AzSHCI%20and%20Grafana/telegraf.ps1).content.substring(1) #save config and posh to Downloads folder $posh | out-file -Filepath $env:userprofile\Downloads\telegraf.ps1 -force -Encoding UTF8 $config | out-file -Filepath $env:userprofile\Downloads\telegraf.conf -force -Encoding UTF8 @@ -769,7 +734,14 @@ New-NetFirewallRule -CimSession $GrafanaServerName ` #replace telegraf conf and drop posh script Invoke-command -Session $sessions -ScriptBlock { $config=$using:config - $config.replace("# clustername = ","clustername = $('"')$using:Cluster$('"')") | Out-File -FilePath "$env:ProgramFiles\telegraf\telegraf.conf" -Encoding UTF8 -Force + $config=$config.replace("# clustername = ","clustername = $('"')$using:Cluster$('"')") + #raplace RDMA adapters + $RDMAAdapters=(Get-NetAdapterRdma | Where-Object OperationalState -eq $true | Where-Object Description -NotLike Hyper* |Sort-Object InterfaceDescription).InterfaceDescription + $output=$Null + foreach ($Adapter in $RDMAAdapters){$output+="`,`"$Adapter`""} + $output=$output.TrimStart(",") + $Config=$config.replace("PlaceRDMAAdaptersHere","$Output") + $Config | Out-File -FilePath "$env:ProgramFiles\telegraf\telegraf.conf" -Encoding UTF8 -Force $using:posh | Out-File -FilePath "$env:ProgramFiles\telegraf\telegraf.ps1" -Encoding UTF8 -Force } #install telegraf @@ -781,7 +753,7 @@ New-NetFirewallRule -CimSession $GrafanaServerName ` #Example - Just replace telegraf conf on already deployed nodes <# - $clusters=@("S2D-Cluster") + $clusters=@("AzSHCI-Cluster") $InfluxDBServerURL="http://InfluxDB.corp.contoso.com:8086" #load posh and config from downloads @@ -796,7 +768,14 @@ New-NetFirewallRule -CimSession $GrafanaServerName ` Invoke-command -ComputerName $servers -ScriptBlock { Stop-Service Telegraf $config=$using:config - $config.replace("# clustername = ","clustername = $('"')$using:Cluster$('"')") | Out-File -FilePath "$env:ProgramFiles\telegraf\telegraf.conf" -Encoding UTF8 -Force + $config=$config.replace("# clustername = ","clustername = $('"')$using:Cluster$('"')") + #raplace RDMA adapters + $RDMAAdapters=(Get-NetAdapterRdma | Where-Object OperationalState -eq $true | Where-Object Description -NotLike Hyper* |Sort-Object InterfaceDescription).InterfaceDescription + $output=$Null + foreach ($Adapter in $RDMAAdapters){$output+="`,`"$Adapter`""} + $output=$output.TrimStart(",") + $Config=$config.replace("PlaceRDMAAdaptersHere","$Output") + $Config | Out-File -FilePath "$env:ProgramFiles\telegraf\telegraf.conf" -Encoding UTF8 -Force $using:posh | Out-File -FilePath "$env:ProgramFiles\telegraf\telegraf.ps1" -Encoding UTF8 -Force Start-Service Telegraf } diff --git a/Scenarios/S2D and Grafana/Screenshots/AutoEnrolledCerts.png b/Scenarios/AzSHCI and Grafana/Screenshots/AutoEnrolledCerts.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/AutoEnrolledCerts.png rename to Scenarios/AzSHCI and Grafana/Screenshots/AutoEnrolledCerts.png diff --git a/Scenarios/S2D and Grafana/Screenshots/CATemplates01.png b/Scenarios/AzSHCI and Grafana/Screenshots/CATemplates01.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/CATemplates01.png rename to Scenarios/AzSHCI and Grafana/Screenshots/CATemplates01.png diff --git a/Scenarios/S2D and Grafana/Screenshots/CATemplates02.png b/Scenarios/AzSHCI and Grafana/Screenshots/CATemplates02.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/CATemplates02.png rename to Scenarios/AzSHCI and Grafana/Screenshots/CATemplates02.png diff --git a/Scenarios/S2D and Grafana/Screenshots/CATemplates03.png b/Scenarios/AzSHCI and Grafana/Screenshots/CATemplates03.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/CATemplates03.png rename to Scenarios/AzSHCI and Grafana/Screenshots/CATemplates03.png diff --git a/Scenarios/S2D and Grafana/Screenshots/ConnectionSecurityRule.png b/Scenarios/AzSHCI and Grafana/Screenshots/ConnectionSecurityRule.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/ConnectionSecurityRule.png rename to Scenarios/AzSHCI and Grafana/Screenshots/ConnectionSecurityRule.png diff --git a/Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Cache.png b/Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Cache.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Cache.png rename to Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Cache.png diff --git a/Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Host_Health_Dashboard.png b/Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Host_Health_Dashboard.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Host_Health_Dashboard.png rename to Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Host_Health_Dashboard.png diff --git a/Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Hyper-V_Metrics.png b/Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Hyper-V_Metrics.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Hyper-V_Metrics.png rename to Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Hyper-V_Metrics.png diff --git a/Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Network_Dashboard.png b/Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Network_Dashboard.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Network_Dashboard.png rename to Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Network_Dashboard.png diff --git a/Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Overview.png b/Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Overview.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Overview.png rename to Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Overview.png diff --git a/Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Storage_Dashboard.png b/Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Storage_Dashboard.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Storage_Dashboard.png rename to Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Storage_Dashboard.png diff --git a/Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Storage_Dashboard_Small.png b/Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Storage_Dashboard_Small.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-Storage_Dashboard_Small.png rename to Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-Storage_Dashboard_Small.png diff --git a/Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-VMFleet.png b/Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-VMFleet.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/Dash-AzSHCI-VMFleet.png rename to Scenarios/AzSHCI and Grafana/Screenshots/Dash-AzSHCI-VMFleet.png diff --git a/Scenarios/S2D and Grafana/Screenshots/DownloadedFiles.png b/Scenarios/AzSHCI and Grafana/Screenshots/DownloadedFiles.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/DownloadedFiles.png rename to Scenarios/AzSHCI and Grafana/Screenshots/DownloadedFiles.png diff --git a/Scenarios/S2D and Grafana/Screenshots/EncryptedTrafficPosh.png b/Scenarios/AzSHCI and Grafana/Screenshots/EncryptedTrafficPosh.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/EncryptedTrafficPosh.png rename to Scenarios/AzSHCI and Grafana/Screenshots/EncryptedTrafficPosh.png diff --git a/Scenarios/S2D and Grafana/Screenshots/EncryptedTrafficWFmsc.png b/Scenarios/AzSHCI and Grafana/Screenshots/EncryptedTrafficWFmsc.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/EncryptedTrafficWFmsc.png rename to Scenarios/AzSHCI and Grafana/Screenshots/EncryptedTrafficWFmsc.png diff --git a/Scenarios/S2D and Grafana/Screenshots/FWRuleGrafana.png b/Scenarios/AzSHCI and Grafana/Screenshots/FWRuleGrafana.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/FWRuleGrafana.png rename to Scenarios/AzSHCI and Grafana/Screenshots/FWRuleGrafana.png diff --git a/Scenarios/S2D and Grafana/Screenshots/FWRuleInfluxDB.png b/Scenarios/AzSHCI and Grafana/Screenshots/FWRuleInfluxDB.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/FWRuleInfluxDB.png rename to Scenarios/AzSHCI and Grafana/Screenshots/FWRuleInfluxDB.png diff --git a/Scenarios/S2D and Grafana/Screenshots/FWRuleInfluxDBAuthorizedComputers.png b/Scenarios/AzSHCI and Grafana/Screenshots/FWRuleInfluxDBAuthorizedComputers.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/FWRuleInfluxDBAuthorizedComputers.png rename to Scenarios/AzSHCI and Grafana/Screenshots/FWRuleInfluxDBAuthorizedComputers.png diff --git a/Scenarios/S2D and Grafana/Screenshots/FoldersInProgramFiles.png b/Scenarios/AzSHCI and Grafana/Screenshots/FoldersInProgramFiles.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/FoldersInProgramFiles.png rename to Scenarios/AzSHCI and Grafana/Screenshots/FoldersInProgramFiles.png diff --git a/Scenarios/S2D and Grafana/Screenshots/GrafanaAddDatasource01.png b/Scenarios/AzSHCI and Grafana/Screenshots/GrafanaAddDatasource01.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/GrafanaAddDatasource01.png rename to Scenarios/AzSHCI and Grafana/Screenshots/GrafanaAddDatasource01.png diff --git a/Scenarios/S2D and Grafana/Screenshots/GrafanaAddDatasource02.png b/Scenarios/AzSHCI and Grafana/Screenshots/GrafanaAddDatasource02.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/GrafanaAddDatasource02.png rename to Scenarios/AzSHCI and Grafana/Screenshots/GrafanaAddDatasource02.png diff --git a/Scenarios/S2D and Grafana/Screenshots/GrafanaAddDatasource03.png b/Scenarios/AzSHCI and Grafana/Screenshots/GrafanaAddDatasource03.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/GrafanaAddDatasource03.png rename to Scenarios/AzSHCI and Grafana/Screenshots/GrafanaAddDatasource03.png diff --git a/Scenarios/S2D and Grafana/Screenshots/GrafanaAddDatasource04.png b/Scenarios/AzSHCI and Grafana/Screenshots/GrafanaAddDatasource04.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/GrafanaAddDatasource04.png rename to Scenarios/AzSHCI and Grafana/Screenshots/GrafanaAddDatasource04.png diff --git a/Scenarios/S2D and Grafana/Screenshots/GrafanaDashboard.png b/Scenarios/AzSHCI and Grafana/Screenshots/GrafanaDashboard.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/GrafanaDashboard.png rename to Scenarios/AzSHCI and Grafana/Screenshots/GrafanaDashboard.png diff --git a/Scenarios/S2D and Grafana/Screenshots/GrafanaImportDashboard01.png b/Scenarios/AzSHCI and Grafana/Screenshots/GrafanaImportDashboard01.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/GrafanaImportDashboard01.png rename to Scenarios/AzSHCI and Grafana/Screenshots/GrafanaImportDashboard01.png diff --git a/Scenarios/S2D and Grafana/Screenshots/GrafanaImportDashboard02.png b/Scenarios/AzSHCI and Grafana/Screenshots/GrafanaImportDashboard02.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/GrafanaImportDashboard02.png rename to Scenarios/AzSHCI and Grafana/Screenshots/GrafanaImportDashboard02.png diff --git a/Scenarios/S2D and Grafana/Screenshots/GrafanaService.png b/Scenarios/AzSHCI and Grafana/Screenshots/GrafanaService.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/GrafanaService.png rename to Scenarios/AzSHCI and Grafana/Screenshots/GrafanaService.png diff --git a/Scenarios/S2D and Grafana/Screenshots/GrafanaServiceNSSM.png b/Scenarios/AzSHCI and Grafana/Screenshots/GrafanaServiceNSSM.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/GrafanaServiceNSSM.png rename to Scenarios/AzSHCI and Grafana/Screenshots/GrafanaServiceNSSM.png diff --git a/Scenarios/S2D and Grafana/Screenshots/GrafanaUsers.png b/Scenarios/AzSHCI and Grafana/Screenshots/GrafanaUsers.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/GrafanaUsers.png rename to Scenarios/AzSHCI and Grafana/Screenshots/GrafanaUsers.png diff --git a/Scenarios/S2D and Grafana/Screenshots/GrafanaWeb.png b/Scenarios/AzSHCI and Grafana/Screenshots/GrafanaWeb.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/GrafanaWeb.png rename to Scenarios/AzSHCI and Grafana/Screenshots/GrafanaWeb.png diff --git a/Scenarios/S2D and Grafana/Screenshots/InfluxDBFiles.png b/Scenarios/AzSHCI and Grafana/Screenshots/InfluxDBFiles.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/InfluxDBFiles.png rename to Scenarios/AzSHCI and Grafana/Screenshots/InfluxDBFiles.png diff --git a/Scenarios/S2D and Grafana/Screenshots/InfluxDBFolders.png b/Scenarios/AzSHCI and Grafana/Screenshots/InfluxDBFolders.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/InfluxDBFolders.png rename to Scenarios/AzSHCI and Grafana/Screenshots/InfluxDBFolders.png diff --git a/Scenarios/S2D and Grafana/Screenshots/InfluxDBService.png b/Scenarios/AzSHCI and Grafana/Screenshots/InfluxDBService.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/InfluxDBService.png rename to Scenarios/AzSHCI and Grafana/Screenshots/InfluxDBService.png diff --git a/Scenarios/S2D and Grafana/Screenshots/InfluxDBServiceNSSM.png b/Scenarios/AzSHCI and Grafana/Screenshots/InfluxDBServiceNSSM.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/InfluxDBServiceNSSM.png rename to Scenarios/AzSHCI and Grafana/Screenshots/InfluxDBServiceNSSM.png diff --git a/Scenarios/S2D and Grafana/Screenshots/LDAPtoml.png b/Scenarios/AzSHCI and Grafana/Screenshots/LDAPtoml.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/LDAPtoml.png rename to Scenarios/AzSHCI and Grafana/Screenshots/LDAPtoml.png diff --git a/Scenarios/S2D and Grafana/Screenshots/LDP.png b/Scenarios/AzSHCI and Grafana/Screenshots/LDP.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/LDP.png rename to Scenarios/AzSHCI and Grafana/Screenshots/LDP.png diff --git a/Scenarios/S2D and Grafana/Screenshots/Scenario.png b/Scenarios/AzSHCI and Grafana/Screenshots/Scenario.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/Scenario.png rename to Scenarios/AzSHCI and Grafana/Screenshots/Scenario.png diff --git a/Scenarios/S2D and Grafana/Screenshots/VMs.png b/Scenarios/AzSHCI and Grafana/Screenshots/VMs.png similarity index 100% rename from Scenarios/S2D and Grafana/Screenshots/VMs.png rename to Scenarios/AzSHCI and Grafana/Screenshots/VMs.png diff --git a/Scenarios/S2D and Grafana/readme.md b/Scenarios/AzSHCI and Grafana/readme.md similarity index 73% rename from Scenarios/S2D and Grafana/readme.md rename to Scenarios/AzSHCI and Grafana/readme.md index 0e77abeb..2bd05b22 100644 --- a/Scenarios/S2D and Grafana/readme.md +++ b/Scenarios/AzSHCI and Grafana/readme.md @@ -1,6 +1,6 @@ -- [S2D and Grafana](#s2d-and-grafana) +- [AzSHCI and Grafana](#azshci-and-grafana) - [About the lab](#about-the-lab) - [LabConfig](#labconfig) - [The lab](#the-lab) @@ -26,7 +26,7 @@ -# S2D and Grafana +# AzSHCI and Grafana ## About the lab @@ -44,7 +44,7 @@ Further improvements welcomed - feel free to pull request! ## LabConfig -![](/Scenarios/S2D%20and%20Grafana/Screenshots/VMs.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/VMs.png) ```PowerShell $LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!';<# Prefix = 'WSLab-';#> SwitchName = 'LabSwitch'; DCEdition='4'; Internet=$true ; AdditionalNetworksConfig=@(); VMs=@()} @@ -65,9 +65,9 @@ $LabConfig.VMs += @{ VMName = 'InfluxDB' ; Configuration = 's2d' ; ParentVHD = ' ## The lab -Follow the code in [Scenario.ps1](/Scenarios/S2D%20and%20Grafana/Scenario.ps1). Run all code from DC (or Management machine). +Follow the code in [Scenario.ps1](/Scenarios/AzSHCI%20and%20Grafana/Scenario.ps1). Run all code from DC (or Management machine). -![](/Scenarios/S2D%20and%20Grafana/Screenshots/Scenario.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/Scenario.png) ### Region Variables @@ -77,11 +77,7 @@ Here you can decide where you want to host Grafana and InfluxDB. Servers can be It worth checking if the links are the latest one (since I did not find a way to just download latest packages). So links may download some older version. NSSM does not change much (the latest version is more than 2 years old) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/DownloadedFiles.png) - -### Region Download and Install Edge Dev - -Edge dev is installed to have HTML5 enabled browser to work with Grafana from Windows Server. +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/DownloadedFiles.png) ### Region Install Management Tools @@ -99,19 +95,19 @@ Second certificate is for Grafana and it is exportable - since it's needed later Both certs are RSA. Same functions are used as in [Certification Authority scenario](/Scenarios/Certification%20Authority)) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/CATemplates01.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/CATemplates01.png) ### Region distribute certificates to Domain Controller and Grafana Firt of all ACLs are set on templates to be able to autoenroll from DC and Grafana server -![](/Scenarios/S2D%20and%20Grafana/Screenshots/CATemplates02.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/CATemplates02.png) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/CATemplates03.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/CATemplates03.png) Then Autoenrollment policy is configured and certutil pulse is ran to refresh certs. -![](/Scenarios/S2D%20and%20Grafana/Screenshots/AutoEnrolledCerts.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/AutoEnrolledCerts.png) ### Region Reload AD SSL Certificate @@ -119,7 +115,7 @@ This piece of code just makes sure LDAPs is running on port 636 and is using cer You can use LDP.exe to validate. On my computer it asked for pin when succeeded. -![](/Scenarios/S2D%20and%20Grafana/Screenshots/LDP.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/LDP.png) ### Region Copy NSSM, InfluxDB and Grafana to servers @@ -129,7 +125,7 @@ NSSM is also copied into system32 folder to be able to run it anytime, anywhere. First we will download install files to downloads folder. You can run all code from DC or from Management machine. -![](/Scenarios/S2D%20and%20Grafana/Screenshots/FoldersInProgramFiles.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/FoldersInProgramFiles.png) ### Region Configure InfluxDB to exist in different folder @@ -139,29 +135,29 @@ It will be moved into location specified in variables (by default e:\InfluxDB\ ) InfluxD service is then started with parameter that points it to config. -![](/Scenarios/S2D%20and%20Grafana/Screenshots/InfluxDBFolders.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/InfluxDBFolders.png) ### Region Configure Grafana and Influx DB Services Services are configured to start using NSSM. Influx DB has parameter of the config. Notice that after starting InfluxDB, files containing database are created. -![](/Scenarios/S2D%20and%20Grafana/Screenshots/InfluxDBService.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/InfluxDBService.png) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/InfluxDBServiceNSSM.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/InfluxDBServiceNSSM.png) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/GrafanaService.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/GrafanaService.png) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/GrafanaServiceNSSM.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/GrafanaServiceNSSM.png) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/InfluxDBFiles.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/InfluxDBFiles.png) ### Region Secure communication with IPSec This code will add default connection security rule to computers specified in $IPSecServers. It is necessary to understand kerberos traffic to create this default rule. You will find it under connection security rules in wf.msc -![](/Scenarios/S2D%20and%20Grafana/Screenshots/ConnectionSecurityRule.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/ConnectionSecurityRule.png) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/FWRuleInfluxDB.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/FWRuleInfluxDB.png) ```PowerShell #to be able to remotely query firewall rules with wf.msc @@ -173,14 +169,14 @@ Enable-NetFirewallRule -CimSession Grafana,Influxdb -Name RemoteFwAdmin* Computers in $InfluxDBAuthorizedServers variable are added to FW rule. -![](/Scenarios/S2D%20and%20Grafana/Screenshots/FWRuleInfluxDBAuthorizedComputers.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/FWRuleInfluxDBAuthorizedComputers.png) ### Region Configure LDAP for Grafana Account specified in variables is created together with group GrafanaAdmins and added to C:\Program Files\Grafana\conf\ldap.toml. -![](/Scenarios/S2D%20and%20Grafana/Screenshots/LDAPtoml.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/LDAPtoml.png) ### Region Secure LDAP to use SSL and Configure Grafana Certificate @@ -204,66 +200,66 @@ Get-NetIPsecQuickModeSA | select *endpoint*,*first*,*second* |ft ``` -![](/Scenarios/S2D%20and%20Grafana/Screenshots/EncryptedTrafficPosh.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/EncryptedTrafficPosh.png) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/EncryptedTrafficWFmsc.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/EncryptedTrafficWFmsc.png) You can log in with LabAdmin\LS1setup! as LDAP authorization is enabled -![](/Scenarios/S2D%20and%20Grafana/Screenshots/GrafanaWeb.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/GrafanaWeb.png) You might want to cleanup default admin (Settings->Users) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/GrafanaUsers.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/GrafanaUsers.png) Add Datasource -![](/Scenarios/S2D%20and%20Grafana/Screenshots/GrafanaAddDatasource01.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/GrafanaAddDatasource01.png) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/GrafanaAddDatasource02.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/GrafanaAddDatasource02.png) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/GrafanaAddDatasource03.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/GrafanaAddDatasource03.png) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/GrafanaAddDatasource04.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/GrafanaAddDatasource04.png) -After that just import JSON by pasting query from dashboards [here](/Scenarios/S2D%20and%20Grafana/Dashboards) +After that just import JSON by pasting query from dashboards [here](/Scenarios/AzSHCI%20and%20Grafana/Dashboards) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/GrafanaImportDashboard01.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/GrafanaImportDashboard01.png) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/GrafanaImportDashboard02.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/GrafanaImportDashboard02.png) As you can see, virtualized system is not performing much. But for validating counters in Grafana it's more than enough. ## Dashboard examples -[AzSHCI-Cache](/Scenarios/S2D%20and%20Grafana/Dashboards/AzSHCI-Cache.json) +[AzSHCI-Cache](/Scenarios/AzSHCI%20and%20Grafana/Dashboards/AzSHCI-Cache.json) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/Dash-AzSHCI-Cache.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/Dash-AzSHCI-Cache.png) -[AzSHCI-Host Health Dashboard](/Scenarios/S2D%20and%20Grafana/Dashboards/AzSHCI-Host_Health_Dashboard.json) +[AzSHCI-Host Health Dashboard](/Scenarios/AzSHCI%20and%20Grafana/Dashboards/AzSHCI-Host_Health_Dashboard.json) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/Dash-AzSHCI-Host_Health_Dashboard.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/Dash-AzSHCI-Host_Health_Dashboard.png) -[AzSHCI-Hyper-V Metrics](/Scenarios/S2D%20and%20Grafana/Dashboards/AzSHCI-Hyper-V_Metrics.json) +[AzSHCI-Hyper-V Metrics](/Scenarios/AzSHCI%20and%20Grafana/Dashboards/AzSHCI-Hyper-V_Metrics.json) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/Dash-AzSHCI-Hyper-V_Metrics.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/Dash-AzSHCI-Hyper-V_Metrics.png) -[AzSHCI-Network Dashboard](/Scenarios/S2D%20and%20Grafana/Dashboards/AzSHCI-Network_Dashboard.json) +[AzSHCI-Network Dashboard](/Scenarios/AzSHCI%20and%20Grafana/Dashboards/AzSHCI-Network_Dashboard.json) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/Dash-AzSHCI-Network_Dashboard.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/Dash-AzSHCI-Network_Dashboard.png) -[AzSHCI-Overview](/Scenarios/S2D%20and%20Grafana/Dashboards/AzSHCI-Overview.json) +[AzSHCI-Overview](/Scenarios/AzSHCI%20and%20Grafana/Dashboards/AzSHCI-Overview.json) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/Dash-AzSHCI-Overview.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/Dash-AzSHCI-Overview.png) -[AzSHCI-Storage Dashboard](/Scenarios/S2D%20and%20Grafana/Dashboards/AzSHCI-Storage_Dashboard.json) +[AzSHCI-Storage Dashboard](/Scenarios/AzSHCI%20and%20Grafana/Dashboards/AzSHCI-Storage_Dashboard.json) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/Dash-AzSHCI-Storage_Dashboard.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/Dash-AzSHCI-Storage_Dashboard.png) -[AzSHCI-Storage Dashboard Small](/Scenarios/S2D%20and%20Grafana/Dashboards/AzSHCI-Storage_Dashboard_Small.json) +[AzSHCI-Storage Dashboard Small](/Scenarios/AzSHCI%20and%20Grafana/Dashboards/AzSHCI-Storage_Dashboard_Small.json) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/Dash-AzSHCI-Storage_Dashboard_Small.png) +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/Dash-AzSHCI-Storage_Dashboard_Small.png) -[AzSHCI-VMFleet](/Scenarios/S2D%20and%20Grafana/Dashboards/AzSHCI-VMFleet.json) +[AzSHCI-VMFleet](/Scenarios/AzSHCI%20and%20Grafana/Dashboards/AzSHCI-VMFleet.json) -![](/Scenarios/S2D%20and%20Grafana/Screenshots/Dash-AzSHCI-VMFleet.png) \ No newline at end of file +![](/Scenarios/AzSHCI%20and%20Grafana/Screenshots/Dash-AzSHCI-VMFleet.png) \ No newline at end of file diff --git a/Scenarios/S2D and Grafana/telegraf.conf b/Scenarios/AzSHCI and Grafana/telegraf.conf similarity index 99% rename from Scenarios/S2D and Grafana/telegraf.conf rename to Scenarios/AzSHCI and Grafana/telegraf.conf index e32d8cdb..2c60cc42 100644 --- a/Scenarios/S2D and Grafana/telegraf.conf +++ b/Scenarios/AzSHCI and Grafana/telegraf.conf @@ -395,7 +395,7 @@ [[inputs.win_perf_counters.object]] ObjectName = "RDMA Activity" - Instances = ["*"] + Instances = [PlaceRDMAAdaptersHere] Counters = [ "RDMA Accepted Connections", "RDMA Active Connections", diff --git a/Scenarios/S2D and Grafana/telegraf.ps1 b/Scenarios/AzSHCI and Grafana/telegraf.ps1 similarity index 100% rename from Scenarios/S2D and Grafana/telegraf.ps1 rename to Scenarios/AzSHCI and Grafana/telegraf.ps1 diff --git a/Scenarios/S2D and Grafana/todelete/dashboard_s2d_old.json b/Scenarios/AzSHCI and Grafana/todelete/dashboard_s2d_old.json similarity index 100% rename from Scenarios/S2D and Grafana/todelete/dashboard_s2d_old.json rename to Scenarios/AzSHCI and Grafana/todelete/dashboard_s2d_old.json diff --git a/Scenarios/S2D and Grafana/todelete/telegraf_old.conf b/Scenarios/AzSHCI and Grafana/todelete/telegraf_old.conf similarity index 100% rename from Scenarios/S2D and Grafana/todelete/telegraf_old.conf rename to Scenarios/AzSHCI and Grafana/todelete/telegraf_old.conf diff --git a/Scenarios/S2D and Grafana/todelete/telegraf_old.ps1 b/Scenarios/AzSHCI and Grafana/todelete/telegraf_old.ps1 similarity index 100% rename from Scenarios/S2D and Grafana/todelete/telegraf_old.ps1 rename to Scenarios/AzSHCI and Grafana/todelete/telegraf_old.ps1 diff --git a/Scenarios/S2D and Grafana/todelete/telegraf_old2.conf b/Scenarios/AzSHCI and Grafana/todelete/telegraf_old2.conf similarity index 100% rename from Scenarios/S2D and Grafana/todelete/telegraf_old2.conf rename to Scenarios/AzSHCI and Grafana/todelete/telegraf_old2.conf diff --git a/Scenarios/S2D and Grafana/Labconfig.ps1 b/Scenarios/S2D and Grafana/Labconfig.ps1 deleted file mode 100644 index 7d341639..00000000 --- a/Scenarios/S2D and Grafana/Labconfig.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -$LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!';<# Prefix = 'WSLab-';#> SwitchName = 'LabSwitch'; DCEdition='4'; Internet=$true ; AdditionalNetworksConfig=@(); VMs=@()} - -1..4 | ForEach-Object {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 4GB ; NestedVirt=$true}} - -#or without nested virt and just 512MB of memory -#1..4 | ForEach-Object {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 512MB}} - -$LabConfig.VMs += @{ VMName = 'CA' ; ParentVHD = 'Win2019Core_G2.vhdx'} -$LabConfig.VMs += @{ VMName = 'Grafana' ; ParentVHD = 'Win2019Core_G2.vhdx'; MemoryStartupBytes= 1GB } -$LabConfig.VMs += @{ VMName = 'InfluxDB' ; Configuration = 's2d' ; ParentVHD = 'Win2019Core_G2.vhdx'; SSDNumber = 1; SSDSize=1GB ; HDDNumber = 0; HDDSize= 4TB ; MemoryStartupBytes= 1GB } - -#Optional management machine -#$LabConfig.VMs += @{ VMName = 'Management' ; ParentVHD = 'Win1019H1_G2.vhdx' ; AddToolsVHD=$True ; DisableWCF=$True } - \ No newline at end of file From 70189ce674067a02d12c126d8c463603694242e1 Mon Sep 17 00:00:00 2001 From: JaromirK Date: Tue, 17 Oct 2023 00:05:25 +0200 Subject: [PATCH 2/2] counter fix --- .../Dashboards/AzSHCI-Hyper-V_Metrics.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Hyper-V_Metrics.json b/Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Hyper-V_Metrics.json index dd4f3170..0528dc31 100644 --- a/Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Hyper-V_Metrics.json +++ b/Scenarios/AzSHCI and Grafana/Dashboards/AzSHCI-Hyper-V_Metrics.json @@ -1557,7 +1557,7 @@ } ], "hide": false, - "measurement": "RDMA_Activity", + "measurement": "rdma_activity", "orderByTime": "ASC", "policy": "default", "query": "SELECT mean(\"Bytes_Received_persec\") FROM \"hyperv_vmnet\" WHERE \"host\" =~ /^$hostname$/ AND \"instance\" =~ /_Network Adapter_/ AND \"instance\" =~ /^$vm_nic$/ AND $timeFilter GROUP BY time($__interval), \"instance\" fill(none)", @@ -1616,7 +1616,7 @@ } ], "hide": false, - "measurement": "RDMA_Activity", + "measurement": "rdma_activity", "orderByTime": "ASC", "policy": "default", "query": "SELECT mean(\"Bytes_Sent_persec\") FROM \"hyperv_vmnet\" WHERE \"host\" =~ /^$hostname$/ AND \"instance\" =~ /_Network Adapter_/ AND \"instance\" =~ /^$vm_nic$/ AND $timeFilter GROUP BY time($__interval), \"instance\" fill(none)", @@ -1754,7 +1754,7 @@ "type": "fill" } ], - "measurement": "RDMA_Activity", + "measurement": "rdma_activity", "orderByTime": "ASC", "policy": "default", "refId": "A", @@ -1803,7 +1803,7 @@ "type": "fill" } ], - "measurement": "RDMA_Activity", + "measurement": "rdma_activity", "orderByTime": "ASC", "policy": "default", "refId": "B",