Skip to content

Instantly share code, notes, and snippets.

version: "2"
otlp-pipeline:
source:
otel_logs_source:
path: "/${pipelineName}/v1/logs"
processor:
# 1. Rename timestamp fields
- rename_keys:
@rafael-gumiero
rafael-gumiero / es-snapshot-stack.yml
Created September 28, 2022 18:38
es-snapshot-stack.yml
AWSTemplateFormatVersion: "2010-09-09"
Parameters:
ESBackupBucket:
Type: String
ESDomainArn:
Type: String
ESDomainEndpoint:
Type: String
myVPC:
Type: AWS::EC2::VPC::Id
GET _plugins/_ism/policies/hot-ultrawarm-cold-delete-RGUMIERO
{
"_id" : "hot-ultrawarm-cold-delete-RGUMIERO",
"_version" : 10,
"_seq_no" : 6718,
"_primary_term" : 1,
"policy" : {
"policy_id" : "hot-ultrawarm-cold-delete-RGUMIERO",
"description" : "A simple default policy that changes the replica count between hot and cold states.",
"last_updated_time" : 1654522240898,
#!/usr/bin/python3.8
# Bulk load data cloudtrail data into WatchTower
#
# Recommended that LOAD_REGIONS and LOAD_ACCOUNTS are used to limit the amount of data to ingest
#
# Has in-build checkpoint capability. It writes the files processed out to checkpoint.json. To reset delete the checkpoint.json file.
import argparse
import boto3
import base64
import json
print('Loading function')
def lambda_handler(event, context):
output = []
for record in event['records']:
print(record['recordId'])
payload = base64.b64decode(record['data']).decode('utf-8')
reading =json.loads(payload)
# Add additional column source
[
{
"_index": "otel-v1-apm-span-000008", "_type": "_doc",
"_id": "7994838310b66a8c",
"_score": 7.7601824,
"_source": {
"traceId": "62323c3d5a8a0e3775c78633f1342fb3", "spanId": "7994838310b66a8c",
"traceState": "",
"parentSpanId": "cad222bf3d14b6a9",
"name": "SampleApplication.incluirCacheDistribuido", "kind": "SPAN_KIND_INTERNAL",
@rafael-gumiero
rafael-gumiero / Glue_Spark_job_example.yml
Created February 10, 2022 18:02 — forked from maatthc/Glue_Spark_job_example.yml
Cloud Formation example for Glue Spark Job with metrics and scheduler
AWSTemplateFormatVersion: '2010-09-09'
Description: Cloud Formation example for Glue Spark Job with metrics and scheduler
Parameters:
ArtifactBucket:
Description: A global deployable artefact bucket
Type: String
Default: artefacts
ServiceName:
Description: Service Name that owns the stack when created