Áú»¢¶Ä²©

This is a translation of the original English documentation page. Help us make it better.

4 VMware monitoring setup voorbeeld

Overzicht

Het volgende voorbeeld beschrijft hoe u Áú»¢¶Ä²© kunt instellen voor het bewaken van VMware virtuele machines. Dit omvat:

  • het maken van een host die uw VMware-omgeving vertegenwoordigt;
  • het maken van een low-level discovery-regel die virtuele machines in uw VMware-omgeving ontdekt;
  • het maken van een host-prototype, op basis waarvan Áú»¢¶Ä²© echte hosts zal genereren voor virtuele machines die zijn ontdekt door de low-level discovery-regel.

Prerequisites

This example does not cover the configuration of VMware. It is assumed that VMware is already configured.

Before proceeding, set the StartVMwareCollectors parameter in Áú»¢¶Ä²© server configuration file to 2 or more (the default value is 0).

Maak een host

  1. Ga naar Gegevensverzameling ¡ú Hosts.

  2. Maak een host aan:

  • Voer in het veld Hostnaam een hostnaam in (bijvoorbeeld "VMware VM's").
  • Typ of selecteer in het veld Hostgroepen een hostgroep (bijvoorbeeld "Virtuele machines").

  • Ga naar het tabblad Macros en stel de volgende hostmacros in:
    • {$VMWARE.URL} - URL van de VMware-service (ESXi-hypervisor) SDK (https://servername/sdk)
    • {$VMWARE.USERNAME} - Gebruikersnaam van de VMware-service
    • {$VMWARE.PASSWORD} - Wachtwoord van de gebruiker {$VMWARE.USERNAME} van de VMware-service

  1. Klik op de knop Toevoegen om de host aan te maken. Deze host zal uw VMware-omgeving vertegenwoordigen.

Maak een low-level discovery-regel

  1. Klik op Ontdekking voor de aangemaakte host om naar de lijst met low-level discovery-regels voor die host te gaan.

  2. Maak een low-level discovery-regel aan:

  • Voer in het veld Naam een naam in voor de low-level discovery-regel (bijvoorbeeld "Ontdek VMware VM's").
  • Selecteer in het veld Type "Eenvoudige controle".
  • Voer in het veld Sleutel de ingebouwde item-sleutel in voor het ontdekken van VMware virtuele machines: vmware.vm.discovery[{$VMWARE.URL}].
  • Voer in de velden Gebruikersnaam en Wachtwoord de overeenkomstige macros in die eerder zijn geconfigureerd op de host.

  1. Klik op de knop Toevoegen om de low-level discovery-regel aan te maken. Deze ontdekkingsregel zal virtuele machines in uw VMware-omgeving ontdekken.

Create a host prototype

1. In the list of low-level discovery rules, click Host prototypes for the previously created low-level discovery rule.

2. Create a host prototype. Since host prototypes are blueprints for creating hosts through low-level discovery rules, most fields will contain low-level discovery macros. This ensures that the hosts are created with properties based on the content retrieved by the previously created low-level discovery rule.

  • In the Host name field, enter the macro {#VM.UUID}.
  • In the Visible name field, enter the macro {#VM.NAME}.
  • In the Templates field, enter or select the "VMware Guest" template. This template contains VMware items and discovery rules for monitoring the power state of a virtual machine, CPU usage, memory usage, network devices, etc.
  • In the Host groups field, enter or select a host group (for example, "Discovered hosts").
  • In the Interfaces field, add a custom host interface and, in the DNS name field, enter the macro {#VM.DNS}. Alternatively (based on the configuration of your VMware environment), in the IP address field, enter the macro {#VM.IP}. This is necessary for the correct functioning of the VMware Guest template.

  • In the Macros tab, set the {$VMWARE.VM.UUID} macro with the value {#VM.UUID}. This is necessary for the correct functioning of the VMware Guest template that uses this macro as a host-level user macro in item parameters (for example, vmware.vm.net.if.discovery[{$VMWARE.URL}, {$VMWARE.VM.UUID}]).

3. Click the Add button to create the host prototype. This host prototype will be used to create hosts for virtual machines discovered by the previously created low-level discovery rule.

Nadat het host-prototype is aangemaakt, zal de low-level discovery-regel hosts aanmaken voor ontdekte VMware virtuele machines, en Áú»¢¶Ä²© zal beginnen met het bewaken ervan. Merk op dat de ontdekking en aanmaak van hosts ook handmatig kunnen worden uitgevoerd, indien nodig.

Om de aangemaakte hosts te bekijken, navigeert u naar de menusectie Gegevensverzameling ¡ú Hosts.

Om verzamelde gegevens te bekijken, navigeert u naar de menusectie Bewaking ¡ú Hosts en klikt u op Laatste gegevens voor een van de hosts.

Advanced host interface configuration

The vmware.vm.discovery[{$VMWARE.URL}] item key, configured in the Create a low-level discovery rule section, returns network interfaces data in the "net_if" field:

"net_if": [
             {
               "ifname": "5000",
               "ifdesc": "Network adapter 1",
               "ifmac": "00:11:22:33:44:55",
               "ifconnected": true,
               "iftype": "VirtualVmxnet3",
               "ifbackingdevice": "VLAN(myLab)",
               "ifdvswitch_uuid": "",
               "ifdvswitch_portgroup": "",
               "ifdvswitch_port": "",
               "ifip": [
                 "127.0.0.1",
                 "::1"
               ]
             },
             {
               "ifname": "5001",
               "ifdesc": "Network adapter 2",
               "ifmac": "00:11:22:33:44:55",
               "ifconnected": false,
               "iftype": "VirtualVmxnet3",
               "ifbackingdevice": "VLAN(myLab2)",
               "ifdvswitch_uuid": "",
               "ifdvswitch_portgroup": "",
               "ifdvswitch_port": "",
               "ifip": []
             }
           ]

This data can be used to configure a custom host interface.

1. When creating a low-level discovery rule, additionally configure a low-level discovery macro. In the LLD macros tab, create a custom LLD macro with a JSONPath value. For example:

  • {#MYLAB.NET.IF} - $.net_if[?(@.ifbackingdevice=="VLAN(myLab)")].ifip[0].first()

2. When creating a host prototype, add a custom host interface and enter the LLD macro in the DNS name or IP address field.