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 that FindDCIByName() 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.
Good idea, works fine! Thanks a lot!