centreon-engine icon indicating copy to clipboard operation
centreon-engine copied to clipboard

Problem with balckslashe in macro value

Open s-duret opened this issue 8 years ago • 1 comments

Hello,

When I use backslashes in the macro value, Centreon-Engine doesn't work very well.

For example, this is my service:

define service {
    host_name                      Windows-2012
    service_description            Disk_C
    register                       1
    use                            OS-Windows-Disks-NRPE-custom
    _DRIVE                         C:\\  
    _SERVICE_ID                    1626
}

And this the command line found in centengine.debug : /usr/lib/nagios/plugins/check_centreon_nrpe -H 10.50.1.158 -p 5666 -t 30 -u -m 8192 -c check_drivesize -a "drive=C:\_SERVICE_ID 1626"

Centreon > 2.7.2 add a "space" add the end of line because we had a problem with "\n". Now I think it's a Centreon-Engine problem.

For information, in services.cfg I have a space after "_DRIVE C:\\".

Regards,

s-duret avatar Mar 21 '16 15:03 s-duret

Hi,

This is a known bug in Centreon Engine 1.5.1. Fixing it will require proper support of backslash escaping in Centreon Engine, proper generation of backlash escaping in Centreon Web, and is likely to cause regression in the unlucky few who already use backlash until they regenerate their configuration. This isn't trivial, and will be fixed in the next major version of Centreon.

On hold until then.

Regards,

afouille avatar Mar 22 '16 13:03 afouille