File Channel

Technical Prerequisites

 The technical prerequisites depend on which of the monitoring templates you want to use.

Template Technical Prerequisites
File (Diagnostic Agent) A current version of the Diagnostics agent must be installed on the host where the file is located. Please refer to SAP note 1858920 to find out how to install the latest version of the Diagnostics agent and how to access PAM to check if the Diagnostics agent is available for the operating system the host is running on. 
File (ABAP)

The following technical prerequisites need to be fulfilled to use this monitoring template:

  • Managed system has SAP Basis release ≥ 7.00
  • ST-A/PI add-on with at least version 01R needs to be installed on the managed system.

To use this monitoring template the respective managed system (i.e. the system in which the data collector is executed) requires file level access to the folder containing the file to be monitored. To test whether the collector can access this folder, you can check whether folder and file are visible in transaction AL11 of the managed systems. In addition, the user executing the data collection (user maintained in the TMW RFC destination to the managed system) needs to have the authorization to access files (authorization object S_CTS_ADMI, field CTS_ADMFCT = EPS1). See SAP note 1267908 for further details.

File (Remote)

The following technical prerequisites need to be fulfilled to use this monitoring template: 

  • SAP Solution Manager is running on SAP Solution Manager 7.1 SP 14 or higher
  • The remote server where the file is located must run an (S)FTP server

Available Monitoring Content

Monitoring Template: File (Diagnostic Agent)

The metrics are provided via a data collector on the Diagnostics agent. This agent can be deployed on numerous types of hosts and operating systems. It doesn't require any SAP system to be running on this host. So this agent can also by used to monitor non-SAP hosts.

If you want to monitor the content of XML files please refer to the monitoring template “File (ABAP)”.

Metric Name Description MAI Category Since SP

Number of Files available

Number of files which matches the configured pattern.

Availability

7.1 SP10

File Content Scanner (Average)

This metric aggregates all values in a file which are found after a specific search pattern + offset.

Exception

7.1 SP12

File Content Scanner (Sum)

This metric sums up all values in a file which are found after a specific search pattern + offset.

Exception

7.1 SP12 

Age of File

Age (in min) since last modification. If more than one file fits the pattern for the file name the time of the latest modification is returned.

Performance

7.1 SP10
Last Folder Update

This metric measures the time (in minutes) since last modification of the configured folder. Usually, the Last Modified time stamp of a folder is updated in case files within the specified folder are created or deleted.

Performance 7.2 SP05

Number of Entries within a File

Number of entries (lines) within a file.

Performance

7.1 SP12

Number of Pattern Matches within a File

Number of entries within a file which match a specific search pattern.

Performance

7.1 SP12

Size of File

Total size in Byte of the configured file(s). If more than one file fits the pattern the total size of all files is returned.

Performance

7.1 SP10

Monitoring Template: File (ABAP)

The metrics are provided via the ST-A/PI-based file monitoring functionality. Be aware that the ST-A/PI-based file monitoring is only capable to monitor files located in an ABAP-based SAP system.

Metric Name Description MAI Category Since SP

Creation time of file

This metric monitors whether the specified file exists at the specified location at the time of the data collection or at a specified point in time. Since the time stamp checked is the stamp for “change”, the monitoring effectively determines if a file was created or updated until a certain point in time.

Exceptions

7.1 SP12

Number of Pattern Matches within a File (XML)

Counts how often a pattern occurs between certain tags in an XML file.

Performance

7.1 SP12

File Content Scanner (XML)

Calculates aggregates (e.g. MIN, MAX, AVG,… ) of values occurring between specified tags in an XML file.

Exceptions

7.1 SP12

Monitoring Template: File (Remote)

This monitor uses a direct native access to the remote (S)FTP server. it is not necessary to have a diagnostics agent installed on the SFTP server. One of the Solution Manager Diagnostics agents will be used during the setup. The diagnostics agent will connect from the Solman network segment, only the access to the remote SFTP server is required (host, port). 

