PushDCIData() doesn't seem to do anything
-
Hi,
I'm trying to use
PushDCIData()on NetXMS 3.2.400 to update DCIs based on SNMP traps, but even a simple test script doesn't do anything for me. This is what I do for testing:PushDCIData($node,38620,1);I've tried running this script manually ("node -> execute server script") or triggered by a trap. I've tried entering the DCI id manually (as shown above) or by using
FindDCIByName(). I've verified thatFindDCIByName()gives the correct output (print(FindDCIByName()). Whatever I do, the DCI remains unchanged.Any ideas what I'm doing wrong?
Thanks,
Hendrik
-
I believe PushDCIData will update only DCIs that have origin "Push".
-
Ah, that works! Thanks!
But this triggers another question: My plan was to have a DCI that is updated every hour through SNMP polls and additionally through SNMP traps triggering PushDCIData() (whenever the value changes on the client). Is there a clever way of doing this? Maybe always use traps? Or can I update DCIs through SNMP traps using a different mechanism than PushDCIData()?
-
There could be better options, but one I can think of would be to create 2 DCIs:
- one with "Push" origin - that would be the actual DCI.
- another on that receives data via SNMP polls. You can put Retention time = 0, in that case it will not store anything to DB. In transformations script you can PushDCIData into the first DCI.
-
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