Ad Widget

Collapse

Zabbix6.4 and Disk Notification GB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SpeedyGonzalesNL
    Junior Member
    • Oct 2023
    • 23

    #1

    Zabbix6.4 and Disk Notification GB

    Dear All,


    Im trying to set up item/trigger and alert trigger, that if a disk (like C or D drive) is below 5GB (or in KB = 5368709120)

    Now in the table, it will show me only vsf.fs.size.

    When i try to moderate it (or the KEY item) it wont let me add the numbers


    For example:

    {Template OS Windows:vfs.fs.size[{#FSNAME},free].last(0)}<5368709120​


    Every time i wanna save the item/trigger, its saying cant add key: (see screenshot error zabbix_item_adjustment.error)
    Click image for larger version

Name:	Zabbix_item_adjustment_error.png
Views:	853
Size:	30.4 KB
ID:	472474


    But now comes the strange thing.
    When i go to trigger and then to this item and select Constructor Exporession and test it with vaulue 1, i get true, but if i select 0 i get false.

    Now i did check all the documents and research the internet for 7 days now, and im running out of hair to pull out.

    What am i missing? Did i see something overhead?

    other settings check screenshots bellow (or check attachments)


    Can anyone please let me, to get this trigger sorted ?


    So what do i wanna see ?

    I wanna see in dashboard (Server X has less then 5GB on the disk)
    That trigger also needs to come in to teams channel (this is working for some other triggers i tested) but i want to give this trigger more informatin (like servername, the exact amount of GB thats still free)

    If you need any additional information, please let me know and i will give it to you.
    Thanks in advance,

    Your faithfully,
    Almost hairless IT donkey
    Attached Files
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Originally posted by SpeedyGonzalesNL

    Every time i wanna save the item/trigger, its saying cant add key: (see screenshot error zabbix_item_adjustment.error)
    Click image for larger version  Name:	Zabbix_item_adjustment_error.png Views:	11 Size:	30.4 KB ID:	472474

    you cannot add trigger expression into item config...all that last(... )< belongs to trigger config... different tab.. and FS size probably is not a log type, but a integer.

    and what is this "=0<5368709120" contraption on those attached pics? its either "=0" or "<5368709120" but not both...

    Comment

    • SpeedyGonzalesNL
      Junior Member
      • Oct 2023
      • 23

      #3
      Originally posted by cyber
      you cannot add trigger expression into item config...all that last(... )< belongs to trigger config... different tab.. and FS size probably is not a log type, but a integer.

      and what is this "=0<5368709120" contraption on those attached pics? its either "=0" or "<5368709120" but not both...

      I just checked, but i dont see the Type of Information 'Log' can be changed to Integger

      Also, =0<5368709120 is a trigger i want to go off when the disk space is lower then 5GB (and 5GB in KB's = 5368709120)

      5 GB = 5000000 KB (in decimal)
      5 GB = 5242880 KB (in binary)


      So the result is that i want to message 1 disk (like C drive, and give me a alert if its lower then 5GB)
      If i can setup multidisk with the same trigger, that would be nice aswell bevause some servers have more disk then others.


      Attached Files

      Comment

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

        #4
        ok .. then "Numeric(unsigned)"

        And no, "=0<5368709120" is not a suitable trigger function... your trigger prototype most probably should be something like "last(/Windows by Zabbix agent CONAP.../vfs.fs.size["C:",free])<5368709120"
        https://www.zabbix.com/documentation...onfig/triggers

        EDIT: oh.. I just noticed.. why you are trying to use LLD macros in ordinary items... ? Macros like {#FSNAME} belong to discovery and item/trigger prototypes, not to "ordinary" items...
        Last edited by cyber; 19-10-2023, 14:20.

        Comment

        • SpeedyGonzalesNL
          Junior Member
          • Oct 2023
          • 23

          #5
          Originally posted by cyber
          ok .. then "Numeric(unsigned)"

          And no, "=0<5368709120" is not a suitable trigger function... your trigger prototype most probably should be something like "last(/Windows by Zabbix agent CONAP.../vfs.fs.size["C:",free])<5368709120"
          https://www.zabbix.com/documentation...onfig/triggers

          EDIT: oh.. I just noticed.. why you are trying to use LLD macros in ordinary items... ? Macros like {#FSNAME} belong to discovery and item/trigger prototypes, not to "ordinary" items...

          Well parrently i doing something wrong

          So trying to make some things clearer.

          1.. My manager installed zabbix on a linux server
          2. We imported the standard Templates that Zabbix 6.4 offers (i think we got all templates, but i remove like 60% of them)

          Things i tryed.

          I go to Zabbix Server > Data Collection > Templates > CONAPP02 (this is a copy of the Windows by Zabbix agent)

          Make item, and try to change it to read the "last(/Windows by Zabbix agent CONAPP02/vfs.fs.size["c",free])<5368709120" (But dusnt work) without the <5368709120 i can add the item.
          Then i go to trigger, select the key last vfs.fs.size and that will allow to save it (vfs.fs.size["c",free]
          Then i tryed to make a Alert trigger that will let us know in teams that the disk is low.

          So what im a missing to make this work to show me how much GB theres left on a disk, and how to set up a correct trigger to get this working.
          Been on it for 8 days straight now, but everything i try it dusnt work.

          (For example, i made a item and trigger and trigger alert of a services that not running on a windows server 2019.. and that trigger alert works and im getting messages in teams)
          Just cant seem to get it working for the disk space.


          I have tryed how you said above, but that dusnt seem to work.

          So everything is pretty much just standard and we didnt do anything else dan install the zabbix server and imported the templates that are availible.

          Al LLD marcos and stuff are extra's that came along with it, and no idea if i can remove it.

          (Made a few screenshots in the attachments for more information)



          Attached Files

          Comment

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

            #6
            Originally posted by SpeedyGonzalesNL

            I go to Zabbix Server > Data Collection > Templates > CONAPP02 (this is a copy of the Windows by Zabbix agent)

            Make item, and try to change it to read the "last(/Windows by Zabbix agent CONAPP02/vfs.fs.size["c",free])<5368709120" (But dusnt work) without the <5368709120 i can add the item.
            Then i go to trigger, select the key last vfs.fs.size and that will allow to save it (vfs.fs.size["c",free]

            This is just wrong...
            if you configure the item (and not a prototype in discovery), then you do not configure any thresholds there... Just as it does not allow you to save that item with all the "<5368709120" added.. your items config should only contain "vfs.fs.size["c",free]" as key... ( if adding a prototype then "vfs.fs.size[{#FSNAME},free]"
            Then you go to "triggers" and add one... with the expression "last(/Windows by Zabbix agent CONAPP02/vfs.fs.size["c",free])<5368709120" ...

            You are mixing up items and triggers... and prototypes and normal items...

            You seem to have one discovery there already with all the items and triggers... Why you trying to add more?

            If all you want to add is a different threshold to your C drive trigger, you probably should look into template or host macros... There seems to be already a general macro, what applies to all discovered mountpoints... {$VFS.FS.FREE.MIN.CRIT} and it is set to 5G. If you look on trigger prototype, then you may notice, that it uses contexted macro "{$VFS.FS.FREE.MIN.CRIT:"{#FSNAME}"}". So... if you need different threshold to one drive, you should add a macro {$VFS.FS.FREE.MIN.CRIT:"C:"} (for example) with different value... and it will be used. If you add it to template, it will be used on all hosts where this template is installed, if you add this macro on host level, it applies only to that host.

            If all this seems like a big mumbo-jumbo... Then please .. start from the beginning -> https://www.zabbix.com/documentation/current/en/manual make sure you understand, what is item, what is trigger, how they are configured, what are macros (built-in, user, LLD) ... after that LLD and notifications and so on...

            Comment

            Working...