Metric Name Description MAI Category Since SP
Size of File This metric measures the total size in Byte of the configured file(s). Performance 7.1 SP14
File exists Availability of configured files Availability 7.1 SP14 
Age of File This metric measures the time (in min) since last modification of the configured file(s). Performance 7.1 SP14

Configuration

The Interface and Connection Monitoring setup can be accessed via SAP Solution Manager Configuration (SOLMAN_SETUP). 

To access the Integration Monitoring setup please go to SAP Solution Manager Configuration (SOLMAN_SETUP) → Application Operations → Integration Monitoring → Interface and Connections.

Note: If you didn't perform the infrastructure configuration yet, please follow the Interface and Connection Monitoring Setup with SAP Solution Manager 7.2.

Monitoring Template: File (Diagnostic Agent)

Navigate to the step 'Define Scope'. You can create a new scenario or use an existing one. Make sure the sender and the receiver system are part of the Interface and Connection Monitoring scenario.

Create the Interface Channel:

  1. Select the scenario and click 'Next'
  2. In step 'Preparation' perform all relevant manual activities and run all automatic activities.
  3. In step 'Configuration' click the 'Add' button.
    • Channel Name: Enter a meaning full name (max. 30 characters)
    • Type: Select 'File'
    • Monitoring Template: Select 'File (Diagnostic Agent)'
    • Description: Enter a description for the channel
  4. Click Next.
  5. Source type:
    • Select 'Host'
    • If the source system is not a host you have access to please select 'External Service', 'Technical System' or 'Unspecified Managed Object'.
  6. Source: Select the source host or system from the drop-down list or enter the name for the unspecified managed object
  7. Target Type:
    • Select 'Host'
    • If the target system is not a host you have access to please select 'External Service', 'Technical System' or 'Unspecified Managed Object'.
  8. Target: Select the target host or system from the drop-down list or enter the name for the unspecified managed object
  9. The measuring point is selected automatically. Please note that for this template either the target or the source system must be a host!
  10. Click Next.
  11. Click Finish.

Maintain the Interface:

  1. Select the interface channel you created
  2. On the 'Interfaces' tab click the 'Add' button.
  3. Provide the following information
    • Interface Name: The name of the interface
    • Folder (mandatory): Absolute full path to the folder containing the monitored file(s). Wildcards are not possible.
    • File name (mandatory): Regular expression for file name. Please always quote the file pattern with \Q and \E. An example would be \Qexample\.log.*\E. Variables $TODAY$ and $YESTERDAY$ can be used here. This implies to provide parameter Date pattern.
    • Include sub-folders: Check if sub-folders should be included in the monitoring
    • Date pattern (Expert field): Pattern to be applied as date format for supported variables $TODAY$ and $YESTERDAY$ in mandatory parameter File name.
      • Example for the DATAPATTERN would be e.g. : yyyyMMdd
      • Allowed characters for separating year, month and day are:
        • _ (underline)
        • - (dash)
        • . (point)
        • no separato

Select Metrics:

  1. On the tab 'Metrics' select the metrics you want to monitor. Please note that the selected metrics are collected for each file interface entered above.

  2. Enter Metric Parameters:

    • Metric: File Content Scanner (Average/Sum)
      • Parameter set name: You can enter a name for the parameter set to distinguish it if you have more than one
      • Search pattern: The pattern you want to scan the file for
      • Aggregation: SUM or AVG (this value is predefined depending on the metric selected)
      • Value length: How many characters do you want to read
      • Value offset: How many characters after the search string does the relevant content start
    • Metric: Number of Pattern Matches within a File
      • Parameter set name: You can enter a name for the parameter set to distinguish it if you have more than one
      • Search Pattern: Enter the search pattern you want to monitor for

You can maintain attributes as described in the Interface and Connection Monitoring Setup with SAP Solution Manager 7.2 on the tab 'Attributes'.

Thresholds and the collection schedule are maintained in the next step of the guided procedure. Once you have maintained all your channels, click 'Next' in the main guided procedure to move to the step 'Activation'.

