Zabbix agent windows не запускается

The zabbix agent won’t start after a normal start of the server on Windows 2008 R2. The issue is global of all Windows servers. The log of Zabbix agent is not written by executable (tested with debug level 5), the delayed windows service functionnality not help. When the Zabbix agent service want to start, Windows log in event log an EventID 7000 :
The Zabbix Agent service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.

and an EventID 7009 :
A timeout was reached (60000 milliseconds) while waiting for the Zabbix Agent service to connect.

But the timeout was up to 60000ms from 30000ms and the issue still here.

In addition, the service start without problem if you start it manualy

I attach my zabbix agent conf file.

Thank you for support !

Problem

A newly installed zabbix agent (4.4.x) was installed on a Windows 2016 server using an automated script. The error was showing

Windows could not start the Zabbix Agent service on Local Computer

Error 1067: The process terminated unexpectedly

zabbix_agent_fail1

Troubleshooting

i tried to run the command in the foreground 

"C:\Progra~1\Zabbix-Agent\zabbix_agentd.exe" -f --config "C:\Progra~1\Zabbix-Agent\zabbix_agentd.conf"

And it showed the culprit

zabbix_agentd.exe [6964]: cannot open log: unable to open log file [C:\Program Files\Zabbix-Agent\Log\zabbix_agentd.log]: [2] No such file or directory

zabbix_agent_fail2

Resolution

It was simply matter of ensuring the «Log» directory existed and the service started.

How to Install Zabbix Agent on Windows 2016 and avoid the: Windows error service could not be started. Error 1053: The service did not respond to the start or control request in a timely fashion.

Download – https://www.zabbix.com/download_agents

If you have the agent service installed incorrectly now, you can remove it by running “zabbix_agentd.exe –uninstall”.

cd c:\zabbix
zabbix_agentd.exe --uninstall

New Install

  1. Create directory C:\zabbix and place zabbix_agentd.exe and zabbix_agentd.win.conf files there.
  2. Edit the zabbix_agentd.win.conf file and set the values:

LogFile=C:\zabbix\zabbix_agentd.log
Server = IP address of your Zabbix server
# ListenPort = 10050 Leave it commented as is if you don’t change the defaults
ServerActive = IP of your Zabbix server
Hostname = computer that will be monitored as listed in the zabbix server hosts setup

3. Open command prompt and execute:

C:\zabbix\zabbix_agentd.exe --config C:\zabbix\zabbix_agentd.win.conf --install
zabbix_agentd.exe [5584]: service [Zabbix Agent] installed successfully
zabbix_agentd.exe [5584]: event source [Zabbix Agent] installed successfully

4. Start Windows service.

If you receive an error – Windows Agent – Error 1053 – that the service could not be started, run the uninstall above and restart the installation and make sure the files are in the correct directory and the config file changes match what you need.

Please find more info here: https://www.zabbix.com/documentation/4.0/manual/appendix/install/windows_agent

Adding a firewall rule in Windows.

Go to Windows Firewall. Add new rule. Choose port, TCP, Specific Local Ports. Add port 10050.

Опубликовано:

Используемые термины: Zabbix, Windows.

В нашем примере мы установим агент для Zabbix на Windows в качестве службы, а также сделаем минимальную настройку для отправки данных на сервер.

Загрузка агента с официального сайта
Установка агента
    Из пакета MSI
    Из архива
Настройка брандмауэра
Проверка подключения к агенту
Другие статьи про Zabbix

Загрузка агента

Переходим на страницу загрузки агента Zabbix и выбираем платформу операционной системы (x32 или x64) и версию агента, например:

Выбираем версию агента zabbix и платформу Windows

* помимо этого, мы можем выбрать вариант дистрибутива: с использованием шифрования или нет, а также файл установки — msi пакет или архив. В данном примере мы выбрали версию 5.

В зависимости от выбранных критериев поиска агента, ниже мы можем увидеть несколько вариантов для загрузки. Находим нужный и кликаем по DOWNLOAD для скачивания файла:

Скачиваем агента Zabbix по ссылке Download

Ждем окончания загрузки и переходим к установке.

Установка агента

В зависимости от загрузки типа пакета (MSI или архив) будут разные методы установки. Рассмотрим оба.

