Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Function GetDCIValueByDescription returns (once) an empty string

Function GetDCIValueByDescription returns (once) an empty string

Scheduled Pinned Locked Moved Support
4 Posts 3 Posters 13.9k Views
  • 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.
  • WatchmanC
    WatchmanC
    Watchman
    wrote on last edited by
    #1

    I set up an DCI with: origin-script, data type-string, polling intervall-300
    The script returns possible node problems as string - amongst other things using the function GetDCIValueByDescription.
    While NetXMS is constantly running, I get the last value (not empty as expected).
    If the Core Server has been restarted, the function GetDCIValueByDescription returns (once) an empty string.  :-
    I checked in the history that the last value was not empty.

    I would call it a bug ::) , observed in version 2.0-RC1 and 2.0-RC2.

    Best Regards.

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi,

      GetDCIValueByDescription reads last value from cache. It can happen that it was called faster then cache for queried DCI was populated (either by poll or from database). I'll think what I can do with that.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • T
        T
        tomaskir
        wrote on last edited by
        #3

        I dont think this is a bug, its normal to get no value if the value has not been read from the node yet (due to server just starting up).

        Simply code around it in your script... either return error, or something similiar.
        (we do it like that in all our scripts)

        1 Reply Last reply
        0
        • WatchmanC
          WatchmanC
          Watchman
          wrote on last edited by
          #4

          Many thanks for your answers.

          @victor said in Function GetDCIValueByDescription returns (once) an empty string:

          ..
          GetDCIValueByDescription reads last value from cache. It can happen that it was called faster then cache for queried DCI was populated (either by poll or from database). I'll think what I can do with that.
          ..

          It would be nice if the behavior could be changed. 🙂
          (Although a restart is a special situation ..)

          Best Regards.

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups