Ad Widget

Collapse

Duplicate keys

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • narlinux
    Junior Member
    • Jan 2021
    • 4

    #1

    Duplicate keys

    Hi,

    I am facing an issue that I cannot do anything else after many searches.

    Consider the Linux template, I use that to monitor 100 nodes and it reports disk usage if it exceeded 80%. So far we everything is fine now.

    Now consider that I want to monitor 30 of those nodes (only), to check whether their disk space has exceeded 50% or not.

    I can't create another trigger within that main template Linux because all other nodes will report.

    I tried cloning the Linux template but I couldn't add it to the host because it says you have already used the same vfs.fs.size key.

    Can someone help me with this?

    Thanks Zabbix team.
  • narlinux
    Junior Member
    • Jan 2021
    • 4

    #2
    Thanks, I just read the documentation, the only thing that I got confused here is this:

    Whenever I create the macro (I created {$LOW_SPACE_LIMIT:/} = 50), where should I create the item in the host? I mean should I create a simple item under host, or I should go Discovery Items and then create it? I mean I'm confused because in the documentation it hasn't declared where to put the trigger.

    Comment

    • narlinux
      Junior Member
      • Jan 2021
      • 4

      #3
      Ok ok, I fixed it. Just created another trigger and set the value as I did in macro.
      Thank you

      Comment

      • narlinux
        Junior Member
        • Jan 2021
        • 4

        #4
        @cyber: I did exactly the same as you said, no other trigger. I only added the macro in the template, then modified the trigger with the macro's name

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          But maybe it would be reasonable to make use of those macros in the template?
          For example. Trigger prototype uses {$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"} , this is conditional macro, you see it has LLD macro in it, but there is no macro defined for each FS. just a "global" one, to be used when conditional macro is not present ({$VFS.FS.PUSED.MAX.WARN})...
          So if you create on those servers, where you need lower threshold, macros that define that threshold for this specific filesystem, everything will work, no cloning of templates or workarounds... Lets say you want to monitor /home on those special hosts with lower threshold, create {$VFS.FS.PUSED.MAX.WARN:"/home"} in each hosts config.

          https://www.zabbix.com/documentation...macros_context

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6
            The way I imagined it was to set needed limits directly on host via macros and you should not need to use any other trigger or item besides, what you already have. Assuming that you use somewhat new version of default templates... I took my examples from v5.0 Zabbix. There can be different ones for older versions. But the idea behind them still remains same.

            Comment

            Working...