Установка из MSI-пакета

Это удобный вариант, который позволит установить агента с помощью мастера. Чтобы начать, кликаем дважды по скачанному пакету и в окне приветствия нажимаем Next:

Принимаем лицензионное соглашение, установив галочку I accept the terms in the License Agreement и нажимаем Next:

В следующем окне оставляем имя компьютера, на который устанавливается агент и вводим имя или IP-адрес сервера zabbix, после кликаем по Next:

Указываем имя компьютера и сервера Zabbix

* в данном примере имя нашего компьютера Windows PC, а сервера — zabbix-server.dmosk.local.

Выбираем компоненты, которые хотим установить — можно просто оставить все по умолчанию и нажимаем Next:

Выбираем компоненты для установки

Подтверждаем установку, кликая по Install:

Ждем завершения процесса — агент установлен.

Установка из архива

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

Распаковываем содержимое скачанного архива в каталог, где будут находиться файлы программы, например в C:\Program Files\Zabbix Agent. В итоге, у нас получится:

Открываем WordPad от администратора и в нем открываем конфигурационный файл conf/zabbix_agentd.conf и правим опцию для сервера zabbix — находим строку:

Server=127.0.0.1

… и меняем ее на:

Server=zabbix-server.dmosk.local

* где zabbix-server.dmosk.local — имя сервера Zabbix.

Теперь открываем командную строку от администратора и выполняем команду для установки агента:

«C:\Program Files\Zabbix Agent\bin\zabbix_agentd.exe» —config «C:\Program Files\Zabbix Agent\conf\zabbix_agentd.conf» —install

* где C:\Program Files\Zabbix Agent — папка, куда мы распаковали архив.

Мы должны увидеть что-то на подобие:

zabbix_agentd.exe [468]: service [Zabbix Agent] installed successfully
zabbix_agentd.exe [468]: event source [Zabbix Agent] installed successfully

Теперь открываем службы Windows и находим «Zabbix Agent» — кликаем по ней правой кнопкой мыши и выбираем Запустить:

Запуск агента Zabbix в службах Windows

Установка завершена.

Настройка брандмауэра

Если в нашей системе работает брандмауэр Windows, необходимо разрешить порт 10050 или приложение zabbix agent.

Для этого переходим в Панель управленияСистема и безопасность — Брандмауэр Windows (или вводим команду control /name Microsoft.WindowsFirewall). Кликаем по ссылке Разрешение взаимодействия с приложением или компонентов в брандмауэре Windows — добавляем наше приложение zabbix_agentd в исключение.

Это же действие можно выполнить в powershell — запускаем ее от администратора и вводим команду:

New-NetFirewallRule -DisplayName «Разрешить приложение Zabbix Agent» -Direction Inbound -Action Allow -EdgeTraversalPolicy Allow -Program «C:\Program Files\Zabbix Agent\bin\zabbix_agentd.exe»

Или мы можем добавить в исключение порт. Это можно сделать также из командной строки poweshell:

New-NetFirewallRule -DisplayName «Разрешить порт 10050 для Zabbix» -Direction Inbound -Action Allow -EdgeTraversalPolicy Allow -Protocol TCP -LocalPort 10050

Проверка работы

Чтобы убедиться в работоспособности агента, мы можем зайти на сервер zabbix и выполнить подключение по telnet, например, командой:

telnet 192.168.1.15 10050

* где 192.168.1.15 — IP-адрес компьютера с установленным Zabbix.

Мы должны увидеть 

Connected to nr-fs-06.
Escape character is ‘^]’.

.. и через небольшой интервал времени:

Connection closed by foreign host.

Но если агент не запущен или не работает, мы увидим ошибку:

telnet: connect to address …: Connection refused

В панели сервера в узлах сети при корректной установке и настройке, мы также должны увидеть доступность компьютера по агенту:

Читайте также

Другие инструкции по Zabbix:

1. Установка и настройка Zabbix-агента на CentOS

2. Установка и начальная настройка сервера мониторинга Zabbix на Ubuntu Server

3. Настройка сервера Zabbix 5 на CentOS 8

установил zabbix агента на виндусе, создал узел на забиксе, а он не появляется в виде статуса ZBX на заббиск сервере.

