GithubHelp home page GithubHelp logo

isabella232 / serverless-log-trigger-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlecloudplatform/serverless-log-trigger-demo

0.0 0.0 0.0 976 KB

Demo code for real-time logging processing on GCP

License: Apache License 2.0

Python 71.09% HCL 28.91%

serverless-log-trigger-demo's Introduction

Demo code for real-time logging processing

This sample code helps get you started with real-time log proccessing in Google Cloud.

Introduction

Google Cloud logging tools are built to help you find and understand your logs. You may have business or technical processes that may require an automated action or you may want to reduce toil for your DevOps team. For example, you may want to use changes in your Cloud Audit Logs to take action and remediate a security vulnerability caused by inadvertent infrastructure changes.

Using a Logging sink, you can build an event-driven system to detect and respond to log events in real time. Cloud Logging can help you to build this event-driven architecture through its integration with Cloud Pub/Sub and a serverless computing service such as Cloud Functions or Cloud Run.

Architecture overview

The high-level architecture of this event-driven system is both simple and flexible. There are four main components:

  • Log events – The applications and the infrastructure send logs to Cloud Logging
  • Logging – Cloud Logging sinks in the Logs Router lets you send log events to Pub/Sub topics based on the specific filters you create
  • Pub/Sub - Initiates Cloud Functions asynchronously based on the received log events
  • Cloud Functions – The business logic to process and respond to the log events

image

What's Here

This repo includes:

  • README.md - this file
  • firewall-demo - Demo code for a firewall change captured in the log
  • gcs-demo - Demo code for a storage bucket change captured in the activity log
  • product-metric-demo - Based on a sample micro-services app, the demo code will extract recommended products and create custom metrics
  • log-message-metric-demo - Demo code to create a metric based on the translations of application messages captured in the log
  • trace-metric-demo - Demo code to capture multiple related log messages and calculate time difference for a metric
  • dm - Supporting code for Deployment Manager

License

Apache 2.0 - See LICENSE for more information.

serverless-log-trigger-demo's People

Contributors

xiangshen-dk 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.