Skip to content

Instantly share code, notes, and snippets.

@mhr3
Created June 30, 2023 11:49
Show Gist options
  • Select an option

  • Save mhr3/4338f50f3fe9db00e1be52615fd55c99 to your computer and use it in GitHub Desktop.

Select an option

Save mhr3/4338f50f3fe9db00e1be52615fd55c99 to your computer and use it in GitHub Desktop.
Ingesting AWS ALB logs into Axiom
# this command ingests ALB logs into Axiom without any pre-processing, the file should be the *.log.gz as stored in S3
curl "https://api.axiom.co/v1/datasets/$DATASET/ingest?timestamp-field=time&csv-delimiter=%20" \
-H "Authorization: Bearer $AXIOM_INGEST_TOKEN" \
-H 'Content-Type: text/csv' \
-H 'Content-Encoding: gzip' \
-H 'x-axiom-csv-fields: type,time,elb,client_port,target_port,request_processing_time,target_processing_time,response_processing_time,elb_status_code,target_status_code,received_bytes,sent_bytes,request,user_agent,ssl_cipher,ssl_protocol,target_group_arn,trace_id,domain_name,chosen_cert_arn,matched_rule_priority,request_creation_time,actions_executed,redirect_url,error_reason,target_port_list,target_status_code_list,classification,classification_reason' \
--data-binary @file.log.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment