Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configuring Flat-File Accounting for Extensible Subscriber Services Management

Flat-file accounting is typically used to collect and archive various accounting statistics on logical interfaces for Extensible Subscriber Services Manager (ESSM) business subscribers. Other applications include accounting for wholesaler and retailer subscriber activity in a Layer 2 wholesale environment. Starting in Junos OS Release 16.1R4, you can create a flat-file profile to use as a template to define attributes for accounting flat files. The profile specifies the following:

  • The statistics fields that are collected.

  • The filename where the statistics are logged.

  • The format of the file, the interval at which the statistics are collected.

  • The name of the XML schema file that specifies the contents of the accounting file.

You can configure multiple accounting profiles with different combinations of fields for specific accounting requirements, and then assign the profiles as needed to provisioned interfaces to satisfy the accounting requirements for each interface depending on how it is used.

A given flat-file profile can be assigned to both use cases; for example, by specifying all-fields for a global or group level. In this case, the fields you configure appear in the accounting record only if they make sense in the context.

Best Practice:

We recommend you use separate flat-file profiles for ESSM business subscriber logical interfaces and Layer 2 wholesale core-facing physical interfaces.

To configure flat-file accounting for ESSM business services:

  1. Create a flat-file profile.
  2. (Optional) Configure the name of the XML schema for the accounting flat file.
  3. Specify the filename for the accounting file.
  4. Specify the general, nonstatistical parameters for the accounting file that are displayed as part of the accounting record header.
    Best Practice:

    We recommend that you include the following general parameter fields in flat-file profiles for ESSM subscribers:

    • General parameter fields: accounting-type, descr, line-id, logical-interface, nas-port-id, timestamp, and vlan-id

  5. Specify the accounting statistics that are collected and recorded in the accounting file.
    Best Practice:

    We recommend that you include the following statistics fields in flat-file profiles for core-facing physical interfaces:

    • Egress statistics fields: all-fields

    • Ingress statistics fields: all-fields

    • Overall packet fields: all-fields

  6. (Optional) Specify the format of the accounting file.
  7. (Optional) Specify the interval at which the Packet Forwarding Engine associated with the interface is polled for the statistics specified in the profile.
    Note:

    When you do not configure this option, the polling interval is 15 minutes.

  8. Configure the maximum size of the accounting file.
  9. Configure one or more archive sites for the files.

    The site-name is any valid FTP or Secure FTP URL. When the file is archived, the router attempts to transfer the file to the archive site. If you have specified more than one site, it tries the first site in the list. If that fails, it tries each site in turn until a transfer succeeds. The log file is stored at the archive site with a filename of the format router-name_log-filename_timestamp. The last site in a list is often a local directory, in case no remote site is reachable.

  10. (Optional) Configure the start time for transferring the file.
  11. (Optional) Configure how frequently the file is transferred.
    Note:

    When you do not configure this option, the file is transferred every 30 minutes.

  12. (Optional) Configure the maximum number of files (3 through 1000) to save.
    Note:

    When you do not configure this option, a maximum of 10 files are saved.

  13. (Optional) Configure the router to save a backup copy of the accounting file to the /var/log/pfedBackup directory if the normal transfer of the files to the archive sites fails. Specify whether only the current file form the primary Routing Engine is saved or both that file and the file from the backup Routing Engine.
    Note:

    When you do not configure this option, the file is saved on failure into the local directory specified as the last site in the list of archive sites.

  14. (Optional) Configure the accounting file to be compressed during transfer to an archive site.
  15. (Optional) Configure the router’s new backup Routing Engine to send its accounting file to the /var/log/pfedBackup directory on the new primary Routing Engine when a change in primary role occurs.
  16. (Optional) Configure the number of days after which accounting files are deleted from the local backup directory.
    Note:

    Files are retained for 1 day if you do not configure this option.

  17. Assign the profile to an ESSM subscriber.
Release History Table
Release
Description
16.1R4
Starting in Junos OS Release 16.1R4, you can create a flat-file profile to use as a template to define attributes for accounting flat files.