LUA script updating snmpget config

Discussion created by leoplocicki on Oct 19, 2012
Latest reply on Oct 22, 2012 by leoplocicki

We have a script that started causing problems on just a few servers. It's pretty basic, it uses nimbus.request to read values from the snmpget.cfg file and writes certain values back to the profiles section, all through nimbus.request. It then stops and starts the probe.


Now, it works just fine on most servers but for some reason it stopped working on 2 or 3 and is causing issues by not writing certain values to the profile sections in the config. We haven't been able to track down any pattern as to why it's doing this. I put in a bunch of logging code to check all return codes and at one time even checked all function calls (via pcall). Everything logs as though it should write the values fine, success across the board, but still it leaves out some values from the config file. 


We haven't found the value written to be the problem as it writes some constant values and these will also be missed. I'm not a LUA programmer (but still have 8 years programming experience) so I'm not sure if I missed something but I can't see anything majorly wrong with the script.


Does anyone have any idea why nimbus.request would fail to write values to the config file but still return a positive return code and continue on in the script like nothing happened? And only on a few servers out of MANY? Can someone point me in a direction other than re-writing it?