diff --git a/bundles/icinga2/files/hosts.d/host.conf b/bundles/icinga2/files/hosts.d/host.conf index 2f04906..729e08f 100644 --- a/bundles/icinga2/files/hosts.d/host.conf +++ b/bundles/icinga2/files/hosts.d/host.conf @@ -14,7 +14,8 @@ if key.endswith('_interval'): return value else: - return f'"{value}"' + escaped_value = value.replace('$', '$$').replace('"', '\\"') + return f'"{escaped_value}"' elif isinstance(value, (list, set)): return '[' + ', '.join(render_value(e) for e in sorted(value)) + ']' else: