jp1pfmSuggestionExecManagerCmd
- Organization of this page
Description
This function is used to execute a given command of PFM - Manager.
Prerequisite version
-
PFM - Manager: 12-50 or later#
-
PFM - Web Console: 12-00 or later
-
JP1/IM2: 12-50 or later
- #
-
The PFM - Manager host must have JP1/Base version 12-10 or later.
Furthermore, if you use the suggestion function of JP1/IM2 in use case 1 of Performance Management, the monitored host requires PFM - Agent for Platform (of any version).
How to specify the function in the suggestion definition file
Specify necessary values for the members of the following objects to be specified in suggestion activation criteria and response action:
-
key object with the plugin type in the suggestion activation criteria
-
params object with the plugin type in the response action
The following table lists and describes the values you specify.
No. |
Member name |
Data type |
Optional |
Description |
|
---|---|---|---|---|---|
1 |
sid |
string |
No |
Specify the tree ID of the IM management node of Performance Management managed by PFM - Manager on which you want to run the command. For details on how to specify the tree ID, see Suggestion definition file settings (imdd_suggestion_arbitrary-character-string.conf). |
|
2 |
method |
string |
No |
Specify "jp1pfmSuggestionExecManagerCmd". |
|
3 |
args |
object |
No |
Specify an object with the members in No. 4 and later. |
|
4 |
commandName |
string |
No |
Specify the name of the PFM - Manager command you want to run. You can specify the name of a command stored in the following command execution path:
|
|
5 |
commandArgs |
string |
Yes |
Specify arguments of the command, separated by spaces. If you omit the arguments, the command works without them. Note that you do not have to specify the -lhost logical-host-name option because whether PFM - Manager is in a logical host environment is determined automatically. |
|
6 |
lhostOption |
boolean |
No |
Specify either of the following values depending on the specification of the command you run:
|
|
7 |
successfulReturn |
number[] |
No |
Specify the return value when the command is executed successfully as an array. |
What value is contained in the suggestion member in the response
A comparison with the array value specified in successfulReturn is made if the return value can be obtained after execution of the command. The result in the standard output is stored in suggestion when one of the array values matches the return value.
Error case
If an error occurs, the args.setError() function is called to store its message.
The following table describes causes of errors and message IDs of messages to be stored.
Cause of error |
Message ID |
---|---|
The configuration information of JP1/IM2 was changed during the processing. |
KAJY24105-E |
The args object in the suggestion definition file does not specify necessary members required. |
KAJY24113-E |
A string containing \ or / was specified for commandName in the suggestion definition file. |
|
The values specified for commandNam and commandArgs in the suggestion definition file exceed 3,072 bytes in total. |
|
Failed to run the command of PFM - Manager. |
KAJY24114-E |
An error occurred in the command of PFM - Manager. |
KAJY24115-E |
Notes
-
You can run a command in the command execution path of PFM - Manager. The commands that come with PFM - Web Console and agent products cannot be executed.
-
In a multiple-monitoring environment, the command is executed on either of the primary or secondary host. If one host is not running, it is executed on the other host.
-
This function uses the jp1Imdd.execCmd method of JP1/IM2. For details on the prerequisites and the limit values, see the topic describing the jp1Imdd.execCmd method in the manuals on JP1/IM2.
Example of how to specify in the suggestion definition file
For an example of the suggestion definition file that contains this function, see Example of suspending monitoring while a host is being maintained in Examples of suggestion definition file (imdd_suggestion_arbitrary-character-string.conf).