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. How do I have DCI's added automatically?

How do I have DCI's added automatically?

Scheduled Pinned Locked Moved Support
19 Posts 4 Posters 58.8k 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.
  • A
    A
    agfjpcs
    wrote on last edited by
    #9

    Is anyone able to fire up a fresh windows VM, install the latest version (2.0.6) of netxms agent and confirm it does indeed load java correctly?
    Not sure if its a problem with the latest version of java or some netxms component. It's just not working for me, I get the same error messages as above

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

      Hi,

      By default agent looks for jvm.dll in your PATH or, of JAVA_HOME environment variable is set, in location %JAVA_HOME%\bin\server or %JAVA_HOME%\jre\bin\server. From your log file it seems that JAVA_HOME is not set correctly. Make sure that you either have jvm.dll in PATH, or that JAVA_HOME environment set correctly. Alternatively you can manually specify full path to jvm.dll using JVM parameter in subagent configuration.

      Also, if you are on 64bit system make sure that you are using 64 bit version of both JVM and agent.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • A
        A
        agfjpcs
        wrote on last edited by
        #11

        The %PATH% variable contains this
        C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

        JAVA_HOME doesn't exist on any machine, so perhaps its not included in latest versions of Java?
        Anyway I created it and entered C:\Program Files\Java\jre1.8.0_101
        (Using both 32bit and 64bit java and 64bit agent)

        Log file now shows
        [20-Oct-2016 08:39:09.121] [DEBUG] Initializing Java subagent
        [20-Oct-2016 08:39:09.121] [DEBUG] WINPERF: CollectorThread_A: Counter "\Processor(1)\% Processor Time" added to query
        [20-Oct-2016 08:39:09.121] [DEBUG] JAVA: Default JVM set from JAVA_HOME: C:\Program Files\Java\jre1.8.0_101\bin\server\jvm.dll
        [20-Oct-2016 08:39:09.121] [DEBUG] WINPERF: CollectorThread_A: Counter "\Processor(1)\% Processor Time" added to query
        [20-Oct-2016 08:39:09.121] [DEBUG] JAVA: using JVM C:\Program Files\Java\jre1.8.0_101\bin\server\jvm.dll
        [20-Oct-2016 08:39:09.121] [DEBUG] WINPERF: CollectorThread_A: Counter "\Processor(1)\% Processor Time" added to query
        [20-Oct-2016 08:39:09.122] [DEBUG] WINPERF: CollectorThread_A entered data collection loop
        [20-Oct-2016 08:39:09.127] [ERROR] JAVA: Unable to load JVM: The specified module could not be found.
        [20-Oct-2016 08:39:09.127] [ERROR] Registration of subagent "java.nsm" failed

        Also tried changing it to program files (x86). Same thing

        [20-Oct-2016 08:44:33.058] [DEBUG] Initializing Java subagent
        [20-Oct-2016 08:44:33.058] [DEBUG] WINPERF: CollectorThread_A: Counter "\Processor(0)\% Processor Time" added to query
        [20-Oct-2016 08:44:33.058] [DEBUG] JAVA: Default JVM set from JAVA_HOME: C:\Program Files (x86)\Java\jre1.8.0_101\jre\bin\server\jvm.dll
        [20-Oct-2016 08:44:33.058] [DEBUG] JAVA: using JVM C:\Program Files (x86)\Java\jre1.8.0_101\jre\bin\server\jvm.dll
        [20-Oct-2016 08:44:33.058] [DEBUG] WINPERF: CollectorThread_A: Counter "\Processor(0)\% Processor Time" added to query
        [20-Oct-2016 08:44:33.058] [DEBUG] WINPERF: CollectorThread_A: Counter "\Processor(0)\% Processor Time" added to query
        [20-Oct-2016 08:44:33.058] [ERROR] JAVA: Unable to load JVM: The specified module could not be found.
        [20-Oct-2016 08:44:33.058] [ERROR] Registration of subagent "java.nsm" failed

        1 Reply Last reply
        0
        • A
          A
          agfjpcs
          wrote on last edited by
          #12

          Utterly baffled............................

          I added the JAVA_HOME to my PC (which isn't the main NetXMS server) and hey presto java subagent loads just fine
          However I just CANNOT get the damn thing to work on the main server. It throws the above error message. My PC runs Java 8 update 92, so I installed the same version on the server, updated the JAVA_HOME path to point to using that version - doesn't work
          Tried a bunch of things including installing the standalone NetXMS agent on the server (64 bit). No difference
          Deleted and copied the Java and NetXMS Agent folders across to the server so the files are identical. No difference
          Gave full read/write permission to everyone on both folders just in case it was something silly like that. No difference

          It just doesn't work

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

            What is server OS version?

            Best regards,
            Victor

            1 Reply Last reply
            0
            • A
              A
              agfjpcs
              wrote on last edited by
              #14

              2012 R2 Standard - build 9600

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

                Hi,

                just noticed from

                JAVA: using JVM C:\Program Files (x86)\Java\jre1.8.0_101\jre\bin\server\jvm.dll

                that you seems to be using 32 bit JVM, but most likely you have 64 bit agent. You should use 64 bit JVM with 64 bit agent and 32 bit JVM with 32 bit agent.

                Best regards,
                Victor

                1 Reply Last reply
                0
                • A
                  A
                  agfjpcs
                  wrote on last edited by
                  #16

                  That would have been an old config I tried. The server has both 32 and 64 bit JAVA installed
                  The current one is pointing to the 64 bit java jvm.dll and it doesn't work, same message as above
                  I tried uninstalling and reinstalling both 32 and 64 bit versions of Java, Tried manually adding
                  jvm = "C:\Program Files\Java\jre1.8.0_112\bin\server\jvm.dll" to nxagentd.cfg under [JAVA] and same problem

                  Still getting
                  [23-Nov-2016 15:24:33.026] [DEBUG] JAVA: using JVM C:\Program Files\Java\jre1.8.0_112\bin\server\jvm.dll
                  ...
                  [23-Nov-2016 15:24:33.028] [ERROR] JAVA: Unable to load JVM: The specified module could not be found.
                  [23-Nov-2016 15:24:33.029] [ERROR] Registration of subagent "java.nsm" failed

                  1 Reply Last reply
                  0
                  • A
                    A
                    agfjpcs
                    wrote on last edited by
                    #17

                    I'm reviving this thread because i've completely scrapped Windows as a host and gone to Ubuntu - various crashes and other such. Ignore the past few posts as they don't apply anymore. What is important is the title of this thread

                    I STILL can't work out how to get DCI's for interfaces added automatically because information isn't contained in a simple "here follow this from start to finish" manner, its "google it and work it out for yourself"

                    Can you let me know if i'm on the right track here and help me fill in the blanks...

                    1. Create a Template item
                    2. Right click the new template, choose properties, go to the 'Automatic Apply Rules' section
                    3. Fill in some sort of matching criteria, this alone is difficult enough to find, but for testing purposes it seems "return true;" will match everything
                      3a) In my case i'm using "return $node->driver == "UBNT";" to match Ubiquiti devices
                    4. Click ok, right click the Template and choose 'Data Collection Configuration' then create a new parameter
                    5. Fill in....
                      Description: "IN - {instance-name} (bytes/sec)"
                      Parameter: .1.3.6.1.2.1.2.2.1.10.{instance} (In this case this correlates to the inbound bytes counter of Ubiquiti devices)
                      Origin: SNMP
                      Data Type: Unsigned Integer
                    6. In the Instance Discovery section, choose 'SNMP Walk - OIDs'
                    7. Set Base SNMP OID as .1.3.6.1.2.1.2.2.1.2 (This should be the interface name/description value?)
                      8 ) In the script field type in "return $(true, $1, $2);"
                    8. Now whenever you do a Poll->Configuration (and this happens automatically when adding a new device) the template items should get added to anything that matches the template and each DCI

                    My understanding is that $1 effectively becomes {instance} and $2 becomes {instance-name}
                    However while this gets added to the node's as a DCI, those aren't replaced. The parameter still reads .1.3.6.1.2.1.2.2.1.10.{instance} and of course no data is collected
                    Can someone explain what i'm doing wrong and actually tell me the steps necessary instead of just asking me to go look on the forums. Have already done that...

                    1 Reply Last reply
                    0
                    • T
                      T
                      Tursiops
                      wrote on last edited by
                      #18

                      Hi,

                      In step 5, change the data type to Unsigned Integer 64bit.
                      In step 7, set the Base SNMP OID as .1.3.6.1.2.1.2.2.1.1 (not .2).
                      In step 8, you will need this:

                      return %(true, $1, $2);
                      

                      Note the % instead of the $ in your list.

                      Add a step after 8 to:
                      Click on Transformation and select Average delta per second. As you want Bytes per second, you don't need to add further any transformation (e.g. you could "return $1*8;" to return Bits per second instead. You may also want to implement some kind of transform set to avoid showing funky data caused by counter overflows (i.e. impossibly high values being shown). This part is something they are working on fixing with a new data type for this purpose, but for now, you'll simply have to filter the bad results out in one way or the other.

                      Poll Configuration will apply the template and Instance Discovery will create the required DCIs afterwards.
                      You need to run both.

                      Cheers

                      1 Reply Last reply
                      0
                      • A
                        A
                        agfjpcs
                        wrote on last edited by
                        #19

                        Finally! Thank you! works fine now

                        And yes the $ instead of % was a typo above
                        I mostly had it working before but was unaware you needed to actually run 'instance discovery' after a config poll. Some of my old scripts magically started working

                        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