Ad Widget

Collapse

Need to adjust alert threshold for a single server's disk space.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kennethg0523
    Junior Member
    • Dec 2018
    • 7

    #1

    Need to adjust alert threshold for a single server's disk space.

    Im sure this has been answered before, but my searches came up empty. Maybe due to my verbiage. Anyways, I'm new to Zabbix.
    I have a lot of servers that are using a template. Zabbix sends an email when any disk is below 20% free.
    I need to set a couple of servers and specific drives to be something different. Like 10% free=send alert.

    Can I do this without creating a new template?

    Thanks
  • kennethg0523
    Junior Member
    • Dec 2018
    • 7

    #2
    So far this is what I'm finding...
    1. I cant find anything in the Zabbix forum search box. Nearly everything comes back with no results... Frustrating. Better to use google to search for Zabbix issues.
    2. I'm finding that to have a server with different thresholds for different % free file system alerts, you need to create a new template for that server. Seems like a basic need that is not available.
    3. Seems that if you don't know scripting or coding of some kind, you wont get far in Zabbix.

    Comment

    • Atsushi
      Senior Member
      • Aug 2013
      • 2028

      #3
      You do not need to create a template for each server or per threshold.

      There is a way to make it a template of a trigger using a user macro. You can change the threshold only for a specific host by specifying the default threshold in the template macro and overwriting it with the host's macro.

      If you want to change the file system for each mount point to mount, there is a sample in the manual.

      Comment

      • kennethg0523
        Junior Member
        • Dec 2018
        • 7

        #4
        So here is the deal. I am an experienced Sr System Admin of 20 Yrs. I've always used monitoring tools that I pay for and are more point and click for config and customization. I'm new to Zabbix due to reasons beyond my control.
        Respectfully, I don't really understand the Zabbix speak of how the Zabbix experts explain how to do something. In all of my searching over the last few months, I haven't found one helpful (to me) post, video or instruction.
        I could really use a guide, like.... Go to this page, click on that tab, choose this field and type this... Everything I find assumes I am already a Zabbix expert or a code expert.
        Seems like every install of Zabbix could possibly want to have a custom trigger "or whatever you call it" for a specific Disk drive(Free Space) on a specific server (hosts). I don't know why that's not easier to configure or show someone how to configure. The Zabbix lingo in the manual and help files make it impossible to follow. I am in need of some basic hand holding to get started learning some basic features. I'm not too proud to say that. : )

        Comment


        • Atsushi
          Atsushi commented
          Editing a comment
          I do not know how much level of knowledge you have.
          First of all, it may be necessary to learn about basic Zabbix functions. Find books that match your knowledge level and learn what is set and how it is set in default templates.
          If you are going to use Zabbix in earnest, it might be a way to take an training course.

          By showing what you want to realize more specifically, you may be able to acquire more detailed information. Since the first question lacks concreteness, I can only explain that there are basic ideas and functions.
      • DmitryL
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2016
        • 278

        #5
        This will explain context macro support, but it pre-assumes that you already have some understanding about Low level discovery.

        Comment


        • scuba
          scuba commented
          Editing a comment
          Hi Dmitry,

          How can i create an expression that it only triggers an alert if only the disk space used is over %95 for 15 minutes ?

          My normal expression is like ;

          last(/MYSERVER/vfs.fs.size[C:,pused])>{$VFS.FS.PUSED.MAX.CRIT:"C:"} and ((last(/MYSERVER/vfs.fs.size[C:,total])-last(/MYSERVER/vfs.fs.size[C:,used]))<5G or timeleft(/MYSERVER/vfs.fs.size[C:,pused],1h,100)<1d)

          Thanks in advance
      • kennethg0523
        Junior Member
        • Dec 2018
        • 7

        #6
        Originally posted by Dmitryb
        This will explain context macro support, but it pre-assumes that you already have some understanding about Low level discovery.
        https://www.youtube.com/watch?v=XZXboQ4dHRU&t
        Thank you. I think this will help me. For the first time, it helps to see somebody go through it. I needed this video a month ago. : )

        Comment

        • kennethg0523
          Junior Member
          • Dec 2018
          • 7

          #7
          So, I have found my answer and I'm not sure why Zabbix support or the Zabbix community didn't recommend this to me. I hope others can find it useful. Can someone tell me if there is a problem with my solution?

          How to set a different threshold for free space on the D drive on a specific server vs the 20% that all drives currently alert on. (Can be used for any drive)
          1. In Zabbix, go to Configuration/Hosts
          2. Choose the host
          3. Click on triggers
          4. Find the name of the trigger you want to change for the D drive.
          5. Clone it
          6. Go into the cloned trigger and set the value you want
          7. Disable the original trigger
          Seems to be working great and was a 30 second fix.

          Comment


          • Atsushi
            Atsushi commented
            Editing a comment
            If you can manually set each drive individually for each host, there is a way to do it.

            However, when the number of hosts that must be set increases, manually setting requires a lot of work time.
            Zabbix can be basically automated by using the function called LLD and macros. It is possible to reduce the work load on the operator by adopting the method of responding by setting the host macro only when it is absolutely necessary to change only the threshold of only some of the hosts of some hosts I guess.
        • kennethg0523
          Junior Member
          • Dec 2018
          • 7

          #8
          Thanks for the response. Yes for me, I had 2 servers I needed different settings for on a single drive so the individual modifications worked perfect. Perhaps, if I need across the board changes on many servers, the macro would be the solution.
          Last edited by kennethg0523; 07-02-2019, 16:44.

          Comment

          • ESITGuy
            Junior Member
            • Mar 2023
            • 17

            #9
            Old thread but thought this worth adding. (v7.0)

            Go to Host Configuration
            Click image for larger version

