Cisco Cisco Content Delivery System Manager User Guide

Page of 168
If you want to assign multiple Content Providers to a single Delivery Service, you must not map Content Provider and
Delivery Service.
Assigning Multiple Content Providers to a Single Delivery Service
This feature enables the user to set up multiple Content Providers to a single Delivery Service. This is feasible
by providing custom Regex option, wherein the CDN Operator can provide the Regex for new field CP_ID.
This custom regex is used to extract CP_ID from the URL and then perform a lookup to get a meaningful CP
name. If the CDN Operator needs to use Asset ID to obtain meaningful CP name, then the Asset ID and CP_ID
will have the same Regex for token extraction from the URL. CDN Operators can either create or update
Regex for CP_ID extraction. Regex is maintained in props.conf, a Splunk configuration file.
To create or update Regex for CP_ID, perform the following steps:
Step 1
Log in to the analytics JS node using the following credentials:
Username: bnisplunk
Password: password
Step 2
Execute the script configure_regex.py using the following command to add/update:
$SPLUNK_HOME/bin/splunk cmd python $SPLUNK_HOME/etc/apps/CDN_JS/bin/configure_regex.py add
<sourcetype> <fieldname> "<regex>"
Where, <sourcetype> is the sourcetype for which the regex is provided.
The valid source types are: fms_disconnect, wmt_logplaystats, we_access, abr_session and sr_transaction
<regex>—regex to extract the Content Provider information from the log data
<fieldname>—the valid field names are CP_ID and Asset
Example:
For the following log file entry:
[28/Nov/2012:23:54:42.315+0000] 1799 74.126.71.217 TCP_HIT/206 2458 GET http://ccp-cmc-smooth-localpod02-
linear.cdn2.net/content/CP1/hls/file0/file_500.m3u8 application/x-mpegURL - hls 0 - 20121129100000000100000001
[29/Nov/2012:00:00:02.317+0000] External –
Case1: If you want to extract content/CP1 as CP_ID, then the Regex is:
“(?i)^(?:[^ ]*( {1,2})){6}(?:[a-z]+://)(?:[^ /:]+[^ /]+/)(?P<CP_ID>[^ /]+/[^ /]+)”
Case 2: If you want to extract CP1 as CP_ID, then the Regex is:
“(?i)^(?:[^ ]*( {1,2})){6}(?:[a-z]+://)(?:[^ /:]+[^ /]+/[^ /]+/)?(?P<CP_ID>[^ /]+)”
Case 3: If you want to extract file_500.m3u8 as Asset, then the Regex is:
“(?i)^(?:[^ ]*( {1,2})){6}(?:[a-z]+://)(?:[^ /:]+[^ /]+/[^ /]+/[^ /]+/[^ /]+/[^ /]+/)(?P<Asset>[^ ]+)”
Once this script is executed, redeployment of the server is initiated automatically.
To delete Regex for CP_ID, use the following command:
Videoscape Distribution Suite Service Manager User Guide    
   OL-29472-01
135
Configuration
Assigning Multiple Content Providers to a Single Delivery Service