How do I have DCI's added automatically?

Started by agfjpcs, October 13, 2016, 09:26:59 AM

Previous topic - Next topic

agfjpcs

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

agfjpcs

#16
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);"
9) 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...

Tursiops

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

agfjpcs

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