Skip to main content

Manual execution

For PandoraFMS_SAP_Plugin proper execution, it is necessary to indicate a series of minimum parameters for all cases.

In addition to these minimum parameters, depending on whether the plugin is executed as an agent plugin or as a server plugin, a parameter must be indicated with the module(s) from which to obtain data, as the case may be.

Lastly, and depending on the module, it is possible that it accepts additional parameters (see in following sections).

That way, the minimum mandatory parameters for any execution are:

-l "<license>" -h "<sap_host>" -c "<sap_client>" -s "<sap_system>" -u "<sap_user>" -p "<sap_password>"

For execution as a server plugin, you will also have to indicate:

-m "<plugin_module>"

While for an execution as an agent plugin, you will have to indicate:

-M "<plugin_module>"

It will also be necessary to indicate the location of the compiled "SAP JCO 3" library ("libsapjco3.so" for Linux and "sapjco3.dll" for Windows) through a Java parameter:

-Djava.library.path=<path_to_sapjco_lib_folder>

Seeing it with a couple of examples, this would be a possible execution as a server plugin:

java \
-Djava.library.path=/usr/share/pandora_server/util/plugin/PandoraFMS_SAP_Plugin/ \
-jar /usr/share/pandora_server/util/plugin/PandoraFMS_SAP_Plugin/PandoraFMS_SAP_Plugin.jar \
-l "f51a6712-a3fALLp4x0Af3vAfjr9II2f-bas1g74w"
-h "10.5.6.30" \
-c "001" \
-s "00" \
-u "PANDORA01" \
-p "P45sw0rD." \
-m "SYS_INFO"

Whose output would be:

System hostname|System IP|System ID|System instance|System version|DB hostname|DBMS|OS
server|10.5.6.30|XYZ|server_XYZ_00|46C|server|MSSQL|Windows NT

And this would be a possible execution as an agent plugin:

java \
-Djava.library.path=/usr/share/pandora_server/util/plugin/PandoraFMS_SAP_Plugin/ \
-jar /usr/share/pandora_server/util/plugin/PandoraFMS_SAP_Plugin/PandoraFMS_SAP_Plugin.jar \
-l "f51a6712-a3fALLp4x0Af3vAfjr9II2f-bas1g74w"
-h "10.5.6.30" \
-c "001" \
-s "00" \
-u "PANDORA01" \
-p "P45sw0rD." \
-M "SYS_INFO"

Whose output would be:

<module>
<name><![CDATA[SAP System info]]></name>
<type><![CDATA[generic_data_string]]></type>
<data><![CDATA[System hostname|System IP|System ID|System instance|System version|DB hostname|DBMS|OS
server|10.5.6.30|XYZ|server_XYZ_00|46C|server|MSSQL|Windows NT]]></data>
</module>

In the case of the agent plugin, and as seen in previous sections, it is possible to indicate several modules to monitor in a single execution. For example:

java \
-Djava.library.path=/usr/share/pandora_server/util/plugin/PandoraFMS_SAP_Plugin/ \
-jar /usr/share/pandora_server/util/plugin/PandoraFMS_SAP_Plugin/PandoraFMS_SAP_Plugin.jar \
-l "f51a6712-a3fALLp4x0Af3vAfjr9II2f-bas1g74w"
-h "10.5.6.30" \
-c "001" \
-s "00" \
-u "PANDORA01" \
-p "P45sw0rD." \
-M "SYS_INFO" -M "IDOC_FAIL_COUNT" -M "IDOC_OK_COUNT"

Whose output would be:

<module>
<name><![CDATA[SAP System info]]></name>
<type><![CDATA[generic_data_string]]></type>
<data><![CDATA[System hostname|System IP|System ID|System instance|System version|DB hostname|DBMS|OS
server|10.5.6.30|XYZ|server_XYZ_00|46C|server|MSSQL|Windows NT]]></data>
</module>
<module>
<name><![CDATA[IDOCs failed from yesterday - Count]]></name>
<type><![CDATA[generic_data]]></type>
<data><![CDATA[0]]></data>
</module>
<module>
<name><![CDATA[IDOCs ok from yesterday - Count]]></name>
<type><![CDATA[generic_data]]></type>
<data><![CDATA[0]]></data>
</module>