Highlighted
Absent Member.. Absent Member..
Absent Member..
219 views

WebSphere discovery - Need to get the Installation Type - ND or BASE?

Jump to solution

Hi!

We run uCMDB 9.05, CUP14 with CP11

 

I need to get a value (attribute) from ouer WebSphere discovery
The value i need is if the installation is "Network Deployed" or "Base"

The value exsist in the communication log when i run the "J2EE WebSphere by Shell or JMX" job
When the job is finished, the information is also included in the CIT "Configuration Document" as "report.txt" but the file must be opened manually in uCMDB (right click on "report.txt" and then "open")

How do i do to make this value to an attribute?

 

I also attached an example of the file "report.txt"

 

Regards

Laos

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: WebSphere discovery - Need to get the Installation Type - ND or BASE?

Jump to solution

Thanks for your help Ana-Costa!


However, i must ask a colleague and find out if he can help me to get the script to work because i have no idea what script i should modify and how i then get uCMDB to find the value!


Would be grateful if you (or anyone else) have more knowledge about that and can share

 

 

/Laos

View solution in original post

0 Likes
6 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: WebSphere discovery - Need to get the Installation Type - ND or BASE?

Jump to solution

Hello Laos,

 

I will try to reproduce your scenario in our labs, and get back to you with the results.

 

Regards,

Ana Acosta-Diaz

"HP Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: WebSphere discovery - Need to get the Installation Type - ND or BASE?

Jump to solution

Hi Laos,

 

To populate an attribute, you can use jython function

osh.setAttribute(attributeName, attributeValue)

Can you further elaborate on the following tasks you would like to accomplish, do you want to populate the attribute with string “Network Deployed”, or “Base”, also with respect to the info being included in a file “report.txt”?

 

Regards,

Ana Acosta-Diaz

"HP Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: WebSphere discovery - Need to get the Installation Type - ND or BASE?

Jump to solution

Hello Ana-Acosta and thanks for your help!

 

What I want to achieve is the following
In the file report.txt (I´ve marked the line in BOLD, se below) there is an "ID" attribute the ID value could be either "ND" or "BASE" that is the value i want to achieve

 

--------------------------------------------------------------------------------
IBM WebSphere Application Server Product Installation Status Report
--------------------------------------------------------------------------------

Report at date and time February 24, 2014 2:15:23 PM CET

Installation
--------------------------------------------------------------------------------
Product Directory /opt/WebSphere/v6.1/AppServer
Version Directory /opt/WebSphere/v6.1/AppServer/properties/version
DTD Directory /opt/WebSphere/v6.1/AppServer/properties/version/dtd
Log Directory /opt/WebSphere/v6.1/AppServer/logs
Backup Directory /opt/WebSphere/v6.1/AppServer/properties/version/nif/backup
TMP Directory /var/tmp

Product List
--------------------------------------------------------------------------------
ND installed
WEBSERVICES installed

Installed Product
--------------------------------------------------------------------------------
Name IBM WebSphere Application Server - ND
Version 6.1.0.21
ID ND
Build Level cf210844.13
Build Date 11/6/08

Installed Product
--------------------------------------------------------------------------------
Name WebServices Feature Pack
Version 6.1.0.21
ID WEBSERVICES
Build Level cf210844.03
Build Date 11/6/08

--------------------------------------------------------------------------------
End Installation Status Report
--------------------------------------------------------------------------------

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: WebSphere discovery - Need to get the Installation Type - ND or BASE?

Jump to solution

Hi Laos,

 

Thanks for your response.

In that case, you can use a variable to hold the content of the file then use a regular expression to find those string. 

For example, say the content of the file can be obtain using type command.  Below is an example (please note you will need to refine to make it work):

 

fileContent = type(filename)

ID = None

ID = re.match('(ID ND)', fileContent)

 

If (ID == None):

                ID = re.match('(ID BASE)', fileContent)

 

 

If ID is not None:

                Osh.setattributeValue(‘myAttrib’, ID)

 

 

 

Hope this helps,

Ana Acosta-Diaz

"HP Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: WebSphere discovery - Need to get the Installation Type - ND or BASE?

Jump to solution

Thanks for your help Ana-Costa!


However, i must ask a colleague and find out if he can help me to get the script to work because i have no idea what script i should modify and how i then get uCMDB to find the value!


Would be grateful if you (or anyone else) have more knowledge about that and can share

 

 

/Laos

View solution in original post

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: WebSphere discovery - Need to get the Installation Type - ND or BASE?

Jump to solution

solved the problem!


perhaps not the finest solution but i replaced

"reportFile.description = 'Websphere server version report" "at line 199 in the script file "JMX_J2EE_WebSphere.py" to 

 

                              if re.search ('ID \ s + ND', role.serverVersionInfo):
                                 reportFile.description = 'Network Deployed'
                             else:
                                 reportFile.description = 'BASE'


Thanks for all help Ana Acosta!

 

Best regards
Laos

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.