Name:	image.png
Views:	4955
Size:	21.1 KB
ID:	491466
            Macros
            Click image for larger version

Name:	image.png
Views:	4877
Size:	11.3 KB
ID:	491467
            Inherited and host macros
            Click image for larger version

Name:	image.png
Views:	4871
Size:	6.1 KB
ID:	491468

            Find the macro you want to change and click change.

            Click image for larger version

Name:	image.png
Views:	4813
Size:	69.5 KB
ID:	491469

            Comment

            • ESITGuy
              Junior Member
              • Mar 2023
              • 17

              #10
              To change them at the template level:
              Click image for larger version

Name:	image.png
Views:	4824
Size:	62.1 KB
ID:	491471

              I'm assuming if you have a bit of Template inception going on you would use the Inherited option.

              Comment

              • LucidGoose
                Junior Member
                • Nov 2025
                • 1

                #11
                hi all,
                I would like to discuss how I approached this in the latest version of Zabbix. While ESITGuys' approach is usable, it is not granular enough for me; my disks are C: and D: drive, and I need to override the percentage for only the D: drive. So, this is how I did it.

                First I went to Hosts, then Triggers for the host in question.

                Then I found the trigger for the D: drive, in this case there are two, warning and critical. I found these were based on what i think are dynamic macros from the discovery (highlighted below):

                Click image for larger version

Name:	image.png
Views:	480
Size:	38.2 KB
ID:	508658

                So, I went to the Host in question, then Macros, then overrode the items there, by clicking Add and pasting in the macro from the previous step and setting the threshold.

                Click image for larger version

Name:	image.png
Views:	470
Size:	45.4 KB
ID:	508659

                That makes my large disk (4tb) monitored how I wanted it Hope this helps someone​

                Comment


                • troffasky
                  troffasky commented
                  Editing a comment
                  This is the "Correct" way to do it, much more maintainable than creating copies of triggers all over the place.

                • Moebius
                  Moebius commented
                  Editing a comment
                  Thank you!! Works great.
              Working...