Skip to content

Conversation

francisco-cruz-o
Copy link
Contributor

@francisco-cruz-o francisco-cruz-o commented Oct 5, 2025

Description

RAD-6136
This ticket will create a script that will identify Unreliable data points that meet certain criteria and set the value of those data points to a specific value.

A sample script for identifying all unreliable points is found here:
https://github.com/MangoAutomation/script-examples/blob/main/mango-javascript/unreliable-data-source.js

A rough example of how this can be done via a Gralljs script is here:
https://github.com/MangoAutomation/script-examples/tree/main/check-and-set-unreliable

This script will:

  • Be run on a schedule via Advanced Schedules
  • Will not hold locks on data points in the runtime longer than necessary
  • Will skip any data points that are:
    • In a Persistent TCP/gRPC data source
    • Not numeric data points

Identify:

  • If a point is Running
  • If a point is unreliable
  • If the point has not received an updated value in a specific time period (at least 1 minute)
  • Set the value of the numeric data point to the default value
    • This value will be stored in the TSDB database
    • This cannot change a data point from Unreliable to Reliable

Current behavior

  • No Scripting for Set Unreliable Data Points to Default Value

Expected behavior

  • Scripting for Set Unreliable Data Points to Default Value

Changes

  • create script to:
    • Detect numeric data points marked as "unreliable"
    • Check if they haven't received an update for at least 1 minute
    • Set their value to a default (e.g. -1.0)
    • With this rules:
      • Skip points in Persistent TCP/gRPC data sources
      • Skip non-numeric data points

Resources

Captura de pantalla 2025-10-05 a la(s) 3 10 27 p  m Captura de pantalla 2025-10-05 a la(s) 3 13 33 p  m

Pass one minute:

Captura de pantalla 2025-10-05 a la(s) 3 13 23 p  m Captura de pantalla 2025-10-05 a la(s) 3 12 24 p  m

Tests

  • Manual testing

@francisco-cruz-o francisco-cruz-o marked this pull request as ready for review October 7, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants