Ad Widget

Collapse

How to monitor VMware snapshots in Zabbix 6.2?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vlad$$$
    Junior Member
    • Mar 2020
    • 16

    #1

    How to monitor VMware snapshots in Zabbix 6.2?

    Hello everyone. There is a new feature in zabbix 6.2 that allows you to monitor:
    • Number and timestamp of VMware snapshots
    But i cannot find any corresponding items in VMware templates. Does anybody know how to set up this option?
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    Since 6.2 is still under development these new items are not in the templates yet. Probably at some point they will be added but there are no plans currently. Meanwhile you can see here how to add them. In addition you might want to know if your vm disk needs consolidation by using key vmware.vm.consolidationneeded.

    Comment

    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #3
      1) make LLD with key vmware.vm.discovery[{$URL}]
      2) create text item prototype “{#VM.NAME} Snapshot State” (simple check) with key “vmware.vm.snapshot.get[{$URL},{#VM.UUID}]”
      3) create integer item prototype “{#VM.NAME} Snapshot Count” (depended from previos item) with key “vmware.vm.snapshot.count[{#VM.NAME}]” and preprocessing “JSONPath => $.count “
      4) create trigger prototype “Snapshot Exist [{#VM.NAME}]” with formula “min(/your_template/vmware.vm.snapshot.count[{#VM.NAME}],{$SNAPOLDERTHAT})=1”
      5) define {$SNAPOLDERTHAT} 12h (for example) The trigger will trigger if the snapshot is detected for more than 12 hours.

      steps 2 and 3 can be combined in one item if you do not need other information on the snapshot
      Last edited by Hamardaban; 03-08-2022, 05:22.

      Comment

      • jvliere
        Junior Member
        • Aug 2022
        • 4

        #4
        Hello,
        Where do I have to create these items? In which Template? Or Discovery Rule?
        I've tried to create these items as discovery rule in the template "VMware Guest", but then I've got an error: "Cannot create item: item with the same key "vmware.vm.snapshot.get[{$VMWARE.URL},{$VMWARE.VM.UUID}]" already exists."

        Comment

        • jvliere
          Junior Member
          • Aug 2022
          • 4

          #5
          Beside that: the key "vmware.vm.snapshot.count" isn't recognized.
          I use zabbix 6.2.1

          Comment

          • P.G.
            Junior Member
            • Dec 2019
            • 3

            #6
            Greetings,

            to complete this request/question, it is kind of simple.

            Make sure you've imported the VMware Templates.

            Then go to your Templates, pick the VMware one, the one which discovers the hypervisors and all the guest VMs. There under discovery you will find the mentioned key vmware.vm.discovery[{$VMWARE.URL}], which is already there! So there is no need to create it, besides that creating a second one isn't possible anyways. At least if there is no need for you to create a complete new Template.

            In this line you should create above mentioned items and trigger(s) as only your vCenter can tell you which VM has snapshots.



            Good luck.








            Comment

            • zabbixio
              Junior Member
              • Aug 2024
              • 2

              #7
              I´m not geting this to work. Could someone post some images on how to succeed with this? Would appreciate it a lot!

              Comment

              • P.G.
                Junior Member
                • Dec 2019
                • 3

                #8
                Go to your Template "VMware vCenter" and select "Discovery rules". Under "Discover VMware VMs" add an "ItemPrototype":

                Click image for larger version

Name:	image.png
Views:	1434
Size:	39.1 KB
ID:	489222

                and a second "Item prototype" in dependency of the first one you've created:

                Click image for larger version

Name:	image.png
Views:	1360
Size:	38.2 KB
ID:	489223​​

                and add "Trigger prototypes" as you like e.g.:

                Click image for larger version

Name:	image.png
Views:	1377
Size:	21.7 KB
ID:	489224

                Comment

                Working...