Лог подключения к заббиск серверу

8952:20170428:095824.824 Zabbix Agent stopped. Zabbix 3.2.0 (revision 62444).
9020:20170428:095828.486 Starting Zabbix Agent [Zabbix server]. Zabbix 3.2.0 (revision 62444).
9020:20170428:095828.487 **** Enabled features ****
9020:20170428:095828.488 IPv6 support: YES
9020:20170428:095828.488 TLS support: NO
9020:20170428:095828.489 **************************
9020:20170428:095828.490 using configuration file: c:\Zabbix\zabbix_agentd.win.conf
9020:20170428:095828.498 agent #0 started [main process]
6444:20170428:095828.499 agent #1 started [collector]
5276:20170428:095828.500 agent #2 started [listener #1]
12048:20170428:095828.501 agent #3 started [listener #2]
7188:20170428:095828.502 agent #4 started [listener #3]
6856:20170428:095828.503 agent #5 started [active checks #1]

Zabbix Config win

# This is a configuration file for Zabbix agent service (Windows)
# To get more information about Zabbix, visit http://www.zabbix.com

############ GENERAL PARAMETERS #################

### Option: LogType
#	Specifies where log messages are written to:
#		system  - Windows event log
#		file    - file specified with LogFile parameter
#		console - standard output
#
# Mandatory: no
# Default:
# LogType=file

### Option: LogFile
#	Log file name for LogType 'file' parameter.
#
# Mandatory: no
# Default:
# LogFile=

LogFile=c:\zabbix\zabbix_agentd.log

### Option: LogFileSize
#	Maximum size of log file in MB.
#	0 - disable automatic log rotation.
#
# Mandatory: no
# Range: 0-1024
# Default:
LogFileSize=50

### Option: DebugLevel
#	Specifies debug level:
#	0 - basic information about starting and stopping of Zabbix processes
#	1 - critical information
#	2 - error information
#	3 - warnings
#	4 - for debugging (produces lots of information)
#	5 - extended debugging (produces even more information)
#
# Mandatory: no
# Range: 0-5
# Default:
# DebugLevel=3

### Option: SourceIP
#	Source IP address for outgoing connections.
#
# Mandatory: no
# Default:
# SourceIP=

### Option: EnableRemoteCommands
#	Whether remote commands from Zabbix server are allowed.
#	0 - not allowed
#	1 - allowed
#
# Mandatory: no
# Default:
EnableRemoteCommands=1

### Option: LogRemoteCommands
#	Enable logging of executed shell commands as warnings.
#	0 - disabled
#	1 - enabled
#
# Mandatory: no
# Default:
LogRemoteCommands=0

##### Passive checks related

### Option: Server
#	List of comma delimited IP addresses (or hostnames) of Zabbix servers.
#	Incoming connections will be accepted only from the hosts listed here.
#	If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
#
# Mandatory: no
# Default:
# Server=

Server=10.130.50.221

### Option: ListenPort
#	Agent will listen on this port for connections from the server.
#
# Mandatory: no
# Range: 1024-32767
# Default:
ListenPort=10050

### Option: ListenIP
#       List of comma delimited IP addresses that the agent should listen on.
#       First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.
#
# Mandatory: no
# Default:
# ListenIP=0.0.0.0

### Option: StartAgents
#	Number of pre-forked instances of zabbix_agentd that process passive checks.
#	If set to 0, disables passive checks and the agent will not listen on any TCP port.
#
# Mandatory: no
# Range: 0-100
# Default:
# StartAgents=3

##### Active checks related

### Option: ServerActive
#	List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks.
#	If port is not specified, default port is used.
#	IPv6 addresses must be enclosed in square brackets if port for that host is specified.
#	If port is not specified, square brackets for IPv6 addresses are optional.
#	If this parameter is not specified, active checks are disabled.
#	Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
#
# Mandatory: no
# Default:
# ServerActive=

ServerActive=10.130.50.221

### Option: Hostname
#	Unique, case sensitive hostname.
#	Required for active checks and must match hostname as configured on the server.
#	Value is acquired from HostnameItem if undefined.
#
# Mandatory: no
# Default:
# Hostname=

Hostname=Zabbix server

