centreon / centreon-engine

Extremely fast monitoring scheduler, forked from Nagios
GNU General Public License v2.0
42 stars 17 forks source link

Problem with balckslashe in macro value #43

Open s-duret opened 8 years ago

s-duret commented 8 years ago

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,

afouille commented 8 years ago

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,