Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configuring Service Accounting in Local Flat Files

Starting in Junos OS Release 17.1R1, you can configure flat-file accounting to collect service statistics for subscribers and report those statistics to a local file. This configuration collects the running total service statistics per interface family. Because the statistics are maintained in the Routing Engine in a statistics database, they are not affected by a line-card restart, a graceful Routing Engine switchover, or a unified in-service software upgrade (ISSU). The statistics counters are reset when the router reboots.

Note:

Starting in Junos OS Release 18.4R1, service accounting in local flat files is no longer supported. If included in a configuration, it is ignored.

To configure local flat-file accounting for services:

  1. Configure the subscriber access profile to report service accounting records in a local flat file.
    Note:

    When you configure local, the CLI checks at commit that the flat-file profile is configured under [edit access profile profile-name local].

    Alternatively, you can set the service accounting order to activation-protocol instead of local:

    Use this option only when you plan to activate the service by means of the CLI configuration or a command. In this case, the CLI does not check for the flat-file profile to be configured. If the profile is not configured, no statistics are collected.

    Note:

    When you configure the local option, both volume and time statistics are collected for the service accounting sessions. In this case, you must not configure the volume-time option at the [edit access profile profile-name service accounting statistics] hierarchy level; otherwise, an error is generated when you commit the configuration.

  2. Specify the name of the flat-file profile that is used to collect the service statistics.
  3. Create the flat-file profile to collect the subscriber service accounting statistics and other parameters.
  4. Specify the filename for the accounting file.
  5. Specify that service accounting statistics are collected.
  6. (Optional) Specify the general, nonstatistical parameters for the accounting file that are displayed as part of the accounting record header.
  7. (Optional) Configure the name of the XML schema for the accounting flat file.
  8. (Optional) Specify the format of the accounting file.
    Note:

    When you do not configure this option, the format is ipdr.

  9. (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.

    Note:

    The interval value configured in the flat-file profile can be overridden by other interval values:

    • The service accounting update interval configured at the edit access profile profile-name service accounting update-interval] hierarchy level.

    • An update interval value configured in the RADIUS attribute, Service-Interim-Acct-Interval (VSA 26–140). This value also overrides the service accounting update interval.

  10. Configure the maximum size of the accounting file.
  11. (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.

  12. (Optional) 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.

  13. (Optional) Configure the start time for transferring files.
  14. (Optional) Configure how frequently the file is transferred.
    Note:

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

  15. (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.
    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.

  16. (Optional) Configure the accounting file to be compressed during transfer to an archive site.
  17. (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.
  18. (Optional) Configure the number of days after which accounting files are deleted from the local backup directory.
    Note:

    When you do not configure this option, files are retained for only 1 day.

Release History Table
Release
Description
17.1R1
Starting in Junos OS Release 17.1R1, you can configure flat-file accounting to collect service statistics for subscribers and report those statistics to a local file.