It's important to keep in mind that monkey patching a given application is not only never easy but also never a good long term solution to a given bug - unless you like the open source application so much you'd to become one of its maintainers.
The simplest patches also the best. Fixing a single configuration option that is just not provided is the simplest and best monkey patch. Dealing with any logic will get scary over time.
- environment variables changing the behavior of the program
- load-dependent pthreads issues (can't reproduce on unloaded dev machine)
- shell scripts silently failing to do important things (liking kill off the old processes; but there's a check to not spawn if it's already running)
- config files that looked fine (realize that there's a case sensitivity issue in 1 out of 5 of the config files)