Modify plugin output in Service object

I have been happily using the “dummy” check to programmaticaly determine states for things like internal Icinga cluster states or combined services. The “dummy” check allows manipulating the “plugin output” by assigning a dynamic value to vars.dummy_output.

Now I am wondering if we can also programmatically manipulate the plugin output for regular services. We have some plugins that give confusing output or are simply behaving badly (i.e. outputting NaN in the perf data, which confuses InfluxDBWriter) and unfortunately the issue will not be fixed upstream. In stead of writing and maintaining a wrapper check command, we were thinking of using a simple find and replace filter in the Icinga Service definition itself on service.output, is that possible?