Ad Widget

Collapse

Item creation calculated

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sga
    Junior Member
    • Jun 2016
    • 25

    #1

    Item creation calculated

    Good morning, how are you? I'm finding a great difficulty in creating a calculated item that makes the subtraction of the data of an item minus the other. Has anyone done something? I need to get the data of an item and decrease the data of another item, it is possible to be done? Can anyone give me a hand? I really need it!

    Thank you very much. Sorry for bad English.
  • guzzijason
    Senior Member
    • Dec 2015
    • 106

    #2
    Yes, this shouldn't be difficult. Can you post examples of formulae you have tried? Perhaps someone will be able to see the problem.

    __Jason

    Comment

    • sga
      Junior Member
      • Jun 2016
      • 25

      #3
      Originally posted by guzzijason
      Yes, this shouldn't be difficult. Can you post examples of formulae you have tried? Perhaps someone will be able to see the problem.

      __Jason

      So, I've tried many formulas here, but I could not understand well how to create this formula. kkk. The last one I tried was: last ("vfs.fs.size [used]") - ("vfs.fs.size [full]").

      As I did not understand and formulate I was risking a few tries. Could you explain me how I create this formula?

      I want to subtract the data of an item from another item.

      I do not know if I'm able to properly explain my doubt, but that's it. LOL

      Thank you very much.

      Comment

      • guzzijason
        Senior Member
        • Dec 2015
        • 106

        #4
        A couple things:

        1. vfs.fs.size[] requires you to specify a filesystem. For example: vfs.fs.size[/var,used]

        2. I'm not sure why it looks like you're trying to calculate the amount of free space. This item is determined automatically by the OS templates that come with zabbix. Just make sure the correct template is applied to your host, like "Template OS Linux".

        __Jason

        Comment

        • sga
          Junior Member
          • Jun 2016
          • 25

          #5
          Originally posted by guzzijason
          A couple things:

          1. vfs.fs.size[] requires you to specify a filesystem. For example: vfs.fs.size[/var,used]

          2. I'm not sure why it looks like you're trying to calculate the amount of free space. This item is determined automatically by the OS templates that come with zabbix. Just make sure the correct template is applied to your host, like "Template OS Linux".

          __Jason

          Jason first thank you for the support, the situation is as follows. I need to monitor free space on volumes of a Storage and can not find the OID that gives me the result of free space volume in which the customer created in your Storage. However found the OID of total space, space then used I want to create an item decreasing the total space used by the space in order to have the free space, you know?

          Can you explain me how to do the formula to create this calculated item?

          Comment

          • guzzijason
            Senior Member
            • Dec 2015
            • 106

            #6
            I'm sorry, it's not clear to me what item keys you are using to collect this storage data. The syntax of the example formula you provided seems correct, but the keys are invalid. An example formula using the keys I gave previously would look like this:

            last("vfs.fs.size[/var,total]") - last("vfs.fs.size[/var,used]")

            That would provide the free space for the /var filesystem.

            __Jason

            Comment

            • sga
              Junior Member
              • Jun 2016
              • 25

              #7
              Originally posted by guzzijason
              I'm sorry, it's not clear to me what item keys you are using to collect this storage data. The syntax of the example formula you provided seems correct, but the keys are invalid. An example formula using the keys I gave previously would look like this:

              last("vfs.fs.size[/var,total]") - last("vfs.fs.size[/var,used]")

              That would provide the free space for the /var filesystem.

              __Jason

              To collect the data I created the following items.

              Item: Capacity Volume. Key: total.
              OID: .1.3.6.1.4.1.12740.5.1.7.1.1.8.1445698606.4.
              This item collects the total volume size.

              Item: Used space. Key: used
              OID: .1.3.6.1.4.1.12740.5.1.7.7.1.13.1445698606.4
              This item collection as given the space that has been used on the volume.

              Now I need to create an item that take the data item volume capacity and decrease this given the amount of space used for I have the volume's free space.

              It became clearer that?

              Comment

              • guzzijason
                Senior Member
                • Dec 2015
                • 106

                #8
                OK, if your item keys are simply "total" and "used", then I would expect the formula to look like this:

                last("total") - last("used")

                The vfs.fs.size[*] keys would have nothing to do with it.

                __Jason

                Comment

                • sga
                  Junior Member
                  • Jun 2016
                  • 25

                  #9
                  Originally posted by guzzijason
                  OK, if your item keys are simply "total" and "used", then I would expect the formula to look like this:

                  last("total") - last("used")

                  The vfs.fs.size[*] keys would have nothing to do with it.

                  __Jason
                  Jason, thank you, I'll be here and post here was solved or not.

                  Comment

                  • sga
                    Junior Member
                    • Jun 2016
                    • 25

                    #10
                    Originally posted by guzzijason
                    OK, if your item keys are simply "total" and "used", then I would expect the formula to look like this:

                    last("total") - last("used")

                    The vfs.fs.size[*] keys would have nothing to do with it.

                    __Jason
                    Jason

                    Thank you for helping my friend, it all worked here.

                    Comment

                    • guzzijason
                      Senior Member
                      • Dec 2015
                      • 106

                      #11
                      Wonderful - glad to hear

                      __Jason

                      Comment

                      Working...