Summary

  Subject:

Zabbix Monitoring on Rocky: Setting up Discoveries

  Updated:

2023-12-18

  Author:

Tim Hammond ([email protected])

Derek Pasnick ([email protected])

Leland Petitjean ([email protected])

  Operating Systems:

Rocky 8

  Background:

This guide was written to setup a Zabbix server to monitor network devices and servers for interuptions of service. Zabbix will be configured to also send alerts through the local mail relay. It is assumed a local mail relay is already setup and configured.

Due to the length of the content, I opted to break the article into the following sections:

  1. Rocky Zabbix: Install
  2. Rocky Zabbix: Configure
  3. Rocky Zabbix: Setting up Discoveries
  4. Rocky Zabbix: Client Agent Setup
  5. Rocky Zabbix: SNMPv3: Setup and Configure
  6. Rocky Zabbix: SNMPv3: Adding Devices
  7. Rocky Zabbix: References
 

Table of Contents

Windows Inventory Template Setup

See the "MIB and Template Import Process" section for additional Templates that will be installed later that are only required for SNMP discovery jobs.

  1. Download the wininventory.xml file from: https://github.com/SpookOz/zabbix-wininventory.
  2. Log into Zabbix web interface.
  3. Navigate to: Configuration > Templates.
  4. Click the Import button on the top right.
  5. Click the browse button and select the wininventory.xml.
  6. No check boxes need to be changed.
  7. Click the "Import" button.

Auto Discovery

Template Mod - Enable Passive Ping

See the "Understanding Active vs Passive Zabbix Agent mode" section for background.

  1. Log into Zabbix web interface.
  2. Navigate to: Configuration > Templates
  3. Set the Filter to:
Host groups: Templates/Operating systems
  1. Go to: Template OS Windows by Zabbix agent active > Items > Zabbix agent ping > Template Module Zabbix agent active.
  2. Change the type to: Zabbix agent.
  3. Click Update.

Auto-registration of agent

  1. Log into Zabbix web interface.
  2. Navigate to: Configuration > Actions.
  3. On the top left of the window, use the pulldown to select: "Autoregistration actions"
  4. Click "Create action" on the top right.
  5. Create the following Actions.
Name: Auto-Reg_-_Firewall Action Tab Condition Type: host name Operator: contains Value: fw Enabled: Checked Operations Tab Add to host groups: Templates/Operating systems Add to host groups: Templates/Virtualization Add to host groups: Virtual machines Remove from host groups: Discovered hosts Link to templates: Template OS FreeBSD Link to templates: Template VM VMware Guest Set host inventory mode: Automatic
  1. Click Add.
Name: Auto-Reg_-_Linux Action Tab Condition Type: host metadata Operator: contains Value: Linux Enabled: Checked Operations Tab Add to host groups: Templates/Operating systems Add to host groups: Templates/Virtualization Add to host groups: Virtual machines Remove from host groups: Discovered hosts Link to templates: Template OS Linux by Zabbix agent active Link to templates: Template VM VMware Guest Set host inventory mode: Automatic
  1. Click Add.
Name: Auto-Reg_-_Windows Action Tab Condition Type: host metadata Operator: contains Value: Windows Enabled: Checked Operations Tab Add to host groups: Templates/Operating systems Add to host groups: Templates/Virtualization Add to host groups: Virtual machines Remove from host groups: Discovered hosts Link to templates: Template OS Windows by Zabbix agent active Link to templates: Template VM VMware Guest Link to templates: WinInventory Set host inventory mode: Automatic
  1. Click Add.

Add Devices - Manually

If you plan to use SNMP to discover devices, this section may not be required.

Reference the Discovery Setup (SNMPv3) section for more information.

  1. Log into Zabbix web interface.
  2. Navigate to: Configuration > Hosts > Click "Create host"
    1. Add the client hostname
    2. Add the client visible name (friendly/display name)
    3. Add the client IP
    4. Add the client desctipion
    5. Add to a Group: Templates/Operating systems
      1. New groups can be created if needed
      2. Devices can be in multiple groups
    6. Check the Enable box
    7. Go to the "Templates" tab
    8. Select any of the following depending on the OS:
      1. "Template OS Linux by Zabbix agent"
      2. "Templates OS Windows by Zabbix agent"
    9. Click Select.