centreon / centreon-clapi

Centreon CLAPI Module
14 stars 14 forks source link

New line in Centengine Comment breaks the clapi #370

Open itsul opened 5 years ago

itsul commented 5 years ago

Hi,

when using multiple lines in the comment field of the centengine configuration, the CLAPI-Export breaks the line too, instead of replacing by \n. Example:

ENGINECFG;ADD;Centreon Engine CFG 1;Central;Changes on 22.02.2019 12:15:
External Command Check Interval from 1s to -1
External Command Buffer Slots from 4096 to 8192
ENGINECFG;setparam;Centreon Engine CFG 1;log_file;/var/log/centreon-engine/centengine.log

Expected:

ENGINECFG;ADD;Centreon Engine CFG 1;Central;Changes on 22.02.2019 12:15:\nExternal Command Check Interval from 1s to -1\nExternal Command Buffer Slots from 4096 to 8192
ENGINECFG;setparam;Centreon Engine CFG 1;log_file;/var/log/centreon-engine/centengine.log