We are deploying Elasticsearch on linux Azure VMs using DSC for linux.
At the moment it is a huge challenge to debug DSC configuration due to long (several minutes) turnaround for a DSC build / run and close to useless logs generated by OMI service: dsc.log
The file contains lots of "noise" and very limited useful output of the commands. I.e. if script config step failed it would just state that:
"A general error occurred, not covered by a more specific error code.. The related ResourceId is [nxScript]/somename/"
On the other hand, according to OMI logging and debugging:
The logging level for the omiserver.log log file cannot be changed from the default in this version of the Operations Manager Agents for UNIX and Linux.
What is the best way to log all standard output from DSC run shell scripts?
So far, the only way that we managed to get full logs from OMI server was by changing /init.d/omid file's daemon startup command line from sth like:
$CREATE_LINKS && start-stop-daemon --start --quiet --pidfile $PIDFILE --name "omid" --startas $OMI_BIN -- --configfile=/etc/opt/omi/conf/omiserver.conf -d
to
$CREATE_LINKS && start-stop-daemon --start --quiet --pidfile $PIDFILE --name "omid" --startas /bin/bash --background -- -c "exec $OMI_BIN --configfile=/etc/opt/omi/conf/omiserver.conf > /var/log/omiserver.log 2>&1"
Please note: this workaround is only good enough as a debugging solution and should never be propagated to anywhere close to production. omiserver.log would contain all scripts executed as well their std and err output.