При работе на ноутбуке с подключенным внешним монитором или на ПК с несколькими мониторами, часто возникает ситуация при которой мониторы используются неоптимально, в связи с чем возникает “мыльная” или “зернистая” картинка, нечеткое изображение и прочие артефакты.
Данная ситуация вызвана тем что внешний монитор работает по умолчанию в режиме Повторения основного экрана, подстаиваясь при этом под настройки основного, и если основной экран меньше внешний монитор работает не оптимально.
Корректная работа нескольких мониторов
Самый простой способ исправить проблему перевести режим отображения на “только второй экран” используя сочетание клавишь WIN+P и выбрав соотвествующий пункт в появившемся меню.
В режиме “Только второй экран” основной экран ноутбука отключается, а внешний монитор переключается в оптимальные настройки.
Кроме того существует третий вариант: “Расширить” В этом режиме оба монитора работают в оптимальном режиме, и каждый экран имеет свой независимый рабочий стол на котором можно разместить любые дополнительные окна.
Прошу обратить отдельное внимание, если вы вносите изменения в режим работы мониторов на вашем ПК, изменения на сервере терминалов не всегда могут вступить в силу в текущей сессии, чтобы изменения применились и в окне сервера терминалов,необходимо выполнить завершение сеанса через ярлык на удаленном рабочем столе и зайти заново.
Законспектирую еще один момент — как выполняется настройка мониторинга Microsoft SQL в Zabbix. Я буду использовать вот этот шаблон, который доступен уже «из коробки».
Описание окружения
Версия сервера Zabbix — Zabbix 6.4.8.
Версия MS SQL сервера — SQL Server 2019 CU 23 (15.0.4335.1).
Имя экземпляра SQL — MSSQLSERVER (экземпляр по умолчанию).
Прослушиваемый TCP-порт — 1433.
Настройка мониторинга Microsoft SQL в Zabbix
Выполним настройку:
1. Сначала я создам отдельного SQL пользователя, от имени которого Zabbix будет подключаться к SQL серверу.
2. Также я включу проверку подлинности Windows и SQL в свойствах SQL сервера.
3. После изменения параметров аутентификации потребуется перезапуск сервиса SQL.
4. Назначьте необходимые разрешения для пользователя:
USE msdb;
CREATE USER zabbix FOR LOGIN zabbix;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobs TO zabbix;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobservers TO zabbix;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobactivity TO zabbix;
GRANT EXECUTE ON OBJECT::msdb.dbo.agent_datetime TO zabbix;
USE master;
GRANT VIEW SERVER STATE TO zabbix;
GRANT VIEW ANY DEFINITION to zabbix;
5. Установить ODBC драйвер. На моем сервере Zabbix установлена ОС Ubunt Server 22.04. Соответственно в моем случае команда по установке ODBC драйвера следующая:
if ! [[ "18.04 20.04 22.04 23.04" == *"$(lsb_release -rs)"* ]];
then
echo "Ubuntu $(lsb_release -rs) is not currently supported.";
exit;
fi
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools18
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc
source ~/.bashrc
# optional: for unixODBC development headers
sudo apt-get install -y unixodbc-dev
6. Также нужно настроить ODBC подключение.
nano /etc/odbc.ini
Я добавлю следующие параметры подключения:
[SPS01]
Driver = ODBC Driver 18 for SQL Server
Server = 10.10.10.79
Port = 1433
TrustServerCertificate = yes
SPS01 — это имя подключения, которое необходимо будет указать в макросах при настройке шаблона. Можете указать любое. Server — IP-адрес сервера SQL. При необходимости скорректируйте порт для подключения.
7. Теперь соберем весь пазл воедино — добавим хост с MS SQL в Zabbix, привяжем шаблон и скорректируем макросы. Сначала я добавлю хост в мониторинг и привяжу шаблон «MSSQL by ODBC».
8. Затем я скорректирую следующие макросы:
{$MSSQL.DSN}
{$MSSQL.PASSWORD}
{$MSSQL.USER}
9. Сохраните внесенные изменения.
Проверка
Проще всего перейти в раздел с отображением последних полученных данных и выполнить проверку.
Пример успешного сбора данных с сервера MS SQL:
Настройка мониторинга Microsoft SQL в Zabbix завершена.
Если что-то пошло не так
Не всегда решение получается настроить так быстро, как хотелось бы. Такое бывает.
Первое, что я бы проверим — это доступность порта SQL сервера со стороны Zabbix сервера.
nc -zv 10.10.10.79 1433
Пример успешного подключения:
Connection to 10.10.10.79 1433 port [tcp/ms-sql-s] succeeded!
Также можно выполнить проверку подключения через ODBC драйвер напрямую:
isql -v SPS01 zabbix Qwerty123
Пример неудачного подключения:
[28000][unixODBC][Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Login failed for user 'zabbix'.
[ISQL]ERROR: Could not SQLConnect
The Catalyst 9800-CL Cloud Wireless Controller installation on Microsoft Hyper-V requires the manual creation of a VM and installation, using the .iso file.
The following Microsoft Hyper-V features are supported:
Snapshot
Export
Hyper-V Replica
For more information about Microsoft Hyper-V, see the Microsoft documentation.
Note
While running Microsoft Hyper-V VM, you may get the following traceback log continuously in the console: "PLATFORM_INFRA-5-IOS_INTR_OVER_LIMIT_HIGH_STIME: IOS thread blocked due to SYSTEM LEVEL ISSUE"To avoid this issue, perform the following steps:Configure the controller in serial mode, using the commands given below.Device# configure terminal Device(config)# platform console serial Device(config)# end Device# reloadRun the following command:PS C:\> Set-VMComPort TestVM 1 \\.\pipe\TestPipeUse Putty in administrative mode to access the console.
Installation Requirements for Microsoft Hyper-V
Before installing the controller on a Microsoft Hyper-V VM, the following must be installed on the host:
Hyper-V Manager
Failover Cluster Manager
Virtual Switch
Note
We recommended that you create the Virtual Switch prior to creating the VM.
The hardware profiles and the recommended resources are listed in the following table:
Settings
Ultra-Low
Small
Medium
Large
Minimum Number of vCPUs
2
4
6
10
Minimum Memory
6 GB
8 GB
16 GB
32 GB
Required Storage
16 GB
16 GB
16 GB
16 GB
Minimum Number of vNICs
2
2
2
2
Maximum Access Points
100
1,000
3,000
6,000
Maximum Clients Support
1,000
10,000
32,000
64,000
Creating the VM
Perform the following to create the VM:
Note
You can install the controller on Microsoft Hyper-V using Microsoft Hyper-V Manager or Microsoft System Center VMM.
Procedure
Step 1
In Hyper-V Manager, click the host.
Step 2
Choose New > Virtual Machine.
Step 3
Click Specify Name and Location.Enter the name of the VM.(Optional) Click the checkbox to store the VM in a different location.
Step 4
Click Next.
Step 5
In the Specify Generation window, specify the generation of the machine to be loaded.Note The choice of Generation 1 or Generation 2 depends on your requirements. Generation 2 supports advance features like boot from Small Computer System Interface (SCSI), secure boot, higher hardware limits, Unified Extensible Firmware Interface (UEFI) BIOS, GUID Partition Table (GPT) partitioning, and so on. If Generation 2 is selected, and the Cisco C9800 IOS image version is below 17.6, unselect the Enable Secure Boot checkbox after the deployment, as the controller does not support secure boot. However, if the Cisco C9800 IOS image version is 17.6 or higher, secure boot is supported. Therefore, when Generation 2 is selected, the Enable Secure Boot option is enabled by default.
Step 6
In the Assign Memory window, enter the Startup Memory value.The controller requires 8196 MB for the startup memory.
Step 7
Click Next.
Step 8
In the Configure Networking window, select a network connection to the virtual switch that was previously created.The network adapter selected in this step will become the first interface for the controller when the VM is launched and the router boots. The other vNICs for the VM are created in the next procedure.
Step 9
Click Next.
Step 10
In the Connect Virtual Hard Disk Screen window, select the following option:Attach a virtual hard disk later.Note The New Virtual Machine Wizard only supports creating a virtual hard disk using the .vhdx format. The controller requires that the hard disk uses the .vhd format. Create the virtual hard disk after the VM has been created.
Step 11
Click Next.The Summary screen is displayed.
Step 12
Review the VM settings and click Finish.The new VM is created.
Configuring the VM Settings
Perform the following procedure to configure the VM settings before launching the VM:
Before you begin
Before launching the instance, add the network adapters (as required), disk, and load the .iso image in to the disk drive.
We recommended that you create and use separate network interfaces for Management, Wireless Management and High Availability. In case of HA deployments, create 3 network interfaces and attach the VM to the appropriate networks. For non-HA deployments, create 2 network interfaces.
The creation of management, wireless management and HA networks should be done before launching VM. The IP addressing on these interfaces could be either static or DHCP and should be configured as part of the bootstrap configuration.
The order in which the networks are attached to the interface is important as the first network attached is used for Management, second for Wireless Management (unless configured explicitly) and third for the HA.
Procedure
Step 1
In Hyper-V Manager, select the host, and right-click the VM created earlier.
Step 2
Choose Settings.
Step 3
Specify the number of virtual processors, also known as virtual CPUs (vCPUs) for the VM.
Step 4
Under IDE Controller 0, select the Hard Drive.Click the Virtual Hard Disk check box and click New to create a new virtual hard disk.The New Virtual Hard Disk Wizard opens. Click Next.On the Choose Disk Format page, click the VHD check box to create the virtual hard disk using the .vhd format. Click Next.On the Choose Disk Type page, click Fixed Size and Next.Specify the Name and Location for the virtual hard disk. Click Next.On the Configure Disk page, click the option to create a new blank virtual hard disk. For the size, specify 16 GB.Click Next to view the Summary of the virtual hard disk settings.Click Finish to create the new virtual hard disk.When the new hard disk has been created, continue configuring the VM settings with the next step.
Step 5
Under IDE Controller1, choose DVD Drive.The DVD Drive screen is displayed.For the Media setting, check the Image File check box, and browse the .iso file downloaded from Cisco.com.
Step 6
Click Ok.
Step 7
Choose Network Adapter to verify that the network connection to the virtual switch is configured.
Step 8
Choose Com 1 to configure the serial port.This port provides access to the controller console.
Step 9
Choose Hardware > Add Hardware to add the network interfaces (vNICs) to the VM.Choose Network Adapter and click Add.Microsoft Hyper-V adds the network adapter and highlights that hardware with the status Virtual Switch “Not Connected”.Select a virtual switch in the drop-down menu to place the network adapter into it.Repeat the steps for each vNIC. The controller supports only the HV NETVSC vNIC type. The maximum number of vNICs supported is 8.Note The hot-add of vNICs is not supported with Microsoft Hyper-V, so the network interfaces need to be added before launching the VM.After the controller boots, you can verify vNICs and map them to the interfaces using the show platform software vnic-if interface-mapping command.
Step 10
Click BIOS to verify the boot sequence for the VM.The VM should be set to boot from the CD.
Launching the VM to Boot the Controller
Perform the following procedure to launch the VM:
Procedure
Step 1
Select the virtual switch.
Step 2
Select the VM and click Start.The Hyper-V Manager connects to the VM, and starts the launch process. Once the VM is launched, the controller starts the boot process
Configuring Tagged Ports
The tagged port configuration is done on the host OS. By default, the VLAN tagged packets are dropped at the host OS at the vNIC. To allow these packets through to the controller, set the specific vNIC on the controller as tagged.
Note
If you use Web UI to create network interfaces, you cannot specify interface names and all the interfaces will be named as Network Adapter. So, using these commands, all the network adapters in the controller can be converted to tagged.
These commands are to be entered in a Power Shell.
Procedure
Step 1
To see the list of adapters and assignment, use the following script:Get-VMNetworkAdapter -VMName <C9800-name>Note To rename the adapter name, use the following command:Rename-VMNetworkAdapter -VMName <C9800-name> -Name '<C9800-adapter-name>' -NewName 'Eth1'Here, Eth1 is the adapter name.
Step 2
To configure Ethernet1 (data port/management) as Trunk, with Native VLAN id as 0, use the following script:Set-VMNetworkAdapterVlan -VMName “C9800” -VMNetworkAdapterName Eth1 -Trunk -AllowedVlanIdList “1-4000” -NativeVlanId 0
Step 3
To configure Ethernet0 (serial port) as access or untagged, use the following script:Set-VMNetworkAdapterVlan -VMName “C9800” -VMNetworkAdapterName Eth0 -Untagged
Step 4
Enable MAC address spoofing to allow the trunk port to pass the tagged traffic.To enable MAC address spoofing, perform the following:Select the virtual machine and choose Actions > Settings.Expand Network Adapter and choose Advanced Features.Select Enable MAC Address spoofing.
Creating a Bootstrap Day0 Configuration
Perform the following to create a bootstrap Day 0 configuration in the Linux server:
Procedure
Step 1
Create iosxe_config.txt or ovf-env.xml file.
Step 2
Create a disk image from this file using the following command:mkisofs -l -o ./c9800_config.iso <configuration_filename>
Step 3
Mount the c9800_config.iso as an additional disk during creation of the virtual machine and power on the VM.
При попытке ручной репликации данных между контроллерами домена Active Directory в остатке Active Directory Sites and Services (dssite.msc) появилась ошибка:
The following error occurred during the attempt to synchronize naming context from Domain Controller X to Domain Controller Y.
The target principal name is incorrect.
This operation will not continue.
При проверке репликации с помощью repadmin, у одного из DC появляется ошибка:
(2148074274) The target principal name is incorrect.
В журнале событий DC есть такие ошибки:
Source: Security-Kerberos Event ID: 4
The Kerberos client received a KRB_AP_ERR_MODIFIED error from the server DC2. The target name used was cifs/DC2.winitpro.ru. This indicates that the target server failed to decrypt the ticket provided by the client. This can occur when the target server principal name (SPN) is registered on an account other than the account the target service is using. Ensure that the target SPN is only registered on the account used by the server. This error can also happen if the target service account password is different than what is configured on the Kerberos Key Distribution Center for that target service. Ensure that the service on the server and the KDC are both configured to use the same password. If the server name is not fully qualified, and the target domain (winitpro.ru) is different from the client domain (winiptro.ru), check if there are identically named server accounts in these two domains, or use the fully-qualified name to identify the server.
Event ID 3210:
Failed to authenticate with \\DC, a Windows NT domain controller for domain WINITPRO.
Event ID 5722:
The session setup from the computer 1 failed to authenticate. The name of the account referenced in the security database is 2. The following error occurred:
В первую очередь проверьте:
Доступность проблемного контроллера домена с помощью простого ICMP ping
В нашем примере PDC находится на MSK-DC02. Мы будем исопользовать это имя в команде netdom resetpwd далее.
Остановите службу Kerberos Key Distribution Center (KDC) на контроллере домена, на котором появляется ошибка “The target principal name is incorrect” и измените тип запуска на Disabled. Можно изменить настройки службы из консоли services.msc или с помощью PowerShell:
Если репликация успешно выполнена, в журнале Directory Service Event Viewerа должно появится событие Event ID 1394:
All Problems preventing updates to the Active Directory Domain Services database have been cleared. New Updates to the Active Directory Domain Services database are succeeding. The Net Logon service has restarted
Проверьте состояние вашего домена и контроллеров домена Active Directory согласно этого гайда.
To disable UAC remote restrictions, follow these steps:
Click Start, click Run, type regedit, and then press ENTER.
Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
If the LocalAccountTokenFilterPolicy registry entry doesn't exist, follow these steps:
On the Edit menu, point to New, and then select DWORD Value.
Type LocalAccountTokenFilterPolicy, and then press ENTER.
Right-click LocalAccountTokenFilterPolicy, and then select Modify.
In the Value data box, type 1, and then select OK.
Exit Registry Editor.