Zabbix Documentation 2.4

3.04.04.45.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


manual:appendix:install:windows_agent

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:appendix:install:windows_agent [2014/08/20 08:36]
andris [Installing the agent as a Windows service] - changed section level
manual:appendix:install:windows_agent [2014/09/26 11:26] (current)
sasha Links adapted because of a move operation
Line 1: Line 1:
 ==== 2 Zabbix agent on Microsoft Windows ==== ==== 2 Zabbix agent on Microsoft Windows ====
  
-=== Configuring ​the agent ===+=== Configuring agent ===
  
 Zabbix agent runs as a Windows service. Zabbix agent runs as a Windows service.
  
-You can run a single instance of Zabbix agent or multiple instances of the agent on a Microsoft Windows host. A single instance can use the default configuration file ''​C:​\zabbix_agentd.conf''​ or a configuration file specified in the command line. In case of multiple instances each agent instance must have its own configuration file (one of instances can use the default configuration file).+You can run a single instance of Zabbix agent or multiple instances of the agent on a Microsoft Windows host. A single instance can use the default configuration file ''​C:​\zabbix_agentd.conf''​ or a configuration file specified in the command line. In case of multiple instances each agent instance must have its own configuration file (one of the instances can use the default configuration file).
  
 An example configuration file is available in Zabbix source archive as ''​conf/​zabbix_agentd.win.conf''​. An example configuration file is available in Zabbix source archive as ''​conf/​zabbix_agentd.win.conf''​.
 +
 +See the [[manual:​appendix:​config:​zabbix_agentd_win|configuration file]] options for details on configuring Zabbix Windows agent.
  
 == Hostname parameter == == Hostname parameter ==
  
