Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .appinspect.expect.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
check_for_binary_files_without_source_code:
comment: 'ADDON-123 Ok'
27 changes: 26 additions & 1 deletion globalConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"meta": {
"name": "ta_cisco_webex_add_on_for_splunk",
"displayName": "Cisco Webex Add-on for Splunk",
"version": "1.4.1",
"version": "1.4.2",
"restRoot": "ta_cisco_webex_add_on_for_splunk",
"schemaVersion": "0.0.10",
"supportedThemes": [
Expand Down Expand Up @@ -1083,6 +1083,31 @@
"referenceName": "account"
}
},
{
"type": "singleSelect",
"field": "account_region",
"label": "Webex Account Region",
"help": "Select the region of your Webex account.",
"required": true,
"options": {
"disableSearch": true,
"autoCompleteFields": [
{
"label": "United States/Canada",
"value": "us_ca"
},
{
"label": "Europe",
"value": "eu"
},
{
"label": "Australia",
"value": "au"
}
]
},
"defaultValue": "us_ca"
},
{
"field": "start_time",
"label": "Start Time",
Expand Down
2 changes: 1 addition & 1 deletion package/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": {
"group": null,
"name": "ta_cisco_webex_add_on_for_splunk",
"version": "1.4.1"
"version": "1.4.2"
},
"author": [
{
Expand Down
4 changes: 4 additions & 0 deletions package/bin/input_module_webex_meeting_qualities.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def collect_events(helper, ew):
# insert input values into the url and/or header (helper class handles credential store)
opt_start_time = helper.get_arg('start_time')
opt_end_time = helper.get_arg('end_time')
opt_webex_account_region = helper.get_arg('account_region')

# Get account info
opt_global_account = helper.get_arg("global_account")
Expand All @@ -24,6 +25,7 @@ def collect_events(helper, ew):
stored_access_token = opt_global_account.get("access_token")
stored_refresh_token = opt_global_account.get("refresh_token")
base_endpoint = opt_global_account.get("endpoint")
is_gov_account = opt_global_account.get("is_gov_account")

# check the checkpoint
# get start time from checkpoint
Expand Down Expand Up @@ -71,6 +73,7 @@ def collect_events(helper, ew):

# retrieve the meeting qualities data for each meeting
latest_time = None
account_region = "gov" if is_gov_account == "1" else opt_webex_account_region

for meeting in meetings:
# only ingest the meetings that happened after the last checkpoint time
Expand All @@ -93,6 +96,7 @@ def collect_events(helper, ew):
client_secret,
meetings_qualities_params,
_RESPONSE_TAG_MAP[_GET_MEETING_QUALITIES],
webex_account_region=account_region
)
helper.log_debug("[-] meetings qualities data list size: {} for meeting: {}".format(len(meetings_qualities_data_list), meeting["id"]))

Expand Down
7 changes: 6 additions & 1 deletion package/bin/webex_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ def make_get_request_to_webex(

# reconstruct the url for meeting/qualities and cdr_feed endpoints
if not is_custom_endpoint and endpoint == "meeting/qualities":
url = f"{protocol}//analytics.{rest}"
if webex_account_region == "us_ca":
url = f"{protocol}//analytics.{rest}"
elif webex_account_region == "gov":
url = f"{protocol}//analytics.webexgov.us/v1/meeting/qualities"
else:
url = f"{protocol}//analytics-{webex_account_region}.{rest}"
elif not is_custom_endpoint and endpoint == "cdr_feed":
#construct the URL depending on the region
if webex_account_region == "us_ca":
Expand Down
7 changes: 7 additions & 0 deletions package/bin/webex_meeting_qualities.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ def get_scheme(self):
required_on_create=True,
)
)

scheme.add_argument(
smi.Argument(
'account_region',
required_on_create=True,
)
)

scheme.add_argument(
smi.Argument(
Expand Down
Loading