GithubHelp home page GithubHelp logo

sumitsingh306 / gcp-splunk-bridge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lastcent/gcp-splunk-bridge

0.0 2.0 0.0 8.02 MB

Telenor Digital's log forwarder from Google Compute Platform to Splunk

License: GNU General Public License v3.0

HCL 82.74% Shell 6.70% Dockerfile 6.06% Smarty 4.50%

gcp-splunk-bridge's Introduction

GCP_Splunk_bridge

Description

A Splunk forwarder, ready to transfer logs from Google Stackdriver Logging to a receiving Splunk network.

Disclaimer:

This is a prototype, made by an intern. Some things are probably hacky, misconfigured, and broken.

Prerequisites

  • Helm
  • Terraform
  • Gcloud and kubectl
  • Splunk Enterprise certificates

Usage

  1. Deploy a Storage Bucket for the certs and the .tfstate files. Do this manually, or using the example bucket-terraform. Remember to edit the terraform.tfvars file.
  2. Move the splunk-certs to bridge-terraform/ and apply it in two steps:
terraform apply -target=module.network
gcloud container clusters get-credentials splunk-fw-isolated
terraform apply
  1. Download the latest version of the GCP Addon for Splunk to splunk-configured-docker, and add the destination IP-addresses (comma separated) to outputs.conf. Then build the docker image and upload it to the Google Cloud Container registry:
sudo docker build -t gcr.io/PROJECT-NAME/splunk
sudo docker push gcr.io/PROJECT-NAME/splunk
  1. Install Tiller on the cluster:
kubectl create serviceaccount -n kube-system
kubectl create clusterrolebinding tiller-binding --clusterrole=cluster-admin --serviceaccount kube-system:tiller
helm init --service-account tiller
  1. Deploy the Forwarder on the cluster:
helm package splunk-hf
helm install --name splunk-latest splunk-hf-0.1.0.tgz
  1. Activate the Forwarder license:
kubectl exec -it POD-NAME -- /bin/bash
${SPLUNK_HOME}/bin/splunk edit licenser-groups Forwarder -is_active 1

  1. Confirm that the forwarder has established a connection
kubectl exec -it POD-NAME -- /bin/bash
cat $SPLUNK_HOME/var/log/splunk/splunkd.log
cat $SPLUNK_HOME/var/log/splunk/metrics.log

Architecture

Architecture

Troubleshooting

The Forwarder is stuck in a pending state

Make sure the pubsub setup has been applied correctly. GCP pods will wait indefinitely if a required resource, such as a secret, is missing.

Help, I need the Splunk Web interface to do something

Open a port in the deployment by opening splunk-hf/templates/deployment.yaml, and inserting

ports:
- name: web-ui
  containerport: 8000

in the "containers:" section below "- name: splunk. Replace the 0 in splunk-configured-docker/web.conf with a 1 to enable the web server. Then repeat steps 3 and 5 from the install process. Remember to reverse these steps, as keeping the web server active is not recommended.

gcp-splunk-bridge's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.