Giter VIP home page Giter VIP logo

support-case-notifications's Introduction

GCP Cloud Run Module for Support Case Creation Notifications

Containerized notification system for whenever a new support case is opened within your project or organization. The Cloud Scheduler will run every 10 minutes by default, triggering the Cloud Run job. The Cloud Run job will check if there are any new support cases and trigger the alerting policy, which will send a notification to the user.

Architecture

Disclaimer

  1. This is not an officially supported Google product.
  2. Proper testing should be done before running this tool in production.
  3. Standard, Enhanced, or Premium support must be enabled for case creation and Support API usage
  4. This solution assumes that the user has been assigned the appropriate IAM roles

Licensing

This sample code is made available under Apache 2 license. See the LICENSE file for more details.

GCP Costs

  1. Cloud Run Invocation, usually free
  2. Cloud Scheduler Jobs for running the script in intervals.
  3. Customer Care pricing for Standard, Enhanced, or Premium Support
  4. Cloud Logging and monitoring for alerts when a new case is opened.
  5. Cloud Storage for retrieval and writing to a textfile stored in storage.

Installation Instructions

Prerequisites

  1. Clone the git repo using git clone REPO
  2. In the Configuration.yaml file:
    • Replace the "example-project-id" with your project ID
    • Replace the "example-org-id" with your organization ID
    • If you would like to receive notifications from new support cases at the project level, replace the False with True. Otherwise, if you would like to receive notifications from new support cases at the organization level, leave it as False.
  3. Allow execution permissions with chmod +x setup.sh build.sh deploy.sh ListProjects.sh
  4. Export the project ID export PROJECT_ID=$(gcloud config get-value project)
  5. Creating a notification channel (skip this step if you already have a notification channel you would like to use):
    • Update the "[email protected]" with your email in emailNotification.json file
    • Run gcloud beta monitoring channels create --channel-content-from-file="emailNotification.json"
  6. Update the alert policy:
    • List the alerts with gcloud alpha monitoring channels list
    • Replace the "notificationsChannel" value (line 26) with the name of the notification channel you would like to use
  7. (Optional) Change the frequency that the script is run. The script runs every 10 minutes by default
    • In deploy.sh change the FREQUENCY variable (line 18)

Run the scripts

  1. Setup the service accounts and permissions by running ./setup.sh [ORGANIZATION_ID] (Replace with your organization ID)
  2. Containerize the application by running ./build.sh
  3. Deploy and create the alerting policy by running ./deploy.sh

You're done! You will receive notifications whenever a new support case is opened.

support-case-notifications's People

Contributors

juliengo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.