Maintain Thresholds and Schedule:

  1. Select the Alert for the channel (the alert is the line with the red flash icon next to it)
    • On alert level you can maintain notification and incident message creation
  2. Select the Metrics
    • You can adjust the thresholds on the tab Thresholds.
    • Do not change the data collector type or data collector name on the tab 'Data Collection' as the monitor will not work anymore if this is changed.
    • You can change the collection interval. You can use advanced scheduling with this monitor. This allows you to monitor only at very specific times..
  3. Click 'Apply and Activate' → <Choose one option> to activate the monitoring

Monitoring Template: File (ABAP)

Navigate to the step 'Define Scope'. You can create a new scenario or use an existing one. Make sure the sender and the receiver system are part of the Interface and Connection Monitoring scenario.

Create the Interface Channel:

  1. Select the scenario and click 'Next'
  2. In step 'Preparation' perform all relevant manual activities and run all automatic activities.
  3. In step 'Configuration' click the 'Add' button.
    • Channel Name: Enter a meaning full name (max. 30 characters)
    • Type: Select 'File'
    • Monitoring Template: Select 'File (ABAP)'
    • Description: Enter a description for the channel
  4. Click Next.
  5. Source type:
    • Select 'Technical System'
    • If the source system is not an ABAP system you have access to please select 'External Service' or 'Unspecified Managed Object'.
  6. Source: Select the source system from the drop-down list or enter the name for the unspecified managed object
  7. Target Type:
    • Select 'Technical System'
    • If the target system is not an ABAP you have access to please select 'External Service' or 'Unspecified Managed Object'.
  8. Target: Select the target system from the drop-down list or enter the name for the unspecified managed object
  9. The measuring point is selected automatically. Please note that for this template either the target or the source system must be an ABAP system! If both source and target are ABAP systems you can select the measuring point as necessary.
  10. If more than one client are connected for the on premise system please select the correct client for the monitoring.
  11. Click Next.
  12. Click Finish.

Maintain the Interface:

  1. Select the interface channel you created
  2. On the 'Interfaces' tab click the 'Add' button.
  3. Provide the following information
    • Interface Name: The name of the interface
    • File Path (mandatory): Enter the exact file path (as visible in transaction AL11) for the folder containing the file. Input help is available for this field. Note that this field is limited to 75 characters. Wild cards are not supported.
    • File Name: Specify the name of the file to be monitored. You can use the wildcards (*) here. If there are multiple files with the defined file name when the collector is executed, the most recent file is taken into account. Note that this field is limited to 75 characters.
    • Pattern: If the file can be identified by a certain pattern in its file name, you can specify the pattern here. If you want to search for a pattern without specifying the file name, enter an ‘*' in the “File name” field. If the file name contains a dynamic part in regard to the date you can use the placeholders $TODAY or $YESTERDAY to identify the right files. Note that this field is limited to 75 characters.

    • User (File Creator): Maintain the user that provides the file (user name as displayed in transaction AL11). Note that this field is limited to 40 characters.

    • Application Server: The application server of the ABAP system the file is expected on.

