MrLooquer Docs
  • Home
  • Integrations
    • MrLooquer Azure
    • MrLooquer Amazon
    • MrLooquer GCP
  • API
    • Swagger Doc
  • Datasheets
    • MrLooquer Rating
Powered by GitBook
On this page
  • Steps and requirements
  • Create a Exportation logs
  • Create Service account for the function
  • Get api key of MrLooquer Rating
  • Create function

Was this helpful?

  1. Integrations

MrLooquer GCP

Configure your GCP account in minutes to start monitoring your infrastructure with MrLooquer

PreviousMrLooquer AmazonNextMrLooquer Rating

Last updated 5 years ago

Was this helpful?

Steps and requirements

Steps to configure and integrate your GCP account with MrLooquer:

You need to have a MrLooquer account https://auth.mrlooquer.com/

Create a Exportation logs

Go to Logging section in Google cloud console.

In the Filter field, click in the down arrow and click on "convert to advanced filter".

In the input add the next query:

resource.type="gce_instance"
jsonPayload.event_subtype:"compute.instances.insert"
jsonPayload.event_type:"GCE_OPERATION_DONE"

And click on "Submit Filter".

Now, click on "Create Export" button.

In the form:

Complete the "Sink name" field with a text of you want. The "Sink Service" select "Cloud Pub/Sub" and in the "Sink Destination" field select "Create new Cloud Pub/Sub topic".

In the modal, complete the name field and click on "Create"

And select the topic just created in the "Sink Destination" field.

To complete the creation process, click on "Create Sink" button.

Create Service account for the function

Go to IAM & admin > Service accounts

Click on "Create Service Account" button, in the top of the page:

In the first step, complete the fields and click on "Create" button

In the second step, add 2 roles:

Compute Engine > Compute Viewer

And Compute Engine > Compute Network Viewer

At the end, the form should be:

Click on "Continue" button, and in the next step, click on "Done".

Get api key of MrLooquer Rating

Create function

Go to "Cloud functions"

Click on "Create function" button.

Fill the fields with the following information:

  • Name: Name that you want

  • Memory allocated: 128 MB

  • Trigger: Cloud Pub/Sub

  • Topic: The topic that you created in the first step

  • Source Code: ZIP uploaded

  • Runtime: Node.js 10 (Beta)

  • Stage bucket: You can choose an existing bucket or create a new bucket.

  • Function to execute: handler

In the advanced options:

  • Region: Region that you want

  • Timeout: 60

  • Service account: The account that you created in the second step.

  • And add one environment variable:

    • API_TOKEN: The token that you created in the third step.

The form should be:

Click on "Create" and you are done!

Login on and go to "Settings" menu. Set a name and copy the token.

Zip File: You can download the zip of the following url:

MrLooquer Rating
https://github.com/mrlooquer/mrlooquer-rating-gcp/releases/download/v1.0.0/code-function.zip
Create a Exportation Logs
Create Service account
Get api key of MrLooquer Rating
Create function