Bug #1960

Wrong parsing of regexp character in arguments

Added by Rendil Ea over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:09/16/2010
Priority:NormalDue date:
Assignee:Julien Mathis% Done:

100%

Category:Centreon
Target version:Centreon-2.1.10
Resolution:fixed

Description

The character "|" from a regular expression is not transmitted to the command.
With the following command :
$USER1$/check_snmp_int -H $HOSTADDRESS$ -2 -C $ARG1$ -n '$ARG2$'
and ARG2 defined at the follwing value :
FastEthernet(1|2)/0/(24|9|12|10|11|13)

The executed command became:
/app/nagios/libexec/check_snmp_int -H xxx.xxx.xxx.xxx -2 -C xxxxxxxx -n FastEthernet(12)/0/(24912101113)

But, when we create directly the following command :
$USER1$/check_snmp_int -H $HOSTADDRESS$ -2 -C $ARG1$ -n 'FastEthernet(1|2)/0/(24|9|12|10|11|13)'
Everything is OK.

Associated revisions

Revision cf413fb4
Added by Julien Mathis over 3 years ago

fix #1960

git-svn-id: http://svn.centreon.com/trunk/centreon@10845 6bcd3966-0018-0410-8128-fd23d134de7e

History

#1 Updated by Julien Mathis over 3 years ago

  • Category set to Centreon
  • Status changed from New to Assigned
  • Assignee set to Julien Mathis
  • Target version set to Centreon-2.1.10

#2 Updated by Julien Mathis over 3 years ago

  • Status changed from Assigned to Solved
  • % Done changed from 0 to 100

Appliqué par commit r10845.

#3 Updated by Julien Mathis over 3 years ago

  • Status changed from Solved to Closed
  • Resolution set to fixed

#4 Updated by Rendil Ea over 3 years ago

There is the same problem with the $ character.
If I enter "GigabitEthernet4/1$" for ARG1, the command
/check_centreon_snmp_traffic -H $HOSTADDRESS$ -n -i $ARG1$ -r -w $ARG2$ -c $ARG3$ -C $USER2$ -v $ARG4$
become :
/app/nagios/libexec/check_centreon_snmp_traffic -H xxxxxxxxxx -n -i GigabitEthernet4/1 -r -w 80 -c 90 -C xxxxxx -v $_HOSTSNMPVERSION$

but if I enter /app/nagios/libexec/check_centreon_snmp_traffic -H xxxxxxxxxx -n -i GigabitEthernet4/1$ -r -w 80 -c 90 -C xxxxxx -v $_HOSTSNMPVERSION$, everything is OK.

I think it's the same bug

Also available in: Atom PDF