+ All Categories
Home > Documents > Technical Whitepaper€¦  · Web viewOpen the file “Hp\Systems Insight...

Technical Whitepaper€¦  · Web viewOpen the file “Hp\Systems Insight...

Date post: 19-Sep-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
9
Leveraging HP SIM Custom Tools Interrogating Onboard Administrators via SSH CLI Technical white paper Table of contents HP SIM Custom Tool..................................................................................................................... 2 Interrogation of Onboard Administrators......................................................................................... 2 Preparation.............................................................................................................................. 2 Custom Tool Creation................................................................................................................ 3 Executing the Custom Tool......................................................................................................... 6 Reports.................................................................................................................................... 7 Extensions................................................................................................................................... 8 Using Parameters with a Custom Tool.......................................................................................... 8 Call to action............................................................................................................................... 9
Transcript
Page 1: Technical Whitepaper€¦  · Web viewOpen the file “Hp\Systems Insight Manager\config\sshtools\.dtfSshKey.pub” in an editor (notepad/wordpad ….) Scroll to the end of the ssh

Leveraging HP SIM Custom ToolsInterrogating Onboard Administrators via SSH CLI

Technical white paper

Table of contents

HP SIM Custom Tool..................................................................................................................... 2

Interrogation of Onboard Administrators.........................................................................................2Preparation.............................................................................................................................. 2Custom Tool Creation................................................................................................................3Executing the Custom Tool.........................................................................................................6Reports.................................................................................................................................... 7

Extensions................................................................................................................................... 8Using Parameters with a Custom Tool..........................................................................................8

Call to action............................................................................................................................... 9

Page 2: Technical Whitepaper€¦  · Web viewOpen the file “Hp\Systems Insight Manager\config\sshtools\.dtfSshKey.pub” in an editor (notepad/wordpad ….) Scroll to the end of the ssh
Page 3: Technical Whitepaper€¦  · Web viewOpen the file “Hp\Systems Insight Manager\config\sshtools\.dtfSshKey.pub” in an editor (notepad/wordpad ….) Scroll to the end of the ssh

HP SIM Custom ToolSometimes it is very useful to collect basic information across a large fleet of server infrastructure. HP SIM provides a framework that can extend fleet operations and simplify many traditionally time consuming operational tasks.

Interrogation of Onboard Administrators.An example : find the current server assignments across a large number c-Class enclosures.While a traditional approach may be to visually inspect each OA HP SIM can be leveraged to automate this and similar tasks.

PreparationInstall the HP SIM CMS ssh public certificate in each target Onboard Administrator.

Note: This would normally be done during the enclosures initial hardware commissioning.

The following process is provided as a guide to manually retrofitting the CMS ssh key into the c-Class Onboard Administrators.

1. Open the file “Hp\Systems Insight Manager\config\sshtools\.dtfSshKey.pub” in an editor (notepad/wordpad ….)

2. Scroll to the end of the ssh key data and replace the username with Administrator.Note: In the my example I’m replacing svc_hpic with Administrator

3. Select the WHOLE line and copy it into the buffer.

4. Insert SSH Key into the OA

5. GUILog into the OA as Administrator user. Note: it MUST be Administrator or the SSH Administration function will be removed from the OA’s menu. Note: The CLI will provide an “This command is reserved for the ‘Administrator’ account.” Message

Page 4: Technical Whitepaper€¦  · Web viewOpen the file “Hp\Systems Insight Manager\config\sshtools\.dtfSshKey.pub” in an editor (notepad/wordpad ….) Scroll to the end of the ssh

Paste the text into the Authorized SSH Keys textbox and press apply

6. Via the command line / sshSsh –l Administrator <OA ip/dns name>Set script mode onAdd sshkey @@<paste in modified sshkey from buffer>@@Set script mode offexit

7. On the HP SIM server run mxagentconfig -a -o host -n <OA ip address/dns name> –p <password> -u Administrator

You should get the message “Successfully registered as an agent to:…..”

8. Now check the HP SIM -> OA ssh connectionmxagentconfig -c -n <OA ip address/dns name> -u Administrator

you should get the message “Administrator@<OA ip address/dns name> : success”

Repeat steps 4 to 7 for each OA to be managed.Note you could script this via the cli command “add sshkey …….”

Custom Tool CreationThe next step is to create a custom tool definition that will be used to launch the commands on each Onboard Administrator.

1. Select Tools / Custom Tools/ New Custom Tool from the CMS menu.

2. Step 1. – Select the “Remote Tool” option.

Page 5: Technical Whitepaper€¦  · Web viewOpen the file “Hp\Systems Insight Manager\config\sshtools\.dtfSshKey.pub” in an editor (notepad/wordpad ….) Scroll to the end of the ssh

3. Enter the following The name for the Tool “Show OA Server List” Menu Placement “Tools|Custom Tools|OA Tools” Specific User “Administrator” – this need to match the pre-installed SSH key

Command with parameters – “show server list”

4. And press ok.

You should now have a new custom tools menu similar to the following

Page 6: Technical Whitepaper€¦  · Web viewOpen the file “Hp\Systems Insight Manager\config\sshtools\.dtfSshKey.pub” in an editor (notepad/wordpad ….) Scroll to the end of the ssh
Page 7: Technical Whitepaper€¦  · Web viewOpen the file “Hp\Systems Insight Manager\config\sshtools\.dtfSshKey.pub” in an editor (notepad/wordpad ….) Scroll to the end of the ssh

Executing the Custom ToolYou can now run the command against HP SIM OA managed objects

1. Select the “Show OA Server List” custom tool from the menu as show above.

2. Select the target OAs from the CMS’s managed objects

3. Select “Run Now” or schedule for periodic reporting.Similar to other HP SIM tasks the status will be updated per OA target.

Page 8: Technical Whitepaper€¦  · Web viewOpen the file “Hp\Systems Insight Manager\config\sshtools\.dtfSshKey.pub” in an editor (notepad/wordpad ….) Scroll to the end of the ssh

Reports4. To view a Printable Report select the “View Printable Report” button.

5. Select All Systems if you have multiple OAs

6. You should see a dialog similar to the following

Page 9: Technical Whitepaper€¦  · Web viewOpen the file “Hp\Systems Insight Manager\config\sshtools\.dtfSshKey.pub” in an editor (notepad/wordpad ….) Scroll to the end of the ssh

Extensions

Using Parameters with a Custom ToolYou can make the previous script more generic by defining a Custom Tool with a command defined as “show %1”

The within the following parameter section define the %1 Parameter prompt “Show Command” and required

This allows any authorized SIM user to issue any show command to one or more managed Onboard Administrators.

For example “show fru”

Or “Show server info 1”

Page 10: Technical Whitepaper€¦  · Web viewOpen the file “Hp\Systems Insight Manager\config\sshtools\.dtfSshKey.pub” in an editor (notepad/wordpad ….) Scroll to the end of the ssh

Share with colleagues

© Copyright 20XX Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.

Trademark acknowledgments, if needed.

4AA2-xxxxENN, Month 20XX


Recommended