Skip to content

Commit

Permalink
azure event hub changes
Browse files Browse the repository at this point in the history
azure event hub changes
  • Loading branch information
Duplo-Yashwant committed Nov 28, 2024
1 parent 8b13693 commit a7c1622
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/logstash-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Logstash image build

on:
push:
branches: [ "azure-event-hub" ]
pull_request:
branches: [ "azure-event-hub" ]

defaults:
run:
working-directory: diagnostics/opensearch/logstash
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push native docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/arm64,linux/amd64
file: diagnostics/opensearch/logstash/Dockerfile
tags: duplocloud/logstash:${{ github.sha }}
8 changes: 8 additions & 0 deletions diagnostics/opensearch/logstash/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Use the official Logstash image as a base
FROM docker.elastic.co/logstash/logstash:8.16.1

# Install the OpenSearch output plugin and Azure Event Hub input plugin
RUN bin/logstash-plugin install logstash-output-opensearch && \
bin/logstash-plugin install logstash-input-azure_event_hubs

COPY logstash.conf /usr/share/logstash/pipeline/logstash.conf
12 changes: 12 additions & 0 deletions diagnostics/opensearch/logstash/logstash.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
input {
azure_event_hubs {
event_hub_connections => ["${EVENT_HUB_CONNECTION}"]
}
}

output {
opensearch {
hosts => ["${OPENSEARCH_HOST}:9200"]
index => "logstash-eventhub-%{+YYYY.MM.dd}"
}
}

0 comments on commit a7c1622

Please sign in to comment.