The following section explain you in great detail about how to determine the name of the SAP WAS instance to be monitored and the P4 protocol port.
By default, the name of the instance will be the SID of the SAP Web Application Server. To know the available server instances, use the Programs -> SAP Management Console menu sequence on the application server host, and open the SAP Management Console. In the tree-structure in the left pane of the console (see Figure 1), you will find a SAP Systems node. When you expand the SAP Systems node, the available server instances will appear as its sub-nodes. Make note of the name of the instance that needs to be monitored. In Figure 1, the instance that is to be monitored is EGS. When configuring the eG tests for SAP Web AS, this name should be provided as the value of the InstanceName parameter.
To know the P4 protocol port, refer to step 2 of the Enabling SAP JMX Support.