Select Metrics:

  1. On the tab 'Metrics' select the metrics you want to monitor. Please note that the selected metrics are collected for each file interface entered above.

  2. Enter Metric Parameters:

    • Metric: Creation time of file 
      • Parameter set name: You can enter a name for the parameter set to distinguish it if you have more than one
      • File Pattern: This parameter allows the definition of a pattern in the name of the file that should be monitored. It provides the same functionality as the respective parameter on managed object level. If possible, the parameter on managed object level should be used. In this case enter a ‘*' on metric level. 

      • Expected Change Time: Maintain the point in time at which the file should have been created or updated. The format for your entry should be 'hhmmss' or 'hh:mm:ss'.

      • Stop Alerting [min.]: In case the file does not arrive or has not been updated, you can define a maximum time frame (in minutes) in which alerts are raised. Until this time has passed, each data collection for the managed object will potentially create a new alert. After this time frame has passed, alerts are no longer generated for this instance of the managed object. This value must be higher than the frequency maintained for the data collection for this managed object as otherwise alerts may not be generated.

    • Metric: Number of Pattern Matches within a File (XML)

      • Parameter set name: You can enter a name for the parameter set to distinguish it if you have more than one
      • Search pattern (mandatory, case sensitive): Pattern whose occurrence is counted

      • Parent tag name (case sensitive): Parent tag for the pattern

      • Child tag name (case sensitive): Child tag for the pattern

      • Pattern is tag name: Flag to be set if the pattern is a tag name. Enter 'X' or ' '.

      • Logical file path: If a logical file path is used (defined in transaction FILE). Enter 'X' or ' '.
    • Metric: File Content Scanner (XML)
      • Parameter set name: You can enter a name for the parameter set to distinguish it if you have more than one
      • XML tag name (mandatory, case sensitive): Name of the XML tag between which the value occurs

      • Aggregation Type (mandatory): Aggregation of the values (e.g. MIN, MAX, AVG,… ). A value help is available.

      • XML Parent tag name (case sensitive): Parent tag for the tag between which the value occurs
      • Logical file path: If a logical file path is used (defined in transaction FILE). Enter 'X' or ' '.

You can maintain attributes as described in the Interface and Connection Monitoring Setup on the tab 'Attributes'.

Thresholds and the collection schedule are maintained in the next step of the guided procedure. Once you have maintained all your channels, click 'Next' in the main guided procedure to move to the step 'Activation'.

Maintain Thresholds and Schedule:

  1. Select the Alert for the channel (the alert is the line with the red flash icon next to it)
    • On alert level you can maintain notification and incident message creation
  2. Select the Metrics
    • You can adjust the thresholds on the tab Thresholds.
    • Do not change the data collector type or data collector name on the tab 'Data Collection' as the monitor will not work anymore if this is changed.
    • You can change the collection interval. You can use advanced scheduling with this monitor. This allows you to monitor only at very specific times.
  3. Click 'Apply and Activate' → <Choose one option> to activate the monitoring

Monitoring Template: File (Remote)

Create Standalone Service:

To be able to use this monitor, you need to create an (S)FTP endpoint that points to the host with the (S)FTP server on which the files are created.

  1. Call transaction S2S_SETUP
  2. Click 'Standalone Service Operations' → 'Create Standalone Service'
  3. Select type 'Standalone (S)FTP)' and click 'Next'
  4. Enter a name and a description click 'Next'
  5. (Optional) Change the extended SID
  6. Click 'Finish' in the last step

The second step is to create the end-point for the cloud service.

Create the End-Point:

  1. Select your standalone (S)FTP service from the list and click 'Configure Standalone Service' 
  2. Configure Endpoints: Click the 'Add' button on the 'SFTP Endpoints' tab.
  3. Enter the following information:
    • Description: A meaningful description
    • User: <User>
    • Password: <Password>
    • Protocol: SFTP or FTP
    • Host: hostname of the remote host (FQDN)
    • Port: (S)FTP port of the remote host. The default FTP port is 21, the default SFTP port is 22.
    • Timezone: Select the time zone of the remote host

Navigate to the step 'Define Scope' of Interface and Connection Monitoring. You can create a new scenario or use an existing one. Make sure the sender and the receiver system are part of the Interface and Connection Monitoring scenario.

Create the Interface Channel:

  1. Select the scenario and click 'Next'
  2. In step 'Preparation' perform all relevant manual activities and run all automatic activities.
  3. In step 'Configuration' click the 'Add' button.
    • Channel Name: Enter a meaning full name (max. 30 characters)
    • Type: Select 'File'
    • Monitoring Template: Select 'File (Remote)'
    • Description: Enter a description for the channel
  4. Click Next.
  5. Source type:
    • Select the source system type
  6. Source: Select the source system from the drop-down list or enter the name for the unspecified managed object
  7. Target Type:
    • Select the target system type
  8. Target: Select the target system from the drop-down list or enter the name for the unspecified managed object
  9. For this channel type you do not select the measuring point here. The metric can be selected by any agent in the landscape. Which agent you want to use for the data collection is defined later on in the data collection setup.
  10. Click Next.
  11. Click Finish.

