Skip to content

Commit

Permalink
Merge pull request #148 from cloud-gov/reporting
Browse files Browse the repository at this point in the history
Fixing index-pattern issue and optimize upload
  • Loading branch information
JasonTheMain authored Dec 11, 2024
2 parents a5d2be4 + fa35085 commit 2722e21
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 414 deletions.
3 changes: 0 additions & 3 deletions jobs/upload-dashboards-objects/spec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ consumes:
optional: true

templates:
bin/generate-objects: bin/generate-objects
bin/generate-tenants: bin/generate-tenants
bin/generate-ndjson: bin/generate-ndjson
bin/import-objects: bin/import-objects
Expand All @@ -38,8 +37,6 @@ templates:

# OpenSearch Dashboards objects (defaults).
dashboards-objects/index-pattern/logs-app.json.erb: dashboards-objects/index-pattern/logs-app*.json
dashboards-objects/index-pattern/logs.json.erb: dashboards-objects/index-pattern/logs-*.json
dashboards-objects/index-pattern/logs-platform.json.erb: dashboards-objects/index-pattern/logs-platform*.json

dashboards-objects/search/app-all.json.erb: dashboards-objects/search/app-all.json
dashboards-objects/search/app-all-messages.json.erb: dashboards-objects/search/app-all-messages.json
Expand Down
3 changes: 2 additions & 1 deletion jobs/upload-dashboards-objects/templates/bin/generate-ndjson
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import json
folders = [
"/var/vcap/jobs/upload-dashboards-objects/dashboards-objects/dashboard",
"/var/vcap/jobs/upload-dashboards-objects/dashboards-objects/search",
"/var/vcap/jobs/upload-dashboards-objects/dashboards-objects/visualization"
"/var/vcap/jobs/upload-dashboards-objects/dashboards-objects/visualization",
"/var/vcap/jobs/upload-dashboards-objects/dashboards-objects/index-pattern"
]
output_file = "/var/vcap/jobs/upload-dashboards-objects/dashboard.ndjson"

Expand Down
66 changes: 0 additions & 66 deletions jobs/upload-dashboards-objects/templates/bin/generate-objects

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export STORE_DIR="/var/vcap/store/$JOB_NAME"
cf api "<%= api %>"
cf auth "<%= client %>" "<%= password %>" --client-credentials
mkdir -p $STORE_DIR
cf orgs| tail -n +4 > "$STORE_DIR/org-tenants.txt"
cf orgs| tail -n +4 > "$STORE_DIR/org-tenants.txt"
echo "admin_tenant" >> "$STORE_DIR/org-tenants.txt"
3 changes: 0 additions & 3 deletions jobs/upload-dashboards-objects/templates/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ export PYTHONPATH="/var/vcap/packages/python3/lib/python3.12/site-packages${PYTH
export LD_LIBRARY_PATH="/var/vcap/packages/python3/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export REQUESTS_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"

echo "[$(date)] Calling 'generate-objects'..."
$(dirname $0)/generate-objects

echo "[$(date)] Calling 'generate-tenants'..."
$(dirname $0)/generate-tenants

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,7 @@ end
"title": "<%= p('opensearch_config.app_index_prefix') %>*",
"timeFieldName": "@timestamp",
"fields": "<%= fields_json.to_json.gsub(/"/) { '\"' } %>"
}
},
"id": "<%= p('opensearch_config.app_index_prefix') %>*",
"type":"index-pattern"
}

This file was deleted.

Loading

0 comments on commit 2722e21

Please sign in to comment.