### Option: HostnameItem
#	Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
#	Does not support UserParameters or aliases.
#
# Mandatory: no
# Default:
# HostnameItem=system.hostname

### Option: HostMetadata
#	Optional parameter that defines host metadata.
#	Host metadata is used at host auto-registration process.
#	An agent will issue an error and not start if the value is over limit of 255 characters.
#	If not defined, value will be acquired from HostMetadataItem.
#
# Mandatory: no
# Range: 0-255 characters
# Default:
# HostMetadata=

### Option: HostMetadataItem
#	Optional parameter that defines an item used for getting host metadata.
#	Host metadata is used at host auto-registration process.
#	During an auto-registration request an agent will log a warning message if
#	the value returned by specified item is over limit of 255 characters.
#	This option is only used when HostMetadata is not defined.
#
# Mandatory: no
# Default:
# HostMetadataItem=

### Option: RefreshActiveChecks
#	How often list of active checks is refreshed, in seconds.
#
# Mandatory: no
# Range: 60-3600
# Default:
# RefreshActiveChecks=120

### Option: BufferSend
#	Do not keep data longer than N seconds in buffer.
#
# Mandatory: no
# Range: 1-3600
# Default:
# BufferSend=5

### Option: BufferSize
#	Maximum number of values in a memory buffer. The agent will send
#	all collected data to Zabbix server or Proxy if the buffer is full.
#
# Mandatory: no
# Range: 2-65535
# Default:
# BufferSize=100

### Option: MaxLinesPerSecond
#	Maximum number of new lines the agent will send per second to Zabbix Server
#	or Proxy processing 'log', 'logrt' and 'eventlog' active checks.
#	The provided value will be overridden by the parameter 'maxlines',
#	provided in 'log', 'logrt' or 'eventlog' item keys.
#
# Mandatory: no
# Range: 1-1000
# Default:
# MaxLinesPerSecond=20

############ ADVANCED PARAMETERS #################

### Option: Alias
#	Sets an alias for an item key. It can be used to substitute long and complex item key with a smaller and simpler one.
#	Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed.
#	Different Alias keys may reference the same item key.
#	For example, to retrieve paging file usage in percents from the server:
#	Alias=pg_usage:perf_counter[\Paging File(_Total)\% Usage]
#	Now shorthand key pg_usage may be used to retrieve data.
#	Aliases can be used in HostMetadataItem but not in HostnameItem or PerfCounter parameters.
#
# Mandatory: no
# Range:
# Default:

### Option: Timeout
#	Spend no more than Timeout seconds on processing.
#
# Mandatory: no
# Range: 1-30
# Default:
# Timeout=3

### Option: PerfCounter
#	Syntax: <parameter_name>,"<perf_counter_path>",<period>
#	Defines new parameter <parameter_name> which is an average value for system performance counter <perf_counter_path> for the specified time period <period> (in seconds).
#	For example, if you wish to receive average number of processor interrupts per second for last minute, you can define new parameter "interrupts" as following:
#	PerfCounter = interrupts,"\Processor(0)\Interrupts/sec",60
#	Please note double quotes around performance counter path.
#	Samples for calculating average value will be taken every second.
#	You may run "typeperf -qx" to get list of all performance counters available in Windows.
#
# Mandatory: no
# Range:
# Default:

### Option: Include
#	You may include individual files in the configuration file.
#
# Mandatory: no
# Default:
# Include=

# Include=c:\zabbix\zabbix_agentd.userparams.conf
# Include=c:\zabbix\zabbix_agentd.conf.d\
# Include=c:\zabbix\zabbix_agentd.conf.d\*.conf


Порт прокинул на проложение в винде, порт тсп 10050

Какие средства можно использовать чтобы траблшушить такие вопросы.
1) Если ли на сервере лог, который с реал тайме пишет все ошибки, которые отбивает клиент.
2) Можно ли на сервере командой проверить состояние подключение к вин агенту.

Куда еще можно смотреть? сам заббиск стоит на hyper-v ввиде аплаенса, рута нету.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Создание домен контроллера windows server 2019
  • Ati x1300 windows 7 64 bit
  • Stsw stm32102 windows 10
  • Jon lord windows 1974
  • Windows 7 home premium x64 oem