Skip to main content
Solved

Macro entry with dollar sign issue (from 25.10.12)

  • May 27, 2026
  • 5 replies
  • 32 views

Forum|alt.badge.img+2

Hi,

Due to the end of support of the release 24.04, I have recently upgraded my Centreon plateform to release 25.10 (I have two separate deployments).

But I found an issue on one of my deployments.

I’m using regex patterns within my “Custom Macro entries”, and I realized that the “$” sign is not passed anymore to the check command.

For example, custom entry configured “xe-0/0/1$” becomes “xe-0/0/1” when it is passed to the check command.

I have also realized that this issue appears with the release “25.10.12” and not present in “25.10.11”.

Any idea ? I didn’t find the release note of “25.10.12” that could explain a change of behavior how custom macro entries are now handled.

Thanks

David

Best answer by Jack

Hi

I have the same issue after upgrading from 25.10.11 to 25.10.12.

Regex macros containing the $ character no longer seem to work correctly. For example, an interface macro configured as:

^ethernet1/1/3$

is apparently passed without the trailing $, causing partial matches such as ethernet1/1/33 and ethernet1/1/37:1.

Manual plugin execution with the exact regex works correctly, but the same check executed by Centreon matches additional interfaces after the upgrad

I found it the workaround or fix, escape every $ in your macro values by doubling it: use $$ instead of $.


Regards!

5 replies

Forum|alt.badge.img+13
  • Builder **
  • May 27, 2026

Are your string in ‘ (quote) or in “ (double quote) ?

If in double quote I think you need to escape $ with \ (or even probably \\)

I don’t need it with ‘

 


Forum|alt.badge.img+2
  • Author
  • Steward *
  • May 28, 2026

Hi, 
In the check command, the string is between single quotes

--interface '$_SERVICEIFNAME$' 

I tried different solutions but with no success 

IFNAME: xe-0/0/1\$
IFNAME: xe-0/0/1\\$

Each time, $ sign is removed

This issue appears only with the latest release 25.10.12


Forum|alt.badge.img+4
  • Steward *
  • May 28, 2026

Hi

I have the same issue after upgrading from 25.10.11 to 25.10.12.

Regex macros containing the $ character no longer seem to work correctly. For example, an interface macro configured as:

^ethernet1/1/3$

is apparently passed without the trailing $, causing partial matches such as ethernet1/1/33 and ethernet1/1/37:1.

Manual plugin execution with the exact regex works correctly, but the same check executed by Centreon matches additional interfaces after the upgrad


Forum|alt.badge.img+4
  • Steward *
  • Answer
  • May 28, 2026

Hi

I have the same issue after upgrading from 25.10.11 to 25.10.12.

Regex macros containing the $ character no longer seem to work correctly. For example, an interface macro configured as:

^ethernet1/1/3$

is apparently passed without the trailing $, causing partial matches such as ethernet1/1/33 and ethernet1/1/37:1.

Manual plugin execution with the exact regex works correctly, but the same check executed by Centreon matches additional interfaces after the upgrad

I found it the workaround or fix, escape every $ in your macro values by doubling it: use $$ instead of $.


Regards!


Forum|alt.badge.img+2
  • Author
  • Steward *
  • May 29, 2026

Hi

I have the same issue after upgrading from 25.10.11 to 25.10.12.

Regex macros containing the $ character no longer seem to work correctly. For example, an interface macro configured as:

^ethernet1/1/3$

is apparently passed without the trailing $, causing partial matches such as ethernet1/1/33 and ethernet1/1/37:1.

Manual plugin execution with the exact regex works correctly, but the same check executed by Centreon matches additional interfaces after the upgrad

I found it the workaround or fix, escape every $ in your macro values by doubling it: use $$ instead of $.


Regards!

Thanks a lot Jack. I have also tested your workaround and it’s working perfectly 😎. 

Regards