{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":30419,"path":"it-operations-management/event-management/event-collection-GCP.md","title":"Event collection from Google Cloud Platform \\(GCP\\)","bundle":null,"doc_type":null,"release":"australia","body":"\n# Event collection from Google Cloud Platform \\(GCP\\)\n\nThe MID WebService Event Collector enables you to collect JSON formatted event messages sent from Google Cloud Platform \\(GCP\\).\n\n## Before you begin\n\nEnsure that the Event Management Connectors \\(sn\\_em\\_connector\\) plugin is installed on the ServiceNow AI Platform instance.\n\nEnsure that you:\n\n-   Deploy and start the MID Server. See [MID Server configuration](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/servicenow-platform/c_MIDServerConfiguration.md) .\n-   Configure and start the MID Web Server. See [Configure the MID Web Server extension](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/event-management/configure-mid-web-server-extension.md).\n-   Configure and start the MID WebService Event Collector. See [Configure the MID WebService Event Collector Context](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/event-management/configure-em-context-extension.md).\n\nRole required: evt\\_mgmt\\_admin\n\n## About this task\n\nJSON formatted event messages are sent from Google Cloud Platform. The MID Server transforms the collected event messages by parsing them using the TransformEvents\\_MidGoogleMonitor script include, located here: **Event Management** &gt; **Integrations** &gt; **PushConnectors**. In the Push Connectors page, click **Google Monitor Mid Push Connector**.\n\nThe default format of the URL to push event messages from the GCP to the MID Server is `http://<MID_Server_IP>:<MID_Web_Server_Port>/api/mid/em/inbound_event?Transform=TransformEvents_MidGoogleMonitor`.\n\n|Variable|Description|\n|--------|-----------|\n|MID\\_Server\\_IP|IP address of the MID Web Server Extension.|\n|MID\\_Web\\_Server\\_Port|Listening port of the MID Web Server Extension.|\n|MID\\_Web\\_Server\\_User|Username for the MID Web Server Extension.|\n|MID\\_Web\\_Server\\_Password|Password of the user of the MID Web Server.|\n\nThe following procedure describes the collection of JSON formatted event messages using basic authentication.\n\n## Procedure\n\n1.  Verify the MID Server IP is accessible from the Google Cloud Platform \\(GCP\\) console and the MID rest point is accessible from GCP.\n\n    Alternatively, install the MID Server on a GCP VM and provide the VM external IP address in the URL.\n\n    In the GCP console, create a firewall rule.\n\n    1.  Navigate to **VPC Network** &gt; **Firewall** &gt; **Create Firewall**.\n\n    2.  Set the direction to **ingress** to allow the mid\\_web\\_server\\_port to connect.\n\n    3.  Add the GCP VM that the MID Server is installed on to the **Applicable to instances** list.\n\n2.  In the GCP console, add a webhook.\n\n    1.  Navigate to **Monitoring** &gt; **Alerting** and click **Edit Notification Channels**.\n\n    2.  In the Webhooks section, click **Add New**.\n\n    3.  Select the **Use HTTP Basic Auth** check box, and enter the username and password of the MID Webserver User.\n\n        **Note:** Ensure that the selected user is assigned the evt\\_mgmt\\_integration role. To ensure proper authentication, use the least privileged user with the evt\\_mgmt\\_integration role, rather than a high privileged user.\n\n    4.  Enter the endpoint URL.\n\n        For example, use `http://<MID_Server_IP>:<MID_Web_Server_Port>/api/mid/em/inbound_event?Transform=TransformEvents_MidGoogleMonitor`\n\n3.  In the GCP console, create an alerting policy.\n\n    1.  Navigate to **Monitoring** &gt; **Alerting** and click **Create Policy**.\n\n    2.  Configure the policy conditions that initiate alerts when the conditions are violated.\n\n    3.  Select the webhook notification channel on which the problem should be notified.\n\n    4.  Select the **Notify on incident closure** check box to send the closure events to the MID Server and save the alert policy.\n\n        **Note:** If you need to directly open an incident in the GCP Console from the alert, navigate to **Quick Response \\(in Alert\\)** &gt; **Show Incident in GCP Console**. For more information about creating an alert policy, see [Managing alerting policies](https://cloud.google.com/monitoring/alerts/using-alerting-ui) on the Google Cloud documentation site.\n\n\n## Result\n\nGCP does not send values such as the severity level into the payload. The default severity is Minor, which can be changed in the **Push Connector Configuration** section of **Push Connectors** &gt; **Google Monitor MID Push Connector**. The valid values of severity are **1- Critical**, **2- Major**, **3- Minor**, **4- Warning**, and **5- Info**.\n\n**Parent Topic:**[Integrate with push connectors](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/event-management/configure-listener-transform-script.md)\n\n"}}