2 of 2 people found this helpful
Apache web based servers are complicated. There are a couple of base patterns but various technologies have plugins which are then handled by specific patterns for those technologies.
If your question is does Discovery handle MatchExpression for WebLogic then no it is not currently supported.
Hi Andrew, Thanks for the answer!
We found a possible solution by changing the TPL code "ApacheExtendedDiscovery". I include a variable to work with the result and put the code below in the TPL:
// the code below reads the "website" variable, searching for the information after the string "MatchExpression" and saving on the created variable "website_context"
website_context_raw := regex.extractAll(website, regex '(?m)^\s*MatchExpression\s*(\/.*)');
if website_context_raw then
for website_context_tmp in website_context_raw do
website_context := website_context + text.split(website_context_tmp, ' ');
// below we scan the entire "website_context" variable and fill in the variable that it displays on the ADDM screen (below):
for website_cont in website_context do
f not website_cont in website_table[website_name][ 'website_context'] then
list.append(website_table[website_name][ 'website_context'], website_cont);
- Is it the best solution we can find?
- Were we able to take these items (1 to 1) to the CMDB as a IC?
- When submitting the data in ADDM is it possible to insert line break?
1 of 1 people found this helpful
Specifically modifying standard TKU patterns is not a great idea. It makes updating them very hard.
MatchExpression is not general Apache facility so it would be a very strange place to put it.
Storing a list of results as a string with spaces is not something you would normally do.
We made a change to the original apachewebserver TPL (in test environment) and we were able to collect the apache website contexts. These contexts were created as SoftwareComponent in ADDM and sent to the BMC_ApplicationService class in the CMDB.
When creating a TPL from CMDBSYNC to send the field weblogic_cluster (field created in standard TPL to receive values from the cluster) to the existing field in CMDB in class BMC_ApplicationService and we are making an error we can not identify the cause.
Error: Change to module CMDB.ApplicationService.Extended failed because Syntax error at or near 'syncmapping' at line 10.
1 tpl 1.0 module CMDB.ApplicationService.Extended;
4 origin := "Customizada OI";
5 tree_path := "Custom","CMDB Sync", "Host", "ApplicationService Extended";
6 end metadata;
8 from CMDB.SoftwareComponent_ApplicationService import SoftwareComponent_ApplicationService 3.4;
10 syncmapping ApplicationService_Extended 1.0
12 Extend class ApplicationService, added URL attributes
15 tags CMDB, Oi, custom, extended, website;
16 end overview;
18 mapping from SoftwareComponent_ApplicationService.component as component
20 end mapping;
23 appservice := SoftwareComponent_ApplicationService.appservice;
25 if appservice = void then
26 log.info("AppService extend: Instance not found...");
28 end if;
30 if component.type <> "Apache Webserver Website Context" then
32 end if;
34 if component.weblogic_cluster then
35 appservice.Description := component.weblogic_cluster;
36 end if;
38 end body;
40 end syncmapping;
3 of 3 people found this helpful
syncmapping does not exist in tpl 1.5 where you are, for some reason, asking for tpl 1.0. Using old version of tpl removes features. Given that the earliest support Discovery version in 11.0 which is tpl 1.11 there is not really a good reason for using anything earlier than that.