CSV File Formats


Published: October 30, 2013

Introduction

The Cisco SCA BB provides several types of CSV flat files. You can review and configure these files using third-party applications such as Excel.

This chapter consists of these sections:

Information About Service Configuration Entities CSV File Formats

Information About Subscriber CSV File Formats

Information About Collection Manager CSV File Formats

Information About Service Configuration Entities CSV File Formats

This section describes the file formats of the CSV files created when exporting service configuration entities into CSV files. The same format must be used for importing such entities into service configurations.

For more information about exporting and importing service configuration entities, see the "Managing Service Configurations" section in the "Using the Service Configuration Editor" chapter of Cisco Service Control Application for Broadband User Guide.


Note There is no need to repeat the same values in subsequent rows of the CSV file. If a field is left empty in a row, the value of that field from the previous row is used.


This section consists of these sub-sections:

Service CSV Files

Protocol CSV Files

Zone CSV Files

Information About Flavor CSV Files

Service CSV Files

Lines in Service CSV files have the following fixed format:

service name,service numeric ID,[description],sample rate,parent name,global counter 
index,subscriber counter index,[flavor],initiating side,protocol,[zone]
 
 

The only service that does not have a parent service is the default service.

The default service is the parent of all other services.

If the service is counted with its parent, it must have a counter index of -1.

One service can have multiple entries in the file (see the following example). There is no need to state the service properties for each of its items.

Some fields can take a null value (see the last line of the following example).

The following is an example of a Service CSV file:

P2P,9,,10,Default Service,9,9,,EitherSide,DirectConnect,zone1
P2P,9,,10,Default Service,9,9,flavor1,EitherSide,Manolito, zone1
,,,,,,,,EitherSide,Hotline, zone1
,,,,,,, flavor2,EitherSide,Share, zone1
Generic,1,,10,Default Service,-1,-1,No items,null,null,null
 
 

Protocol CSV Files

Lines in Protocol CSV files have the following fixed format:

protocol name,protocol index,[IP protocol],[port range],signature
 
 

One protocol can have multiple entries in the file (see the following example).

Port range has the format MinPort-MaxPort. For example, 1024-5000 means port 1024 to port 5000.

The following is an example of a Protocol CSV file:

HTTP Browsing,2,TCP,80-80,Generic
HTTP Browsing,2,TCP,8080-8080,Generic
HTTP Browsing,2,,,HTTP
 
 

Zone CSV Files

Two formats—Standard and Easy—are available for Zone CSV files.

Standard Format

Lines in Zone CSV files in Standard format have the following fixed format:

zone name,zone index,IP range
 
 

Where IP range is an IP address in dotted notation, followed by a mask.

The following is an example of a Zone CSV file in Standard format:

zone1,1,10.1.1.0/24
,,10.1.2.0/24
Zone2, 14,2001:0db8:f0fd:a0bd:1234:98dc:cccc:aa24/48
 
 

Easy Format

Lines in Zone CSV files in Easy format have only Zone items.

The following is an example of a Zone CSV file in Easy format:

1.0.0.0/32
1.0.0.1/32
1.0.0.2/32
2001:0db8:f0fd:a0bd:1234:98dc:cccc:aa24/48

Information About Flavor CSV Files

The format of Flavor CSV files depends on the flavor type.

Each line of every Flavor CSV files begins with the same three fields:

flavor name,flavor index,flavor type[,flavor specific field[s]]
 
 

The formats of the CSV files of different flavors are described in the following sections.

The following is an example of a line from a Flavor CSV file:

HttpUrlFlavor,1,HTTP_URL
 
 

HTTP URL CSV Files

HTTP Referer CSV Files

HTTP User Agent CSV Files

HTTP Composite CSV Files

RTSP User Agent CSV Files

RTSP Host Name CSV Files

RTSP Composite CSV Files

SIP Destination Domain CSV Files

SIP Source Domain CSV Files

SIP Composite CSV Files

SMTP Host Name CSV Files

ToS CSV Files

