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. Condition

Condition

Scheduled Pinned Locked Moved Support
8 Posts 2 Posters 16.1k 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.
  • P
    P
    prutser
    wrote on last edited by
    #1

    Hello again,

    Is it possible to keep a history of the results of a condition? It does not seem possible to create a DCI: Internal/child.status(condition)!
    Is there a way to create such a history?

    PS: I need the condition, because I need to calculate with results of the DCI's of different nodes.

    Thanxx in advance!

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

      Hello!

      It's not possible now, but idea is good, so I will implement a special DCI for obtaining condition status.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • P
        P
        prutser
        wrote on last edited by
        #3

        Thank you very much for your answer.

        In the meanwhile, suppose I create a mysql table myself, is there a way to use the NXSL (scripting) to do an insert into the table? (Eg, node_id, timestamp, condition value)? It would really help me out...

        Thanxx in advance!

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

          Hello!

          It's not possible to access database from NXSL. Although it's not hard to implement this functionality, it potentially can be a big security hole. But you can expect ConditionStatus DCI in 0.2.20 🙂

          Best regards,
          Victor

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

            Hello!

            ConditionStatus() DCI is available in 0.2.20-RC3. Please note that to use it you should add node on which you configure this DCI to condition's trusted nodes list, or disable trusted nodes checking by setting global server configuration parameter CheckTrustedNodes to 0.

            Best regards,
            Victor

            1 Reply Last reply
            0
            • P
              P
              prutser
              wrote on last edited by
              #6

              Thank you very very much for your quick help. If people are interested, I'd like to share following info:
              The core service failed to start on Windows 2003 after upgrading to the RC3. Solution for me was:

              1. I checked the log-file (c:\netxms\log\setuplog.log) and got an error on 2 "empty" conditions (Value in SQL-yog was: #00 instead of <NULL>). (The conditions were created, but there was no data and script in it..) I'm not sure wether this was the reason for the windows service not starting up, because after removal of the empty conditions the service still didn't want to start...
              2. Delete the core service:
                    C:\NetXMS\bin>netxmsd -R
              3. Recreate the service:
                    C:\NetXMS\bin>netxmsd -c "C:\NetXMS\etc\netxmsd.conf" -I
                    I'm not sure wether the "-c config-file" part is needed to create the service.
                Afterwards, the service started normally...
                I'm now trying to test the ConditionStatus(*)...

              PS: this was the error in the log file:
              [10-Mar-2008 11:43:35] Log file opened
              [10-Mar-2008 11:43:35] Database driver "mysql.ddr" loaded and initialized successfully
              [10-Mar-2008 11:43:39] GSM modem on COM1: initialized successfully. Hardware ID: "".
              [10-Mar-2008 11:43:39] Failed to compile evaluation script for condition object 204 "CSTST_PRCS": Error in line 1: syntax error, unexpected $end
              [10-Mar-2008 11:43:39] Failed to compile evaluation script for condition object 207 "CSPROD_PRCS": Error in line 1: syntax error, unexpected $end
              [10-Mar-2008 11:43:39] Failed to compile evaluation script for condition object 211 "HRPROD_PRCS": Error in line 1: syntax error, unexpected $end
              [10-Mar-2008 11:43:39] NetXMS Server started
              [10-Mar-2008 11:43:39] NetXMS Server stopped
              [10-Mar-2008 11:43:41] Log file closed

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

                Hello!

                Thanks for your post. I forgot to mention this upgrade problem 😞 The really needed steps is 2 and 3, and -c option is needed. This is because in 0.2.20 changes syntax of netxmsd.exe command line, to be in common style with agent and other tools.

                Best regards,
                Victor

                1 Reply Last reply
                0
                • P
                  P
                  prutser
                  wrote on last edited by
                  #8

                   I 've been fiddling around with the conditions and condition.status(*) and it works like a charm.

                  What still might be a nice feature is that a condition could take another condition as a data-value (Now it can only take a host/dci). But I work around by using an intermediate DCI. (This takes an extra delay, but is not really a problem...)
                  Also thank you for the tip about the trusted nodes part, because I would never have figured that out! Apparently you get an "not supported" error then...  😉

                  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