Highlighted
Absent Member.. Absent Member..
Absent Member..
2020 views

Attributes not getting discovered for Linux machines

Hi,

I am using HP UD 10.10 on Windows OS.

 

I have performed the discovery for Linux devices. I am getting the data for some attributes but I am not able to get the data for below attributes.

 

 - Serial Number  - Discovered Vendor  - Discovered Model  - Domain Name

 

I have executed the below jobs

 - Ranges by ICMP  - Host Connection by Shell  - Host Resources by Shell

 

Please can you help me in resolving this issue.

 

Thanks in advance.

 

0 Likes
14 Replies
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Attributes not getting discovered for Linux machines

Some Linux systems require sudo to run dmidecode -t system

dmidecode -t system returns: Manufacturer, Product Name, Version, Serial Number, UUID, Wake-up Type

 

Also verify uname and all the uname options can be run on the Linux systems

 

Reply if dmidecode needs sudo with your Unix team or check the communication log.

 

If you see this in the communication log then you will likely need sudo:

[CDATA: dmidecode -t system | grep -A 6 "System Information" ; echo ERROR_CODE:$?]
<RESULT>[CDATA&colon; /dev/mem: Permission denied
ERROR_CODE:1]</RESULT>

 

Reply to this post if you need help with changing the scripts to use sudo for dmidecode.

 

 

Rey Lejano

effectualsystems.com
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Attributes not getting discovered for Linux machines

Hi Rey,

 

Thanks for the reply.

 

The user which I have updated in the SSH protocol is a "sudo" user(equivalent to root user) only but then also uCMDb is not retrieving the mentioned fields.

 

Thanks in advance.

0 Likes
Highlighted
New Member.

Re: Attributes not getting discovered for Linux machines

Hi Student2912,

 

Could you share with me the communicaiton log of 3 job and which CP that you are using?

 

Best regards,

Hoang.

-------------------------------------------------------------------------------
*HP Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution.*
*If you feel the post is helpful, please assign a KUDO star to say "Thanks"*
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Attributes not getting discovered for Linux machines

Hi,

 

I am using HP UD 10.10 CP 13.0.1179 on Windows OS.

 

PFA the Communication logs for Host Connection by Shell and HRA by Shell.

 

I see the below error in the Communication log for Host Connection by Shell.

<CMD>[CDATA&colon; dmidecode -t system | grep -A 6 "System Information" ; echo ERROR_CODE:$?]</CMD>
		<RESULT>[CDATA&colon; /dev/mem: Permission denied

 

I am using the sudo user in the SSH protocol.

 

Thanks in advance.

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Attributes not getting discovered for Linux machines

I mentioned that error in my post above.

 

To fix this, I edited the TTY_Connection_Utils.py and HostConnectionByShell.py scripts.

 

Its advised you create your own version of these scripts and do not alter the OOTB scripts.

So I recreated the script with a different name.

 

In your version of TTY_Connection_Utils.py find this section

 

Edit dmiDecodeCommand to the following:

 

In HostConnectionbyShell.py

Edit the 2 lines that contain the TTY_Connection_Utils so that it references the edited version:

 

and

 

 

Edit the adapter used by Host Connection by Shell to use the edited versions of the scripts

 

Rerun Host Connection by Shell.


The communication log previously errored at dmidecode:


<CMD>[CDATA&colon; dmidecode -t system | grep -A 6 "System Information" ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA&colon; /dev/mem: Permission denied
ERROR_CODE:1]</RESULT>

 

 

The script changes will return results:

 

CMD>[CDATA&colon; sudo /usr/sbin/dmidecode -t system | grep -A 6 "System Information" ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA&colon; System Information
Manufacturer: *************************************
Product Name: *******************************
Version: *************************
Serial Number: *****************************
UUID: ***********************************
Wake-up Type: *****************

ERROR_CODE:0]</RESULT>

Rey Lejano

effectualsystems.com
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Attributes not getting discovered for Linux machines

Hi Rey,

 

I tried the solution suggested by you. Created new versions of these scripts and updated the section as mentioned.

 

Replaced these scripts in the Adapter and Rerun the "Host Connection By Shell" job.

 

But received an error for the Linux CI's as below.

 

<< Progress message, Severity: Error>>
SSH: Command timed out.

 

Thanks in advance.

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Attributes not getting discovered for Linux machines

Try increasing the shell global command timeout in globalSettings.xml

 

(The full size image is attached)

 

You may have to increase the max execution timeout to accomodate the value you changed the shell Global command timeout to

Rey Lejano

effectualsystems.com
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Attributes not getting discovered for Linux machines

Hi Rey,

 

I increased the execution time parameter to 90000 at the following 3 locations.

 

- SSH protocol

- globalsettings.xml

- Adapter settings

 

Rerun the discovery job and checked the communication log and found the same error "Command time out".

 

Thanks in advance.

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Attributes not getting discovered for Linux machines

Test the command. Log into one of the remote servers with the discovery credential and run that command to see if it returns the expected output.

Rey Lejano

effectualsystems.com
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Attributes not getting discovered for Linux machines

Hi Rey,

 

I tried the below command on the remote server but it prompts me for the password and upon providing the password the command runs successfully.

 

sudo /usr/sbin/dmidecode -t system | grep -A 6 "System Information" ; echo ERROR_CODE:$?

 

 

Thanks in advance.

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: Attributes not getting discovered for Linux machines

We need to make this change so thank you for your advice.

 

Your note mentions changing the dmidecode in one place.  However, I do see that command called in other places, e.g., discoverBiosUUID, discoverHostModel, discoverManufacturer.  Shouldn't these need to change as well?

 

We are on 9.05.

 

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.