Ad Widget

Collapse

Nested calculated items possible?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jason
    Senior Member
    • Nov 2007
    • 430

    #1

    Nested calculated items possible?

    I'm trying to write an item that takes the Exchange transaction log drive which I get in getExchangeLogPath and then use that to calculate the space free on the drive for back pressure. The formula gives me an error. Can I next calculated items like this?

    100*(last("vfs.fs.size[last("getExchangeLogPath"),total]")-1536M)/last("vfs.fs.size[last("getExchangeLogPath"),total]")

    I can see that might have too many inverted commas in there, but can't see a way round it...

    Oh on 2.4.7.
  • glebs.ivanovskis
    Senior Member
    • Jul 2015
    • 237

    #2
    Short answer: no.

    First parameter of trigger function in calculated item syntax must be an existing item key. And things like "last(...)" are not supported in item key parameters.

    If I understand your intentions correctly, you can achieve your goal by turning getExchangeLogPath item into low-level discovery rule and creating an item prototype 100*(last("vfs.fs.size[{#YOURLLDMACRO},total]")-1536M)/last("vfs.fs.size[{#YOURLLDMACRO},total]").

    Comment

    • Jason
      Senior Member
      • Nov 2007
      • 430

      #3
      Hi,

      I was coming to the conclusion that might be the only way of doing it. Seems a bit of a sledgehammer to crack a nut scenario though.

      Cheers!

      Comment

      • Jason
        Senior Member
        • Nov 2007
        • 430

        #4
        Bah,

        I can't do low level discovery because I already have one that does the filesystems and I get a clash of item names with the vfs.fs part.

        I'll have to re-think.

        Comment

        • Jason
          Senior Member
          • Nov 2007
          • 430

          #5
          Got it working eventually, but it's a pain if you've already got a filesystem discovery rule running for other things.

          Comment

          Working...