Maintain the Interface:

  1. Select the interface channel you created
  2. On the 'Interfaces' tab click the 'Add' button.
  3. Provide the following information
    • Interface Name: The name of the interface
    • Endpoint ID (mandatory): ID of the (S)FTP endpoint created before
    • File name (mandatory): the name of the file you want to monitor
    • Folder name (mandatory): The directory on the remote host where the file is located. You cannot use wildcards for this field.
    • Group variants?: Group metric variants if more than one file matches the selection criteria.

Select Metrics:

  1. On the tab 'Metrics' select the metrics you want to monitor. Please note that the selected metrics are collected for each file interface entered above.

You can maintain attributes as described in the Interface and Connection Monitoring Setup on the tab 'Attributes'.

 

Thresholds and the collection schedule are maintained in the next step of the guided procedure. Once you have maintained all your channels, click 'Next' in the main guided procedure to move to the step 'Activation'.

Maintain Thresholds and Schedule:

  1. Select the Alert for the channel (the alert is the line with the red flash icon next to it)
    • On alert level you can maintain notification and incident message creation
  2. Select the Metrics
    • You can adjust the thresholds on the tab Thresholds.
    • Do not change the data collector type or data collector name on the tab 'Data Collection' as the monitor will not work anymore if this is changed.
    • You can change the collection interval. You can use advanced scheduling with this monitor. This allows you to monitor only at very specific times.
    • On the tab 'Overview' you have to select which 'Collector Context' you want to use for the data collection. The collector context defines the diagnostics agent that will perform the data collection. Per default the diagnostics agent on SAP Solution Manager will perform the data collection. You can choose from the following options:
      • Source: the diagnostics agent on the source system (must be type 'Host' or 'Technical System')
      • Target: the diagnostics agent on the target system (must be type 'Host' or 'Technical System')
      • Solution Manager: the diagnostics agent on SAP Solution Manager
      • Host: any host in the managed system landscape
      • System: any system in the managed system landscape
  3. Click 'Apply and Activate' → <Choose one option> to activate the monitoring

 

Note: Advanced Configuration for Collector Context

If you select another collector context, e.g. if you have a specific agent installed on a host or system you want to use or if you need to use another agent because network restrictions on the SAP Solution Manager agents.

However to enable another host or system to collect the information you have to move the (S)FTP configuration. Per default when you maintain an (S)FTP standalone server in transaction S2S_SETUP the login and connection information to the (S)FTP server are stored in the scope of the Solution Manager diagnostic agent(s).

The easiest way to enable the complete free selection of agents and systems is to move this configuration to the "Global" scope where it is accessible for all agents. 

  1. Open the Diagnostics Agent Administration and navigate to the 'Application Configuration' tab 
  2. Select the agent application com.sap.smd.agent.application.global.configuration
  3. Select the agent on SAP Solution Manager for the scope
  4. You will find the following entries in this agents configuration
    • FTP_SFTP_<X>/host = hostname of the remote host (FQDN)
    • FTP_SFTP_<X>/password = <password>
    • FTP_SFTP_<X>/port = (S)FTP port of the remote host
    • FTP_SFTP_<X>/protocol = FTP or SFTP
    • FTP_SFTP_<X>/timezone = time zone of the remote host
    • FTP_SFTP_<X>/user = <user>
  5. Note down this information
  6. Switch back to <Global> scope
  7. Switch to Edit mode
  8. Add the properties above to the global scope
    • Make sure to select "Secure Property" when you enter the password.
  9. Save to push the new properties to all agents.

If you only want to save the properties on a specific agent you could do this as well. It is done the exact same way, just instead of the "Global" scope you select the scope of the agent you want to change.

After saving you can select whatever agent has the configuration in the scope selection of the interface channel activation. Please note, that only hosts and systems that have SMD agents installed will work.