For information on flavors, see the "Managing Flavors" section in the "Using the Service Configuration Editor: Traffic Classification" chapter of Cisco Service Control Application for Broadband User Guide.

HTTP URL CSV Files

Two formats—Standard and Easy—are available for HTTP URL CSV files.

Standard Format

Lines in HTTP URL CSV files in Standard format have the following fixed format:

flavor name,flavor index,flavor type,host suffix,params prefix,URI suffix,URI prefix
 
 

The following is an example of an HTTP URL CSV file in Standard format:

NEWS,0,HTTP_URL,*.reuters.com,,,/news/*
,,,*.msnbc.msn.com,,,
,,,*.wired.com,,,/news/technology/*
,,,*.cbsnews.com,,,/sections/world/*
,,,*.cnn.com,,,/WORLD/*

Easy Format

Lines in HTTP URL CSV files in Easy format have a single URL format.

The following is an example of an HTTP URL CSV file in Easy format:

http://*.rapidshare.com/cgi-bin/upload*
http://*.rapidshare.com/files*
 
 

HTTP Referer CSV Files

Two formats—Standard and Easy—are available for HTTP Referer CSV files.

Standard Format

Lines in HTTP Referer CSV files in Standard format have the following fixed format:

flavor name,flavor index,flavor type,host suffix,params prefix,URI suffix,URI prefix
 
 

The following is an example of an HTTP Referer CSV file in Standard format:

NEWS,0,HTTP_Referer,*.reuters.com,,,/news/*
,,,*.msnbc.msn.com,,,
,,,*.wired.com,,,/news/technology/*
,,,*.cbsnews.com,,,/sections/world/*
,,,*.cnn.com,,,/WORLD/*

Easy Format

Lines in HTTP Referer CSV files in Easy format have a single URL format.

The following is an example of an HTTP Referer CSV file in Easy format:

http://*.rapidshare.com/cgi-bin/upload*
http://*.rapidshare.com/files*
 
 

HTTP User Agent CSV Files

Lines in HTTP User Agent CSV files have the following fixed format:

flavor name,flavor index,flavor type,user agent
 
 

HTTP Composite CSV Files

Lines in HTTP Composite CSV files have the following fixed format:

flavor name,flavor index,flavor type,HTTP_URL_name,HTTP_User_Agent_name
 
 

Where HTTP_URL_name and HTTP_User_Agent_name are the names of existing flavors of types HTTP URL and HTTP User Agent, respectively.

RTSP User Agent CSV Files

Lines in RTSP User Agent CSV files have the following fixed format:

flavor name,flavor index,flavor type,user agent
 
 

RTSP Host Name CSV Files

Lines in RTSP Host Name CSV files have the following fixed format:

flavor name,flavor index,flavor type,host suffix
 
 

RTSP Composite CSV Files

Lines in RTSP Composite CSV files have the following fixed format:

flavor name,flavor index,flavor type,RTSP_Host_Name,RTSP_User_Agent_name
 
 

Where RTSP_Host_Name and RTSP_User_Agent_name are the names of existing flavors of types RTSP Host Name and RTSP User Agent, respectively.

SIP Destination Domain CSV Files

Lines in SIP Destination Domain CSV files have the following fixed format:

flavor name,flavor index,flavor type,host suffix
 
 

SIP Source Domain CSV Files

Lines in SIP Source Domain CSV files have the following fixed format:

flavor name,flavor index,flavor type,host suffix
 
 

SIP Composite CSV Files

Lines in HTTP Composite CSV files have the following fixed format:

flavor name,flavor index,flavor type,SIP_Destination_Domain_name,SIP_Source_Domain_name
 
 

Where SIP_Destination_Domain_name and SIP_Source_Domain_name are the names of existing flavors of types SIP Destination Domain and SIP Source Domain, respectively.

SMTP Host Name CSV Files

Lines in SMTP Host Name CSV files have the following fixed format:

flavor name,flavor index,flavor type,host suffix
 
 

ToS CSV Files

Lines in ToS CSV files have the following fixed format:

flavor name,flavor index,flavor type,ToS value
 
 

Information About Subscriber CSV File Formats

This section describes the file formats of various subscriber CSV files used by the Cisco SCMS Subscriber Manager.

This section consists of these subsections:

Import/Export File: Format of the Mappings Field

SCE Subscriber CSV Files

SCMS SM Subscriber CSV Files

SCE Anonymous Group CSV Files

Cisco SCA BB Anonymous Group Import CSV File

SCE Subscriber Template CSV File

For more information about these CSV file formats, see the following documents:

"Subscriber Files" section in the "Managing Subscribers" chapter of Cisco SCE 8000 10GBE Software Configuration Guide.

"Subscriber Files" section in the "Managing Subscribers" chapter of Cisco SCE 8000 GBE Software Configuration Guide.

Cisco Service Control Management Suite Subscriber Manager User Guide.

Import/Export File: Format of the Mappings Field

Some of the CSV files include a mappings field. This field can include one or more of the following values delimited by colons (":") or semicolons (";"):

Single IP address in dotted notation (xx.xx.xx.xx).

IP address ranges in dotted notation (xx.xx.xx.xx/mask).

Single VLAN (xx) as an integer in decimal notation in the range of 0 - 2044.

VLAN ranges (xx-yy), where both values are integers in decimal notation in the range of 0 - 2044.


Note Specifying VLAN and IP mappings together in the same line is not allowed.


The following are examples of the mappings field:

Multiple IP mappings—10.1.1.0/24;10.1.2.238

Multiple VLAN mappings—450:896-907

SCE Subscriber CSV Files

The lines in the Cisco SCE Subscriber CSV files have the following fixed format:

subscriber-id,mappings,package-id,upstream Virtual Link id,downstream Virtual Link id
 
 

The following is a sample CSV file for use with the Cisco SCE CLI:

JerryS,80.179.152.159;80.179.152.179,0,1,3
ElainB,194.90.12.2,3,55,87
sub_ipv6,,1080:1e01:e902::/48,10,0,0,0
sub_dualstack,10.20.12.123/32,2001:0db8:f0fd:a0bd:1234:98dc:cccc:aa24/48,20,0,0,0
 
 

SCMS SM Subscriber CSV Files

The lines in the Cisco Service Control SM Subscriber CSV files have the following fixed format:

subscriber-id,domain,mappings,package-id,upstream Virtual Link id,downstream Virtual Link 
id
 
 

If no domain is specified, the default domain (subscribers) is assigned.

The following is an example CSV file for use with the SM CLI:

JerryS,subscribers,80.179.152.159,0,0,0
ElainB,,194.90.12.2,3,12,1
sub_ipv6,subscribers,fe80:0:1::/64,1,,,
 
 

SCE Anonymous Group CSV Files

Lines in SCE Anonymous Group CSV files have the following fixed format:

anonymous-group-name,IP-range,[subscriber-template-number]
 
 

If no subscriber-template-number is specified, the anonymous subscribers of that group use the default template (equivalent to using a subscriber-template-number value of zero).

The mapping between subscriber-template-number and package-id is defined in the SCE Subscriber Template CSV file, which is described in the "SCE Subscriber Template CSV File" section.

The following is an example of an anonymous group CSV file:

group1,176.23.34.0/24,3
group2,10.7.0.0/16

Cisco SCA BB Anonymous Group Import CSV File

Lines in the Cisco SCA BB Anonymous Group Import CSV files have the following fixed format:

anonymous-group-name,IP-range,[subscriber-template-number],[subscriber Manager]
 
 
All fields are mandatory while importing to Cisco SCA BB console.

The following is a sample anonymous group CSV file for Cisco SCA BB:

group1,176.23.34.0/24,3,SM

group2,10.7.0.0/16,SM
group2,2001:0db8:f0fd:a0bd:1234:98dc:cccc:aa24/48,2,SM

SCE Subscriber Template CSV File

Lines in Subscriber Template CSV files have the following fixed format:

subscriber-template-number,package-id
 
 

Cisco SCA BB includes a default one-to-one mapping between package-id and subscriber-template-number for values from 0 to 199.

Subscriber-template-numbers can take values from 0 through 199. You can map more than one subscriber-template-number to the same package-id.

For more information about this file, see either the Cisco SCE 8000 10GBE Software Configuration Guide or the Cisco SCE 8000 GBE Software Configuration Guide.

Information About Collection Manager CSV File Formats

This section describes the file formats of the CSV files created by adapters of the Cisco SCMS Collection Manager.

Each RDR is routed to the appropriate adapter—the CSV Adapter, the TA Adapter, or the RAG Adapter—converted, and written to a CSV file.

CSV Adapter CSV Files

TA Adapter CSV Files

RAG Adapter CSV Files

For more information about the Collection Manager and its adapters, see Cisco Service Control Management Suite Collection Manager User Guide.

CSV Adapter CSV Files

By default, the CSV Adapter writes files to subdirectories of ~/cm/adapters/CSVAdapter/csvfiles, where each subdirectory name is the RDR tag of the RDR that generated the CSV file.

Each CSV file created by the CSV Adapter has a structure matching the RDR represented in the file. It is possible to include the SE IP (for example, record source) which generated the RDR in the CSV line. To turn this option on, edit the csvadapter.conf file and set the value of includeRecordSource property under [csvadapter] section to true.

Related Topics

Raw Data Records: Formats and Field Contents

TA Adapter CSV Files

The TA Adapter receives Subscriber Usage RDRs, aggregates the data they contain, and outputs statistics to CSV files. By default, these files are created once every 24 hours, at midnight.

The name of the CSV file is the date and time of its creation. The default format of the file name is yyyy-MM-dd_HH-mm-ss.csv (for example, 2005-09-27_18-30-01.csv). By default, the location of the CSV files is /cm/adapters/TAAdapter/csvfiles.

By default, the fields in each row of the CSV file are as follows:

subsID,svcALLup,svcALLdown,svcALLsessions,svcALLseconds,
svc0up,svc0down,svc0sessions,svc0seconds,svc1up,svc1down,svc1sessions,
svc1seconds,...,svcNup,svcNdown,svcNsessions,svcNseconds
 
 

Where subsID is the Subscriber ID and svcXY is the aggregated volume of metric Y for service X. (The N in svcN is the highest service number, which is the configured number of services minus 1.)

The combined volume is not stored in the CSV file, because it is easily obtained by adding the upstream and downstream volumes.

You can configure the adapter to insert a comment at the beginning of every CSV file. This comment contains a time stamp showing when the file was created, and an explanation of its format. By default, this feature is disabled. To turn on this option, edit the taadapter.conf file and set the value of the write_headers property under the [csv] section to true.

RAG Adapter CSV Files

The RAG Adapter processes RDRs of one or more types and aggregates the data from predesignated field positions into buckets. When a RAG Adapter bucket is flushed, its content is written as a single line into a CSV file, one file per RDR, in the CSV repository of the adapter.

The name of the CSV file is the date and time of its creation. The default format of the file name is yyyy-MM-dd_HH-mm-ss.csv (for example, 2005-09-27_18-30-01.csv). By default, the CSV repository is flat (all CSV files in one directory), and located at /cm/adapters/RAGAdapter/csvfiles. Alternatively, you can configure the adapter to use a subdirectory structure. The CSV files are written to subdirectories of /cm/adapters/RAGAdapter/csvfiles, where each subdirectory name is the RDR tag of the RDR type that was written to this CSV file.

Each line written to the CSV file may have some synthesized fields added to it, such as time stamps of the first and last RDRs that contributed to this bucket and the total number of RDRs in this bucket. Other fields may be removed altogether. Fields in the output line that are not used for aggregation have values corresponding to the values in the first RDR that contributed to the bucket. However, the time stamp field that is prepended to the line in the CSV file has a value corresponding to the time stamp of the last RDR in the bucket.