-To perform [[:2.4/manual/appendix/items/activepassive#​active_checks|active checks]] on a host Zabbix agent needs to have the hostname defined. Moreover, the hostname value set on the agent side should exactly match the "[[:2.4/manual/config/hosts/host|Host name]]"​ configured for the host in the frontend.+To perform [[manual:appendix:items:activepassive#​active_checks|active checks]] on a host Zabbix agent needs to have the hostname defined. Moreover, the hostname value set on the agent side should exactly match the "​[[manual:config:hosts:host|Host name]]"​ configured for the host in the frontend.
  
-The hostname value on the agent side can be defined by either the **Hostname** or **HostnameItem** parameter in the agent [[:2.4/manual/appendix/config/zabbix_agentd_win|configuration file]] - or the default values are used if any of these parameters are not specified.+The hostname value on the agent side can be defined by either the **Hostname** or **HostnameItem** parameter in the agent [[manual:appendix:config:zabbix_agentd_win|configuration file]] - or the default values are used if any of these parameters are not specified.
  
 The default value for **HostnameItem** parameter is the value returned by the "​system.hostname"​ agent key and for Windows platform it returns the NetBIOS host name. The default value for **HostnameItem** parameter is the value returned by the "​system.hostname"​ agent key and for Windows platform it returns the NetBIOS host name.
  
-The default value for **Hostname** is the value returned by the **HostnameItem** parameter. So, in effect, if both these parameters are unspecified the actual hostname will be the host NetBIOS name.+The default value for **Hostname** is the value returned by the **HostnameItem** parameter. So, in effect, if both these parameters are unspecified the actual hostname will be the host NetBIOS name; Zabbix agent will use NetBIOS host name to retrieve the list of active checks from Zabbix server and send results to it.
  
 <note important>​The **system.hostname** key always returns the NetBIOS host name which is limited to 15 symbols and in UPPERCASE only - regardless of the length and lowercase/​uppercase characters in the real host name.</​note>​ <note important>​The **system.hostname** key always returns the NetBIOS host name which is limited to 15 symbols and in UPPERCASE only - regardless of the length and lowercase/​uppercase characters in the real host name.</​note>​
- 
-So if both parameters are unspecified then the Zabbix agent will use NetBIOS host name to retrieve the list of active checks from the Zabbix server and to send results to it. 
  
 Starting from Zabbix agent 1.8.6 version for Windows the "​system.hostname"​ key supports an optional parameter - //type// of the name. The default value of this parameter is "​netbios"​ (for backward compatibility) and the other possible value is "​host"​. ​ Starting from Zabbix agent 1.8.6 version for Windows the "​system.hostname"​ key supports an optional parameter - //type// of the name. The default value of this parameter is "​netbios"​ (for backward compatibility) and the other possible value is "​host"​. ​
Line 29: Line 29:
 So, to simplify the configuration of zabbix_agentd.conf file and make it unified, two different approaches could be used. So, to simplify the configuration of zabbix_agentd.conf file and make it unified, two different approaches could be used.
   - leave **Hostname** or **HostnameItem** parameters undefined and Zabbix agent will use NetBIOS host name as the hostname;   - leave **Hostname** or **HostnameItem** parameters undefined and Zabbix agent will use NetBIOS host name as the hostname;
-  - leave **Hostname** parameter undefined and define **HostnameItem** like this:\\ **HostnameItem=system.hostname[host]**\\ and the Zabbix agent will use the full, real (case sensitive) Windows host name as the hostname.+  - leave **Hostname** parameter undefined and define **HostnameItem** like this:\\ **HostnameItem=system.hostname[host]**\\ and Zabbix agent will use the full, real (case sensitive) Windows host name as the hostname.
  
-Host name is also used as part of Windows service name which is used for installing, starting, stopping and uninstalling the Windows service. For example, if Zabbix agent configuration file specifies ''​Hostname=Windows_db_server'',​ then the agent will be installed as a Windows service "''​Zabbix Agent [Windows_db_server]''"​. Therefore, to have a different Windows service name for each Zabbix agent instance, each instance must use a different host name. +Host name is also used as part of Windows service name which is used for installing, starting, stopping and uninstalling the Windows service. For example, if Zabbix agent configuration file specifies ''​Hostname=Windows_db_server'',​ then the agent will be installed as a Windows service "''​Zabbix Agent [Windows_db_server]''"​. Therefore, to have a different Windows service name for each Zabbix agent instance, each instance must use a different host name. 
-=== Installing ​the agent as Windows service ===+ 
 +=== Installing agent as Windows service ===
  
 To install a single instance of Zabbix agent with the default configuration file ''​c:​\zabbix_agentd.conf'':​ To install a single instance of Zabbix agent with the default configuration file ''​c:​\zabbix_agentd.conf'':​
Line 46: Line 47:
 A full path to the configuration file should be specified. A full path to the configuration file should be specified.
  
-Multiple instances of Zabbix agent can be installed as services like+Multiple instances of Zabbix agent can be installed as services like this:
  
     zabbix_agentd.exe --config <​configuration_file_for_instance_1>​ --install --multiple-agents     zabbix_agentd.exe --config <​configuration_file_for_instance_1>​ --install --multiple-agents
Line 53: Line 54:
     zabbix_agentd.exe --config <​configuration_file_for_instance_N>​ --install --multiple-agents     zabbix_agentd.exe --config <​configuration_file_for_instance_N>​ --install --multiple-agents
  
-The installed service ​now should be visible in Control Panel. +The installed service should ​now be visible in Control Panel.
-== Starting the agent ==+
  
-You can use Control Panel to start the agent service or do it from command line.+=== Starting agent === 
 + 
 +To start the agent service, you can use Control Panel or do it from command line.
  
 To start a single instance of Zabbix agent with the default configuration file: To start a single instance of Zabbix agent with the default configuration file:
    ​zabbix_agentd.exe --start    ​zabbix_agentd.exe --start
  
-To start a single ​agent instance with other configuration file:+To start a single instance ​of Zabbix agent with another ​configuration file:
    ​zabbix_agentd.exe --config <​your_configuration_file>​ --start    ​zabbix_agentd.exe --config <​your_configuration_file>​ --start
  
Line 67: Line 69:
    ​zabbix_agentd.exe --config <​configuration_file_for_this_instance>​ --start --multiple-agents    ​zabbix_agentd.exe --config <​configuration_file_for_this_instance>​ --start --multiple-agents
  
-== Stopping ​the agent ==+=== Stopping agent ===
  
-You can use Control Panel to stop the agent service or do it from command line.+To stop the agent service, you can use Control Panel or do it from command line.
  
 To stop a single instance of Zabbix agent started with the default configuration file: To stop a single instance of Zabbix agent started with the default configuration file:
    ​zabbix_agentd.exe --stop    ​zabbix_agentd.exe --stop
  
-To stop a single ​agent instance started with other configuration file:+To stop a single instance ​of Zabbix agent started with another ​configuration file:
    ​zabbix_agentd.exe --config <​your_configuration_file>​ --stop    ​zabbix_agentd.exe --config <​your_configuration_file>​ --stop
  
Line 80: Line 82:
    ​zabbix_agentd.exe --config <​configuration_file_for_this_instance>​ --stop --multiple-agents    ​zabbix_agentd.exe --config <​configuration_file_for_this_instance>​ --stop --multiple-agents
  
 +=== Uninstalling agent Windows service ===
  
-=== Uninstalling the agent Windows service === +To uninstall a single ​instance of Zabbix ​agent using the default configuration file:
- +
-To uninstall a single agent instance which uses the default configuration file:+
  
      ​zabbix_agentd.exe --uninstall      ​zabbix_agentd.exe --uninstall
  
-To uninstall a single ​agent instance using non-default configuration file:+To uninstall a single instance ​of Zabbix agent using non-default configuration file:
  
      ​zabbix_agentd.exe --config <​your_configuration_file>​ --uninstall      ​zabbix_agentd.exe --config <​your_configuration_file>​ --uninstall
  
-Multiple ​instances of Zabbix agent can be uninstalled ​from Windows services ​like+To uninstall multiple ​instances of Zabbix agent from Windows services:
  
     zabbix_agentd.exe --config <​configuration_file_for_instance_1>​ --uninstall --multiple-agents     zabbix_agentd.exe --config <​configuration_file_for_instance_1>​ --uninstall --multiple-agents