Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
- Adding scripts to extensible discovery
- Scripts provided with extensible discovery
- Software policies provided with extensible discovery
- Writing your own scripts for extensible discovery
- Adding your own scripts to extensible discovery
- Upgrading your scripts in extensible discovery
- Removing your scripts from managed servers
- Output from extensible discovery scripts
Adding your own scripts to extensible discovery
To customize extensible discovery, you need to write one or more scripts that gather the custom data you want, then import your scripts into SA. For requirements and guidelines on writing scripts, see Writing your own scripts for extensible discovery.
- This section presumes you are familiar with software policies. For details on software policies, see "Software management" in the SA 10.50 User Guide.
- To add scripts to Extensible Discovery, you must have write access to the Extensible Discovery folder and the ability to create software policies. For more information on permissions, see the SA 10.50 Administration Guide.
To create and add your script to Extensible Discovery:
- Decide where you want the output of your script to go. It can go either in a custom attribute or in a custom field.
- For more information on custom attributes, see Custom attributes defined for a server.
- For more information on custom fields, see Custom fields.
- Decide on the name of the custom attribute or custom field. Extensible Discovery will place the output of your script in the named custom attribute or custom field.
- For a custom attribute, the name will be in the following format: HPSW_ED_<name> where <name> is any string you choose.
- For a custom field, use any value for the <name> of the custom field.
You must use the <name> string in the name of your script as described in the steps below.
- Write your script such that the output of the script is the data you want to capture. You can write any of the following types of scripts:
- UNIX shell scripts in a file ending with
.sh
. - Visual Basic scripts in a file ending with
.vbs
. - Windows batch scripts in a file ending with
.bat
.
For more information how to write these scripts for Extensible Discovery, see Writing your own scripts for extensible discovery.
- UNIX shell scripts in a file ending with
- Test your script to make sure it is functioning properly.
- Name your script
get_<name>.sh
orget_<name>.vbs
orget_<name>.bat
, where<name>
is from step 2. Extensible Discovery uses <name> to locate the custom attribute or custom field for the output of the script. - Make sure your script file has execute permissions. For example, for UNIX scripts use the
chmod
command. - If you want the output to go into a custom attribute, skip this step and go to step 8 below. Extensible Discovery creates and places the output in the custom attribute named
HPSW_ED_<name>
by default.
If you want the output to go to a custom field, you must create a custom field named “<name>
” where<name>
is the string you used in step 2 and step 5 above. Extensible Discovery first checks for an existing custom field of the specified name. If that custom field exists, Extensible Discovery places the script output there. If that custom field does not exist, Extensible Discovery creates and stores the output in a custom attribute named “HPSW_ED_<name>
”.
For example, if you create a script namedget_mysysdata.sh
, the output from the script will be placed into the custom field namedmysysdata
, if it exists. Otherwise the output will be placed in the custom attribute namedHPSW_ED_mysysdata
.
For instruction on creating custom fields, see Custom fields. - Wrap your script into a .zip file. Include any other files your script needs in the .zip file.
As a best practice, include a version string in the name of your .zip file and increment the version string with each subsequent version of your script. For more information, see Upgrading your scripts in extensible discovery. - Import your .zip file into a package in SA.
For convenience, you can place your packages in /Opsware/Tools/Extensible Discovery/Customer Provided Components
. Make sure your imported package specifies the proper target operating system.
For instructions on importing packages, see "Software management" in the SA 10.50 User Guide. - Open your package in the SA Client and set the Default Install Path property to one of the following and save your changes.
- UNIX:
/var/opt/opsware/extensible_discovery/scripts
- Windows:
%ProgramFiles%\Common Files\Opsware\extensible_discovery\scripts\. SA replaces %ProgramFiles%
with the appropriate system Program Files directory.
- UNIX:
-
Add your package to a software policy. Add it either to the software policy named “Customer Provided Scripts” or add it to your own software policy.
Extensible Discovery remediates the “Customer Provided Scripts” policy by default whenever it runs.Note
Make sure the software policy to which you add your package has the proper target operating system(s). Note that any user who has write access to the “Customer Provided Components” folder can run arbitrary code on any servers that Extensible Discovery is run on. For greater security, use your own software policy and set security on your software policy to meet your security requirements. - If you added your script to your own software policy, you must remediate your policy on all servers where you want Extensible Discovery to run.
If you added your script to the policy named “Customer Provided Scripts”, you can skip this step. - Run your script as described in Running extensible discovery on managed servers below.
If you intend to use a custom field but inadvertently run your script without having created the custom field and it creates custom attributes on many servers, you can use the following OGSH command to remove the custom attributes from all servers.rm /opsw/Server/@/*/CustAttr/<custom attribute name>
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to hpe_sa_docs@hpe.com.
Help Topic ID:
Product:
Topic Title:
Feedback: