Calculated DCI
-
From messages:
@rando said:
Sorry, I didn't read the last part of the message. Yes, you can transfer this to the forum. I'm still struggling with the scripting. Is there any examples with descriptions I can look at to see the structure and usage? I'm just going through the manual right now.
@victor said:
@rando said:
I'm still learning the NetXMS software and have a wireless base station and remote wireless radios which is SNMP capable and I do get a signal value and a noise value. For me to calculate the signal to noise ratio I have to subtract these two numbers to create a 3rd value that I would need to track. Is there any way NetXMS can do this?
Yes, it's possible. You should define two DCIs, one will collect signal value, and other noise value. Then, for one DCI you can create transformation script, which will access last value of other DCI and use it in transformation. You can access other DCI value using built-in functions GetDCIValue and FindDCIByName or FindDCIByDescription. See user's manual for description of these functions (section 8.5.3).
You script may looks like following (assuming that you are transforming signal value and your noise DCI called "Noise Level"):$1 - GetDCIValue($node, FindDCIByDescription($node, "Noise Level"))Best regards,
VictorP.S. Can we move this discussion to the forum because this information may be useful for others?
-
Hi Victor,
I have defined two DCI for my Layer-2 switch. I need to add them together and generate as a third DCI. Is it possible to do?
-
Hi!
Yes, it is possible. You should create third DCI with the solurce set to "Internal" and parameter name set to "Dummy". This will generate zeros on given interval. Then, in transformation script you can access both DCIs you have configured and calculate value for your new DCI. Example transformation script:
value1 = GetDCIValue($node, FindDCIByDescription($node, "My DCI #1 description")); value2 = GetDCIValue($node, FindDCIByDescription($node, "My DCI #2 description")); return value1 + value2;Best regards,
Victor
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