• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Datapoints record alert

    Mango Automation general Discussion
    2
    3
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Ava2018
      last edited by

      Hi!
      I have a problem with some dev users, where they usually create test datasources with a very short update timing or write a big script in a DS Meta with several changing context points which may generate a unnecessary writing values and processing. We stablish that 1 register each 30 sec is the shortest time period we should use. However those users usually forget that, Since we use Oracle with our SCADA system, I set up an alert in the DB where if a DP records more than 2880 a day, it sends me an alert email to check that DP.
      Is it possible to use a similar control using mango's NoSql db?

      Thanks

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by phildunlap

        Hi Ava2018, welcome to the forum!

        On the NoSQL database, I would recommend someone attempt to achieve that via either counting the points' value from a script in Mango and outputting a list of points with over or under counts into alphanumeric points, something like

        var overcounts = [];
        var undercounts = [];
        for(var contextPoint in CONTEXT_POINTS) {
            var count = this[contextPoint].past(DAY].count;
            if( count > 2880 )
                overcounts.push( this[contextPoint].getDataPointWrapper().getExtendedName() );
            else if( count < 2880 )
                undercounts.push( this[contextPoint].getDataPointWrapper().getExtendedName() );
        }
        //these two points would be alphanumeric points on the scripting data source:
        overcountPoint.set(JSON.stringify(overcounts));
        undercountPoint.set(JSON.stringify(undercounts));
        

        or that they achieve it by querying a /rest/v2/point-values/ endpoint for a count rollup,

        I should also say that we mitigated the issue of multiple context points updating at the same millisecond being a great source of inefficiency by tracking if there are multiple updates at the latest millisecond and only accepting one of them. It doesn't mitigate the issue if the values are backdated, though. The updates only trigger the execution, but their having arrived is not necessary for the values to be available in the cache, but it is a race condition and one of the possible reasons to introduce an execution delay on a meta point.

        You could also have the meta points executing on a cron, which would eliminate the issue.

        1 Reply Last reply Reply Quote 0
        • A
          Ava2018
          last edited by

          Good!
          I will try to implement the script.

          Thank you very much the quick response phildunlap!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post