Trying to implement adaptive monitoring i needed to define custom variables in my services/objects that have dummy values at startup and are updated during the monitoring process. So i defined a service
What i intended to do, was, to change the custom _OID variable accordingly using the CHANGE_CUSTOM_SVC_VAR external command, and, then, issue a SCEDULE_SVC_CHECK external command for the service to do an on-demand check, using the custom $_SERVICEOID$ macro with my_snmp_command to pass the correct OID every time.
In my nagios.log file I could see both the received extenral commands:
 EXTERNAL COMMAND: CHANGE_CUSTOM_SVC_VAR;SERVER1:Terminal;_OID;.184.108.40.206.4.1.55220.127.116.11.29.34.0
 EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;SERVER1:Terminal;1110741500
The forced service check is executed but the $_SERVICEOID$ macro retains the initial ‘dummy’ value as if the CHANGE_CUSTOM_SVC_VAR external had not been issued.
I have disabled the large_installation_tweaks but no change.
Has anyone faced the same problem? Could you suggest me any possible solutions?
Thank you in advance