SAP B1 DI API Log Test

SAP Business One relies on two interfaces (APIs) to enable numerous integrations or add-ons:

  • SAP HANA Service Layer API provides the ability to create mobile apps aimed at SAP Business One data and services via such open core protocols as HTTP and ODATA.

  • SAP Business One DI API, on the other side, enables developers to manipulate SAP data – read, write, update, and remove it – on the database level via objects and methods.

By default, log files are created by both SAP Business One and the components with which SAP Business One is integrated such as add-ons. These log files are stored in the same directory i.e., same location of the SAP Business One installation.

These log files provide a host of information which may help administrators in gauging the performance of the DI API when integrated with SAP Business One at periodic intervals. Too many errors or warnings that are logged in the log files when left unnoticed may halt the functioning of the target SAP Business One abruptly. To avoid such abrupt failures/stops, it is essential to periodically take stock of the error and warning messages logged in the DI API log files. The SAP B1 DI API Log test helps administrators in this regard!

This test monitors logs from client types that deal with DI API. These client types include :B1 Studio Shell, Java B1 logger and DTW B1 logger. The test scans these logs for specific patterns of messages and reports the count of error and general information messages that match the configured patterns. This way, the test pinpoints critical errors that the SAP Business One may have experienced recently and reveals the clients that were affected more frequently.

Target of the test : A SAP Business One

Agent deploying the test : An internal/remote agent

Outputs of the test : One set of results for the Server Abbreviation configured.

Configurable parameters for the test
Parameter Description

Test Period

How often should the test be executed

Host

Host name of the server for which the test is to be configured.

Port

Enter the port to which the specified host listens.

Log Directory

This is the directory to which logs from various nodes installed on a host are written. Typically, these logs are written to ‘*.log.csv’ files in the ‘logging’ directory of the SAP Business One installation. If SAP Business One is installed in the C drive of a Windows host and a user named Admin is authorized to that directory, the logging directory will be available in the following location by default: C:\ProgramData\SAP\SAP Business One\Log\SAP Business One\Administrator\DIAPI

Server Abbreviations

Log file names are generally of the following format : <Client type>.<Client name>.<YYYYMMdd>_<HHmmss>.pid<process id >.log.csv For e.g., DTW.b1logger.20171129_154214.pid8232.log is one of the log files from the DTW B1 logger client process running in the SAP Business One. Server abbreviation in this case is DTW.b1logger. The default value for this parameter has hence been set as a comma separated list of server descriptions and their abbreviations as follows : <server description>:<server abbreviation>.  By default, this parameter has been set as: B1Studio.Shell.b1logger:B1Studio.Shell.b1logger*.csv,

java.b1logger:java.b1logger*.csv,DTW.b1logger:DTW.b1logger*.csv.

SearchPattern

Enter the specific patterns of messages to be monitored. The pattern should be in the following format: <PatternName>:<Pattern>, where <PatternName> is the pattern name that will be displayed in the monitor interface and <Pattern> is an expression of the form - *expr* or expr or *expr or expr*, etc. A leading '*' signifies any number of leading characters, while a trailing '*' signifies any number of trailing characters.  

For example, say you specify ORA:ORA-* in the SearchPattern text box. This indicates that "ORA" is the pattern name to be displayed in the monitor interface. "ORA-*" indicates that the test will monitor only those lines in the log file which start with the term "ORA-". Similarly, if your pattern specification reads: offline:*offline, then it means that the pattern name is offline and that the test will monitor those lines in the log file which end with the term offline.

A single pattern may also be of the form e1+e2, where + signifies an OR condition. That is, the <PatternName> is matched if either e1 is true or e2 is true.

Multiple search patterns can be specified as a comma-separated list. For example: ORA:ORA-*,offline:*offline*,online:*online.

Each of these patterns will be searched for in every log file that is present in the configured Log Directory.

Lines

Specify two numbers in the format x:y. This means that when a line in the log file matches a particular pattern, then x lines before the matched line and y lines after the matched line will be reported in the detail diagnosis output (in addition to the matched line). The default value here is 0:0. Multiple entries can be provided as a comma-separated list. 

If you give 1:1 as the value for Lines, then this value will be applied to all the patterns specified in the SearchPattern field. If you give 0:0,1:1,2:1 as the value for Lines and if the corresponding value in the SearchPattern field is like ORA:ORA-*,offline:*offline*,online:*online then:

0:0 will be applied to ORA:ORA-* pattern

1:1 will be applied to offline:*offline* pattern

2:1 will be applied to online:*online pattern

Rotating File

This flag governs the display of descriptors for this test in the eG monitoring console.

If this flag is set to True, the descriptors of this test will be displayed in the following format: <Full_Path_to_LogDirectory>:<ServerAbbreviation>. For instance, if the Log Directory parameter is set to c:\SAPBOBI\logs and RotatingFile is set to True, then, your descriptor will be of the following format: c:\SAPBOBI\logs:<ServerAbbreviation>. On the other hand, if the RotatingFile flag had been set to False, then the descriptors will be of the following format: <LogDirectory>:<ServerAbbreviation> - i.e., logs:<ServerAbbreviation> in the case of the example above. 

