When wanting to use a regular expression in a component identification, you must use ".*" as a wildcard.
However if you enter "*" instead and save the changes, then you will no longer be able to synchronize the monitors.
It happens with any expression with an asterisk at the beginning (e.g. "*", *TEST, etc)
Steps to replicate:
-------------------
- Edit any component identification:
Business Services -> Business Transactions -> Transactions -> Components -> Identification
- Change Action to "Matches regular expression"
- Change Pattern to "*"
- Click Update
- You will see the message:
"Confirmation: Parameter changes were saved successfully."
and "Monitors are not synchronized" appears.
<Please see attached file for image>
But, when you try to synchronize the changes, you will get an error:
- Go to Setup -> Monitors
- Click on "Synchronize all monitors"
- the following message appears:
"Error: One or more monitors could not be synchronized. Please verify that all enabled monitors are running and accessible."
- "Domain Configuration Status" now shows
"Communication Error 500"
500 Error Data error: error in regular expression "*" at position 0: nothing to repeat
<Please see attached file for image>
<Please see attached file for image>
- Try to revert back the change in "Business Services -> Business Transactions -> Transactions -> Components -> Identification" and you will always get :
Error: Regular expression "*" is not valid. Error Message : ?+* follows nothing in expression.
And in the TIM logs you get:
**ERROR: hub: ConfigFile: data error in /opt/CA/APM/tim/config/domainconfig.xml: error in regular expression "*" at position 0: nothing to repeat
**ERROR: hub: ConfigFile: Data error: error in regular expression "*" at position 0: nothing to repeat
Connect to the cemdb Database and run this query (as usual, a backup is recommended before any change is performed) :
select * from ts_params where ts_pattern = '*' and ts_operator='3';
--> Note 1: For ts_pattern, use the exact expression you entered initially.
--> Note 2: ts_operator = '3' is the value for action "Matches regular expression"
It will return the row for the component identification just edited. If it is the one you edited, then run this to update to a correct value:
update ts_params set
ts_pattern='.*'
where
ts_pattern='*'
and ts_params.ts_operator='3';
--> Same as before, use the exact expression you entered initially
<Please see attached file for image>
src="/servlet/servlet.FileDownload?file=0150c000004AKBlAAO" alt="Ashampoo_Snap_2017.07.28_19h16m56s_005_.png" width="590" height="411">
<Please see attached file for image>
src="/servlet/servlet.FileDownload?file=0150c000004AKBmAAO" alt="Workaround" width="603" height="406">