Code Monkey home page Code Monkey logo

gcp-cloudstorage-falcon-logscale-function-integration's Introduction

CrowdStrike-logo Twitter URL

GCP Function: Cloud Storage(bucket) Logs to Falcon/LogScale Shipper

Configure and Setup GCP Function with Cloud Storage as a service

  • Cloud Storage is a service for storing your objects in Google Cloud. An object is an immutable piece of data consisting of a file of any format. You store objects in containers called buckets.

Setup

  • In the Google Cloud console, go to the Cloud Storage Buckets page. Go to Buckets.
  • Click Create bucket.
  • On the Create a bucket page, enter your bucket information.
  • In the Google Cloud search -> Cloud Function -> function name
  • Trigger Type -> Cloud Storage
  • Select -> correct bucket
  • Event Type: Select -> On(finalizing/creating) file in the selected bucket
  • Cloud Functions -> Configuration -> Runtime -> python3.8
  • Add code to main.py

Flow Chart Diagram

FlowChart

Configure CloudStorage

CloudStorage

Prepare LogScale

  • Setup the Ingest Repository
  • select, or create a target ingest repository

Repository

Installing LogScale(Humio) Log Collector on Linux

LogCollector

  • create an ingest token, or use the default token

configure ingest parsing

parseJson(handleNull=empty) | parseTimestamp(field=timestamp)

Support

This package is supported by our product support team. If you have any issues implementing or running this package, please go to [email protected] for assistance.

Setuop parser in logscale repository and generate token that will be used to configure (pub/sub) GCP function.

Example configuring python script ( main.py) to transfer audit-log to LogScale Repository

Example below shows how to setup token in main.py file.

  • python

http = urllib3.PoolManager() dest_url = "https://cloud.community.humio.com/api/v1/ingest/hec/raw" dest_token1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx header1 = {'Content-Type': 'application/json', 'Authorization': 'Bearer ' + dest_token1}

Dependencies

  • Log Output

This package requires minimum parsing configuration in the parser.

parseJson(handleNull=empty) | parseTimestamp(field=timestamp)

Time Zones

The parser will try to automatically detect timestamps in the logs, including time zone information. If no time zone is present though, the parser will assume the timestamp i s UTC time. The best solution is to include timestamp information in the logs, but you can also modify the parser to provide a different default. Find the timezone argument i n the findTimestamp function to change it.



WE STOP BREACHES

gcp-cloudstorage-falcon-logscale-function-integration's People

Contributors

ihaque55 avatar jshcodes avatar

Watchers

James Cloos avatar Daniela Remogna avatar Chris Kachigian 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.