check_iis with checkmk
In order to use the performance counters of check_iis with checkmk's implementation of NRPE ("MRPE"), the performance counters are not allowed to contain spaces. So all site- and app pool names as well as the counter names need to be changed to not contain spaces if anybody wants to use check_iis together with checkmk.
Maybe there is some one out there who has similar issues and was wondering how to solve this, or someone wants to add a flag to create the output in checkmk's MRPE format...
In my installation, I simply used
prefix = prefix.Replace(' ', '_');
and manually changed the listPerfData.Add-lines in the PerfCounterAppPools and PerfCounterSites functions
e.g. instead of
listPerfData.Add(" '" + prefix + "Total Worker Processes Created'=" + total_worker_processes_created.NextValue() + "c;;;;");
I used
listPerfData.Add(" '" + prefix + "TotalWorkerProcessesCreated'=" + total_worker_processes_created.NextValue() + "c;;;;");
I'll gladly accept a PR for this if you make it into an argument