Ad Widget

Collapse

Space used: Trigger -> Version 5.0.17

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nfpteap
    Junior Member
    • Nov 2021
    • 5

    #1

    Space used: Trigger -> Version 5.0.17

    Hi everyone,

    I have two Zabbix installed, on the older (Zabbix 3.0.32) one I have triggers for disk space:

    Disaster
    {HOST.NAME} Free disk space is less than 512Mb on volume {#FSNAME}
    {EAP-VM1:vfs.fs.size[{#FSNAME},free].last(0)}<512000000

    High
    {HOST.NAME} Free disk space is less than 2% on volume {#FSNAME}
    {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<2

    Average
    {HOST.NAME} Free disk space is less than 5% on volume {#FSNAME}
    {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<5

    Average
    {HOST.NAME} Free disk space is less than 10% on volume {#FSNAME}
    {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<10

    Warning
    {HOST.NAME} Free disk space is less than 20% on volume {#FSNAME}
    {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<20

    On the new one (Zabbix 5.0.17) I would like to have the same ones, can anyone help me on creating at least one so I can replicate the others? Is there any repository with these templates for version 5? I have done several searches about this matter but nothing that would help me achieve what I need. I can see that on the new version it saw how much is used instead of the space available left, for example, less than 10%, but only has 3 triggers or 2 and can't replicate/clone those to have the 5 I have on the old Zabbix.

    Thank you in advance,

    NF
  • niveastn
    Member
    • Oct 2021
    • 82

    #2
    Hey there

    {EAP-VM1:vfs.fs.size[{#FSNAME},free].last(0)}<512000000 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},free])<512000000

    {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<2 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},pfree])<2

    {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<5 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},pfree])<5

    {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<10 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},pfree])<10

    {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<20 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},pfree])<20

    Comment


    • nfpteap
      nfpteap commented
      Editing a comment
      created by error
  • nfpteap
    Junior Member
    • Nov 2021
    • 5

    #3
    Originally posted by niveastn
    Hey there

    {EAP-VM1:vfs.fs.size[{#FSNAME},free].last(0)}<512000000 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},free])<512000000

    {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<2 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},pfree])<2

    {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<5 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},pfree])<5

    {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<10 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},pfree])<10

    {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<20 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},pfree])<20
    How can I create these triggers from zero and linked to which templates? I'm sorry for all the requests but I'm new with Zabbix, unfortunately there seems to be a lot of differences between versions, not being able to import correctly the triggers.

    Comment

    • niveastn
      Member
      • Oct 2021
      • 82

      #4
      nfpteap hey, no worries! We are here for that (:
      There is indeed a lot of changes with 5.0+

      You can create these triggers directly in a template.

      You will go to Configuration > Templates > Template you want or "create template" (but if you create a new template, you have to create your items first )

      Assuming you already have a template and your items ready
      Use the path above, go triggers > create trigger

      Its going to open this page
      Click image for larger version

Name:	forum1.png
Views:	807
Size:	27.4 KB
ID:	434430

      Name is the title of your alert. The text that will show up in your emails and dashboard screen
      Severity is the serverity of your trigger.
      You can go to Expression > Add. This page will open
      Click image for larger version

Name:	forum2.png
Views:	772
Size:	37.1 KB
ID:	434431

      If you click in item, all the items of your template will show up. You just need to click on top of the one you want
      Function returns a list of all trigger functions available and a small explanation about each. For what I understood from your original post, you need last. So select Last.
      Result is basically if its =, <>, >, <, >= or <=

      After that. click in Add, and you have a new trigger (:




      Comment

      • nfpteap
        Junior Member
        • Nov 2021
        • 5

        #5
        Originally posted by niveastn
        Hey there

        {EAP-VM1:vfs.fs.size[{#FSNAME},free].last(0)}<512000000 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},free])<512000000

        {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<2 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},pfree])<2

        {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<5 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},pfree])<5

        {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<10 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},pfree])<10

        {EAP-VM1:vfs.fs.size[{#FSNAME},pfree].last(0)}<20 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},pfree])<20

        One question, these are the new code for the triggers on the 5.x versions?
        The one I have by default has the following code:
        {Template OS Windows by Zabbix agent:vfs.fs.size[{#FSNAME},pused].last()}>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"} and
        (({Template OS Windows by Zabbix agent:vfs.fs.size[{#FSNAME},total].last()}-{Template OS Windows by Zabbix agent:vfs.fs.size[{#FSNAME},used].last()})<10G or {Template OS Windows by Zabbix agent:vfs.fs.size[{#FSNAME},pused].timeleft(1h,,100)}<1d)

        Can you provide me an example with the 512 MB please? Just so I can understand the variables that are used and how the function.

        Comment

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

          #6
          Correction... New format is not for 5.x ... new format is for 5.4 and above. Any other version 5, like 5.0 or 5.2, still uses old format.

          Comment

          • nfpteap
            Junior Member
            • Nov 2021
            • 5

            #7
            Originally posted by cyber
            Correction... New format is not for 5.x ... new format is for 5.4 and above. Any other version 5, like 5.0 or 5.2, still uses old format.
            So I will be able to export and import from the version 3?

            Comment

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

              #8
              You can try.. there has been some modifications to export format between versions. But I think going from older to newer is OK, it will not work the other way, as newer formats do not specify all fields any more if they are empty, IIRC.

              Comment


              • nfpteap
                nfpteap commented
                Editing a comment
                I was able to import but when linking with the right template got the new and old triggers together and not able to delete the ones from Zabbix 5.
            • nfpteap
              Junior Member
              • Nov 2021
              • 5

              #9
              Can't delete the first 3 triggers that came with Zabbix 5:

              Click image for larger version

Name:	Za.jpg
Views:	743
Size:	269.0 KB
ID:	434545

              Comment

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

                #10
                Unlink the Windows filesystems template module then...

                Comment

                • Gutreedy
                  Junior Member
                  • Jan 2022
                  • 1

                  #11
                  {EAP-VM1:vfs.fs.size[{#FSNAME},free].last(0)}<512000000 >>> last(/EAP-VM1/vfs.fs.size[{#FSNAME},free])<512000000

                  Comment

                  Working...