Plugin parameters
PandoraFMS_SAP_Plugin has the following parameters for its manual execution:
Paramter | Description |
-l "<license>" |
It indicates the plugin the license it will use to run it. If the license is not valid, the plugin will display an error. For example:
-l "f51a6712-a3fALLp4x0Af3vAfjr9II2f-bas1g74w" |
-h "<sap_host>" |
It indicates the plugin the IP or DNS name of the SAP server to connect to. For example:
-h "10.5.6.30" |
-c "<sap_client>" |
It indicates the plugin the SAP client (client) number for the connection. For example:
-c "001" |
-s "<sap_system>" |
It indicates the plugin the SAP system number for the connection. This parameter will determine the port used in communication with SAP. For example:
-s "00" |
-u "<sap_user>" |
It indicates the plugin the SAP user for the connection. For example:
-u "PANDORA01" |
-p "<sap_password>" or -x "<sap_password_encrypted>" |
It indicates the plugin the password of the previous SAP user. For example:
-p "P45sw0rD." or -x "bSg8XKC63rhGfXHgjzSCMQ" |
-X "<sap_password>" |
Instead of launching the plugin to monitor a SAP server, it produces the encrypted password as output, to launch the plugin with the parameter "-x" instead of "-p". For example:
-X "P45sw0rD." |
-P "<sap_snc_partner_name>" |
A valid SAP server SNC name, which is equal to Distinguished Name(DN) of SAP server PSE.
-P "CN=SDD, OU=SAP Web AS, O=SAP Trust" |
-Q "<sap_snc_qop>" |
It is a parameter that defines the level of security applied in communication between SAP systems using Secure Network Communications (SNC). Valid values are:
-Q "3" |
-N "<sap_snc_client_name>" |
A valid client SNC name, which is equal to Distinguished Name(DN) of client PSE.
-N "CN=UDD, OU=SAP Web AS, O=SAP Trust" |
-m "<plugin_module>" |
It indicates the plugin the ID of the module from which data is to be obtained (see table below) in an execution as a server plugin. For example:
-m "SYS_INFO" |
-M "<plugin_module>" |
It indicates the plugin the IDs of the modules from which data is to be obtained (see table below) in an execution as an agent plugin. Not all module IDs support this mode, and do not support custom filters or conditions. This parameter can be used multiple times in a single run to indicate multiple modules. For example:
-M "SYS_INFO" -M "IDOC_FAIL_COUNT" |
-R "<sap_rfc_function>" |
In server plugin mode, for the module IDs that support it, it indicates the SAP RFC function to execute to obtain the data. For example:
-R "TH_WPINFO" |
-T "<sap_rfc_table>" |
In server plugin mode, for the module IDs that support it, it indicates the name of the SAP table from which to obtain the data. For example:
-T "WPLIST" |
-S "<sap_rfc_structure>" |
In server plugin mode, for the module IDs that support it, it indicates the name of the SAP structure from which to obtain the data. For example:
-S "MSSDBLOGSIZE" |
-F "<sap_field_1>,...,<sap_field_N>" |
In server plugin mode, for the module IDs that support it, it indicates the fields of the previous table or structure separated by commas "," from which you want to obtain the data. For example:
-F "WP_TYP,WP_ISTATUS" |
-W "<sap_filter_condition>" or -W "<plugin_filter_condition>" or -W "<ztransaction_table_input>" |
In server plugin mode, for the module IDs that support it, it indicates filters for query conditions to SAP tables or filters for conditions in other types of plugin queries (depending on the module ID). This parameter can be specified multiple times for multiple conditions. The format for each of these conditions is described below. For example:
-W "STATUS EQ 'F'" -W "AND JOBNAME LIKE 'Z%'" or -W "WP_ISTATUS,EQ,2" -W "WP_ITYPE,EQ,1" or -W "TT_OPTIONS,TEXT,STATUS EQ 'F'" -W "TT_OPTIONS,TEXT,TT_OPTIONS,TEXT,AND JOBNAME LIKE 'Z%'" |
-I "<plugin_rfc_input>" |
In server plugin mode, for the module IDs that support it, they indicate inputs for the execution of the RFC functions. This parameter can be specified multiple times for multiple inputs. The format for these inputs is described later. For example:
-I "TABLE_NAME,USR04" -I "DBNAME,XYZ" |
-L "<seconds>" |
In server plugin mode, for the module IDs that support it, it indicates the number of seconds from the current moment backwards in which data will be searched. Its default value is "86400". For example:
-L "21600" |
-C "<string>" |
In server plugin mode, for the module IDs that support it, it indicates a text (as a filter) that the results of the RFC query must contain to be returned by the plugin. For example:
-C "USER01" |
-Z "<sap_z_transaction_function_module>" |
In server plugin mode, for the IDs of modules that allow it, indicate the number of the functional module that launches a transaction Z of SAP to obtain the data. For example:
-Z "Z_CHECK_STATUS" |
-D "<delimiter>" |
For the module IDs that support it, it indicates the field delimiter character for the outputs produced by the plugin that have a table format. Its default value is "|". For example:
-D ";" |
-H "<1 | 0>" |
For the module IDs that support it, it indicates whether you want to obtain the table header in the plugin output or not for all those outputs produced by the plugin that have a table format. It admits the values "0" (do not show the header) or "1" (show the header). Its default value is "1". For example:
-H "0" |
- -W parameter format
The "-W" parameter can be used for different plugin modules, admitting 2 different formats in each case:
-
- Format for modules "RFC_READTABLE_COUNT", "RFC_READTABLE_TABLE" and "RFC_READTABLE_GROUPTABLE" (table queries):
In the queries made to SAP tables, the conditions that must be indicated comply with the format expected by the "RFC_READ_TABLE" function, which would correspond to:
FIELD OPERATOR 'VALUE'
If multiple "-W" parameters are indicated, it may be necessary to indicate in the consecutive conditions whether they are joined by means of the "AND" or "OR" logical comparators. Note that SAP will evaluate the conditions in the order listed. For example:
-W "FIELD OPERATOR 'VALUE'" -W "AND FIELD OPERATOR 'VALUE'" -W "OR FIELD OPERATOR 'VALUE'"
It would be equivalent to a single condition:
-W "FIELD OPERATOR 'VALUE' AND FIELD OPERATOR 'VALUE' OR FIELD OPERATOR 'VALUE'"
Due to socket limitations, a single condition indicated in a "-W" parameter cannot exceed 70 characters. If you need to indicate longer conditions try concatenating them by using multiple "-W" parameters and using "AND" and "OR" logical comparators.
Example of actual condition:
-W "SEQNO EQ '000'" -W "AND DATUM GE '_1_DAYSAGO_'"
-
- Format for the "RFC_Z_TRANS" module:
- In Z transactions (SAP custom function modules) it may be necessary to send data to tables as input parameters, for which the following format must be used:
TABLE,FIELD,VALUE
- In the case of indicating multiple "-W" parameters that refer to the same field of the same table, each of the values will be added to said field on a new line.
- Example of actual condition:
-W "TT_OPTIONS,TEXT,SEQNO EQ '000'" -W "TT_OPTIONS,TEXT,AND DATUM GE '_1_DAYSAGO_'"
-
- Format for the rest of the modules:
For modules that are not queries to SAP tables through the "RFC_READ_TABLE" function, the format of the filters must be:
FIELD,OPERATOR,VALUE
For these cases, if multiple "-W" parameters are indicated, it will be considered that all the conditions must be met at the same time (as if they were concatenated with logical "AND" operators).
Example of actual condition:
-W "WP_ISTATUS,EQ,16" -W "WP_ITYPE,EQ,1"
The "FIELD" will depend on the SAP table or structure consulted, for example it could be the "STATUS" field of the "TBTCO" table. There are several pages where you can check the available fields of SAP tables, such as:
The "OPERATOR" determines the type of comparison to be made between the indicated "FIELD" and "VALUE". The possible operators are:
-
- EQ: The value of the field must be equal to the indicated value.
- NE: The value of the field must be different from the indicated value.
- LT: The value of the field must be less than the indicated value. In table queries using "RFC_READ_TABLE", if the field to be compares is a date or time, the oldest dates or times are lower than the most recent dates or times.
- LE: The value of the field must be less than or equal to the indicated value. In table queries using "RFC_READ_TABLE", if the field to be compared is a date or time, the oldest dates or times are lower than the most recent dates or times.
- GT: The value of the field must be greater than the indicated value. In table queries using "RFC_READ_TABLE", if the field to be compared is a date or time, the most recent dates or times are greater than the oldest dates or times.
- GE: The value of the field must be greater than or equal to the indicated value. In table queries using "RFC_READ_TABLE", if the field to be compared is a date or time, the most recent dates or times are greater than the oldest dates or times.
- LIKE: The value of the field must be adjusted to the expression of the indicated value. Only available for table queries (RFC_READ_TABLE).
The indicated "VALUE" allows applying the filter (condition) of the query results according to its "OPERATOR". It is recommended to always encapsulate values in single quotes in SAP table queries with "RFC_READ_TABLE".
With the "LIKE" "OPERATOR", the indicated expressions allow the use of the character "%" to determine that it can be any character from 0 to N times. For example:
Z% : It allows indicating that the field with which it is compared must have a value that at least begins with the letter Z, and may or may not have more characters after it.
For the "DATS" or "TIMS" "FIELDS" (SAP tables fields) macros can be used to be replaced by the corresponding date and time (according to the macro) regarding the date and time of the plugin execution time, which allow you to apply dynamic filters with the correct format for these types of SAP fields.
-
- Macros for "DATS" fields:
- _N_DAYSAGO_: N days ago date.
- _N_WEEKSAGO_: N weeks ago date.
- Macros for "TIMS" fields:
- _N_SECSAGO_: N seconds ago time.
- _N_MINSAGO_: N minutes ago time.
- _N_HOURSAGO_: N hours ago time.
- Macros for "DATS" fields:
For all macros, "N" can be replaced by a positive integer or 0.
"DATS" fields have the format "YYYYMMDD", and therefore the macros for "DATS" fields will be replaced with values in that format, being:
-
-
- YYYY: The year with 4 digits, for example "2022".
- MM: The month with 2 digits, for example "05".
- DD: The day of the month with 2 digits, for example "13".
-
"TIMS" fields have the format "hhmmss", and therefore the macros for "TIMS" fields will be replaced with values in that format, being:
-
-
- hh: The hour with 2 digits in 24-hour format, for example "13".
- mm: The minutes with 2 digits, for example "08".
- ss: The seconds with 2 digits, for example "51".
-
- -I parameter format
The format that the "-I" parameters must have is as follows:
INPUT,VALUE
The "INPUT" will depend on the SAP function queried, for example it could be the "TABLE_NAME" input of the "RFC_GET_TABLE_ENTRIES" function. There are several pages where you can check the available "input" entries of SAP functions, such as:
The "VALUE" indicated is the one that will be assigned to the "INPUT" when executing the corresponding RFC function.
Actual "input" example:
-I "TABLE_NAME,USR04"
The "-I" parameters also support the use of macros with the same format as those used for the "-W" parameters: "_N_SECSAGO_", "_N_MINSAGO_", "_N_HOURSAGO_", "_N_DAYSAGO_" and "_N_WEEKSAGO_" (see point above for details).