Exclude Pattern

Provide a comma-separated list of patterns to be excluded from monitoring in the ExcludePattern text box. For example *critical*,*exception*. By default, this parameter is set to 'none'

Unique Match

By default, the UniqueMatch parameter is set to False, indicating that, by default, the test checks every line in the log file for the existence of each of the configured SearchPatterns. By setting this parameter to True, you can instruct the test to ignore a line and move to the next as soon as a match for one of the configured patterns is found in that line. For example, assume that Pattern1:*fatal*,Pattern2:*error* is the SearchPattern that has been configured. If UniqueMatch is set to False, then the test will read every line in the log file completely to check for the existence of messages embedding the strings 'fatal' and 'error'. If both the patterns are detected in the same line, then the number of matches will be incremented by 2. On the other hand, if UniqueMatch is set to True, then the test will read a line only until a match for one of the configured patterns is found and not both. This means that even if the strings 'fatal' and 'error' follow one another in the same line, the test will consider only the first match and not the next. The match count in this case will therefore be incremented by only 1.

UseUTF8

If UTF-8 encoding is to be used for reading the log files in the configured log directory, then, set the UseUTF8 flag to True. By default, this flag is set to False.

UseUTF16

If UTF-16 encoding is to be used for reading the log files in the configured log directory, then, set the USEUTF16 flag to True. By default, this flag is set to False.

EncodeFormat

By default, this is set to none, indicating that no encoding format applies by default. However, if the test has to use a specific encoding format for reading from the log files in the log directory, then you will have to provide a valid encoding format here - eg., UTF-8. 

DD Frequency

Refers to the frequency with which detailed diagnosis measures are to be generated for this test. The default is 1:1. This indicates that, by default, detailed measures will be generated every time this test runs, and also every time the test detects a problem. You can modify this frequency, if you so desire. Also, if you intend to disable the detailed diagnosis capability for this test, you can do so by specifying none against DD frequency.

Detailed Diagnosis

To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

  • The eG manager license should allow the detailed diagnosis capability
  • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Total messages

Indicates the total number of messages recorded during the last measurement period.

Number

 

Total message rate

Indicates the rate at which messages were recorded during the last measurement period.

Messages/min

 

Warning messages

Indicates the number of warning messages recorded during the last measurement period.

Number

Compare the value of this measure across the server abbreviations to identify the client for which maximum number of warning messages were recorded.

The detailed diagnosis of this measure lists the timestamp, message source, message type, message, thread ID, file, line, instance ID, message ID, application area, process ID, business object, business object ID and whether the message is customized or not.

Warning message rate

Indicates the rate at which warning messages were recorded during the last measurement period.

Messages/min

 

Error messages

Indicates the number of error log messages recorded during the last measurement period.

Number

Ideally, the value of this measure should be zero.

Compare the value of this measure across the server abbreviations to identify the client that is error-prone.

The detailed diagnosis of this measure lists the timestamp, message source, message type, message, thread ID, file, line, instance ID, message ID, application area, process ID, business object, business object ID and whether the message is customized or not.

Error messages rate

Indicates the rate at which error log messages were recorded during the last measurement period.

Messages/min

 

Critical error messages

Indicates the number of critical error messages recorded during the last measurement period.

Number

Ideally, the value of this measure should be zero.

When a critical error occurs, SAP Business One stops.

Compare the value of this measure across the server abbreviations to identify the client for which maximum number of critical error messages were recorded. This will help administrators identify the client that is error prone more frequently.

The detailed diagnosis of this measure lists the timestamp, message source, message type, message, thread ID, file, line, instance ID, message ID, application area, process ID, business object, business object ID and whether the message is customized or not.

Audit fail messages

Indicates the number of audit failure messages i.e., the messages recorded for failed logins during the last measurement period.

Number

Compare the value of this measure across the server abbreviations to identify the client for which maximum number of audit failure messages were recorded.

The detailed diagnosis of this measure lists the timestamp, message source, message type, message, thread ID, file, line, instance ID, message ID, application area, process ID, business object, business object ID and whether the message is customized or not.

Note messages

Indicates the number of note messages i.e., additional internal log messages that were recorded during the last measurement period.

Number

 

Audit success messages

Indicates the number audit success messages i.e., messages recorded for successful logins during the last measurement period.

Number

 

Protective messages

Indicates the number of protective log messages recorded during the last measurement period.

Number

 

Logged-always messages

Indicates the number of 'Always-Logged' messages recorded during the last measurement period.

Number

 

Full information messages

Indicates the number of full information messages recorded during the last measurement period.

Number

 

Trace messages

Indicates the number of trace messages recorded during the last measurement period.

Number