Ad Widget

Collapse

Confusion in regards to the IP Address or Interface while adding Zabbix Host

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kasif.ali
    Junior Member
    • Jul 2022
    • 2

    #1

    Confusion in regards to the IP Address or Interface while adding Zabbix Host

    Hey Guys,

    I just started using Zabbix. I'm a noob so apologies for the basic question.

    Let's get to the question - I did spin-off an AWS instance of Zabbix to monitor my existing infrastructure. Zabbix Server configuration went all good, all the configs went like a breeze. Facing challenges while adding the Hosts through Agents, below are a couple of questions;
    • https://linoxide.com/install-zabbix-...-ubuntu-20-04/ - I used this article to complete the Zabbix agent installation on my Ubuntu Servers. This article helps to enable passive checks instead of active checks (Don't know the difference between Active and Passive checks) - So, while editing the configuration file I did enter the server IP of my aws Zabbix instance and the hostname is the local client machine's name or the name of Zabbix Server?
    • When we add the host to the Zabbix server, what should be the IP address? Should it be the WAN IP of my ISP or the local IP of the server? Or else should I add a firewall policy for opening the port 10050 for each of my server instances within my infra with the local server IP?
    • Would creating a Zabbix Server Proxy make this easier and a better experience?
    Thanks
    - Kasi
  • vladimir_lv
    Senior Member
    • May 2022
    • 240

    #2
    Hi!
    In my opinion best practice is to use official documentation:
    https://www.zabbix.com/download?zabb...debian&os_vers ion=11_bullseye&db=mysql&ws=apache
    • In a passive check the agent responds to a data request. Zabbix server (or proxy) asks for data, for example, CPU load, and Zabbix agent sends back the result.
      Active checks require more complex processing. The agent must first retrieve a list of items from Zabbix server for independent processing. Then it will periodically send new values to the server.
      https://www.zabbix.com/documentation...concepts/agent
    • open zabbix_agentd.conf (there are all answers for your questions):
      Hostname - Required for active checks and must match hostnames as configured on the server
      Server = YOUR_ZABBIX_SERVER
      ServerActive = YOUR_ZABBIX_SERVER
    • Code:
      ### Option: Hostname
      	# List of comma delimited unique, case sensitive hostnames.
      	# [B]Required for active checks and must match hostnames as configured on the server.[/B]
      	# Value is acquired from HostnameItem if undefined.
      	#
      	# Mandatory: no
      	# Default:
      	# Hostname=
      	
      	Hostname=YOURHOSTNAME
      	
      	
      	
      	### Option: Server
      	# List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and Zabbix proxies.
      	# 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 and '::/0' will allow any IPv4 or IPv6 address.
      	# '0.0.0.0/0' can be used to allow any IPv4 address.
      	# Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.domain
      	#
      	# Mandatory: yes, if StartAgents is not explicitly set to 0
      	# Default:
      	Server= YOUR_ZABBIX_SERVER
      	
      	##### Active checks related
      	
      	### Option: ServerActive
      	# List of comma delimited IP addresses or DNS names (address:port) pairs or clusters (address:port;address2:port) of Zabbix servers and Zabbix proxies for active checks.
      	# If port is not specified, default port is used.
      	# Cluster nodes need be separated by semicolon.
      	# 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 for multiple servers:
      	# ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
      	# Example for HA:
      	# ServerActive=zabbix.cluster.node1;zabbix.cluster.n ode2:20051;zabbix.cluster.node3
      	# Example for HA with two clusters and one server:
      	# ServerActive=zabbix.cluster.node1;zabbix.cluster.n ode2:20051,zabbix.cluster2.node1;zabbix.cluster2.n ode2,zabbix.domain
      	#
      	# Mandatory: no
      	# Default:
      	ServerActive=YOUR_ZABBIX_SERVER
    • Should it be the WAN IP of my ISP or the local IP of the server?

It depends from your network scheme.
  • A Zabbix proxy is the ideal solution for centralized monitoring of remote locations, branches and networks with no local administrators.

Comment

    Working...