PageSourceSearch

https://docs.logz.io/assets/js/a0acbeda.3cdbeca0.js

js logz.io collected 2026-10-02 02:19:00 UTC 14,327 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmy_website=self.webpackChunkmy_website||[]).push([[4814],{3905:(e,t,o)=>{o.d(t,{Zo:()=>u,kt:()=>m});var n=o(67294);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function l(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function i(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function a(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},l=Object.keys(e);for(n=0;n<l.length;n++)o=l[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)o=l[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var s=n.createContext({}),p=function(e){var t=n.useContext(s),o=t;return e&&(o="function"==typeof e?e(t):i(i({},t),e)),o},u=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var o=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=a(e,["components","mdxType","originalType","parentName"]),d=p(o),g=r,m=d["".concat(s,".").concat(g)]||d[g]||c[g]||l;return o?n.createElement(m,i(i({ref:t},u),{},{components:o})):n.createElement(m,i({ref:t},u))}));function m(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=o.length,i=new Array(l);i[0]=g;var a={};for(var s in t)hasOwnProperty.call(t,s)&&(a[s]=t[s]);a.originalType=e,a[d]="string"==typeof e?e:r,i[1]=a;for(var p=2;p<l;p++)i[p]=o[p];return n.createElement.apply(null,i)}return n.createElement.apply(null,o)}g.displayName="MDXCreateElement"},53840:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>l,metadata:()=>a,toc:()=>p});var n=o(87462),r=(o(67294),o(3905));const l={id:"GCP-Cloud-Armor",title:"GCP Cloud Armor",overview:"Send Google Cloud Armor metrics to your Logz.io account.",product:["logs","metrics"],os:["windows","linux"],filters:["GCP","Security"],logo:"https://logzbucket.s3.eu-west-1.amazonaws.com/logz-docs/shipper-logos/cloudarmor.png",logs_dashboards:[],logs_alerts:[],logs2metrics:[],metrics_dashboards:[],metrics_alerts:[],drop_filter:[]},i=void 0,a={unversionedId:"shipping/GCP/GCP-Cloud-Armor",id:"shipping/GCP/GCP-Cloud-Armor",title:"GCP Cloud Armor",description:"Google Cloud Armor is a network security service that provides defenses against DDoS and application attacks, and offers a rich set of WAF rules.",source:"@site/docs/shipping/GCP/gcp-cloud-armor.md",sourceDirName:"shipping/GCP",slug:"/shipping/GCP/GCP-Cloud-Armor",permalink:"/docs/shipping/GCP/GCP-Cloud-Armor",draft:!1,editUrl:"https://github.com/logzio/documentation/tree/master/docs/shipping/GCP/gcp-cloud-armor.md",tags:[],version:"current",frontMatter:{id:"GCP-Cloud-Armor",title:"GCP Cloud Armor",overview:"Send Google Cloud Armor metrics to your Logz.io account.",product:["logs","metrics"],os:["windows","linux"],filters:["GCP","Security"],logo:"https://logzbucket.s3.eu-west-1.amazonaws.com/logz-docs/shipper-logos/cloudarmor.png",logs_dashboards:[],logs_alerts:[],logs2metrics:[],metrics_dashboards:[],metrics_alerts:[],drop_filter:[]},sidebar:"tutorialSidebar",previous:{title:"GCP API",permalink:"/docs/shipping/GCP/GCP-Cloud-API"},next:{title:"GCP Cloud Composer",permalink:"/docs/shipping/GCP/GCP-Cloud-Composer"}},s={},p=[{value:"Logs",id:"logs",level:2},{value:"Run Google Cloud Shell configuration",id:"run-google-cloud-shell-configuration",level:3},{value:"Run setup script in Google Cloud Shell",id:"run-setup-script-in-google-cloud-shell",level:3},{value:"Updating <code>telemetry_list</code> after creation",id:"updating-telemetry_list-after-creation",level:4},{value:"Check Logz.io for your logs",id:"check-logzio-for-your-logs",level:3},{value:"Metrics",id:"metrics",level:2},{value:"Run Google Cloud Shell configuration",id:"run-google-cloud-shell-configuration-1",level:3},{value:"Run setup script in Google Cloud Shell",id:"run-setup-script-in-google-cloud-shell-1",level:3},{value:"Check Logz.io for your metrics",id:"check-logzio-for-your-metrics",level:3}],u={toc:p},d="wrapper";
1function c(e){let{components:t,...o}=e;return(0,r.kt)(d,(0,n.Z)({},u,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Google Cloud Armor is a network security service that provides defenses against DDoS and application attacks, and offers a rich set of WAF rules.  "),(0,r.kt)("h2",{id:"logs"},"Logs"),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"This integration is based on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/logzio/logzio-google-pubsub"},(0,r.kt)("inlineCode",{parentName:"a"},"logzio-google-pubsub")),".")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Before you begin, you'll need"),":"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Login to your GCP account.")),(0,r.kt)("h3",{id:"run-google-cloud-shell-configuration"},"Run Google Cloud Shell configuration"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/logzio/logzio-google-pubsub"},"Click this link")," to clone the solution's repo and use it in your Google Cloud Shell."),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"If a pop-up window appears, check the ",(0,r.kt)("inlineCode",{parentName:"p"},"Trust repo")," box and press ",(0,r.kt)("inlineCode",{parentName:"p"},"Confirm"),".")),(0,r.kt)("h3",{id:"run-setup-script-in-google-cloud-shell"},"Run setup script in Google Cloud Shell"),(0,r.kt)("p",null,"Copy the following snippet and paste in your Google Cloud Shell:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"./run.sh --listener_url=<<LISTENER-HOST>> --token=<<LOG-SHIPPING-TOKEN>> --gcp_region=<<GCP-REGION>> --log_type=<<LOG-TYPE>> --function_name=<<FUNCTION-NAME>> --telemetry_list=<<TELEMETRY-LIST>>\n")),(0,r.kt)("p",null,"When you run this script, you should choose the project ID where you need to run the integration."),(0,r.kt)("p",null,"Replace the variables as per the table below:"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"<<LISTENER-HOST>>")),(0,r.kt)("td",{parentName:"tr",align:null},"Use the listener URL specific to the region of your Logz.io account. You can look it up ",(0,r.kt)("a",{parentName:"td",href:"https://docs.logz.io/docs/user-guide/admin/hosting-regions/account-region/"},"here"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"<<LOG-SHIPPING-TOKEN>>")),(0,r.kt)("td",{parentName:"tr",align:null},"The logs' shipping token of the account you want to ship to.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"<<GCP-REGION>>")),(0,r.kt)("td",{parentName:"tr",align:null},"Region where you want to upload Cloud Function. Requires for Deploy to Cloud option for platform.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"<<LOG-TYPE>>")),(0,r.kt)("td",{parentName:"tr",align:null},"Log type. Help classify logs into different classifications. (Default: ",(0,r.kt)("inlineCode",{parentName:"td"},"gcp-pubsub"),")")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"<<FUNCTION-NAME>>")),(0,r.kt)("td",{parentName:"tr",align:null},"Function name will be using as Google Cloud Function name. (Default: ",(0,r.kt)("inlineCode",{parentName:"td"},"logzioHandler"),")")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"<<TELEMETRY-LIST>>")),(0,r.kt)("td",{parentName:"tr",align:null},"Will send logs that match the Google resource type. Detailed list you can find ",(0,r.kt)("a",{parentName:"td",href:"https://cloud.google.com/logging/docs/api/v2/resource-list"},"here")," (ex: ",(0,r.kt)("inlineCode",{parentName:"td"},"pubsub_topic,pubsub_subscription"),"). For all services insert ",(0,r.kt)("inlineCode",{parentName:"td"},"all_services"),".")))),(0,r.kt)("h4",{id:"updating-telemetry_list-after-creation"},"Updating ",(0,r.kt)("inlineCode",{parentName:"h4"},"telemetry_list")," after creation"),(0,r.kt)("p",null,"To update the resources that are monitored by the function follow the steps:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Go to Log router page."),(0,r.kt)("li",{parentName:"ol"},"Choose ",(0,r.kt)("inlineCode",{parentName:"li"},"logzioHandler-sink-logs-to-logzio"),"."),(0,r.kt)("li",{parentName:"ol"},"Edit the sink."),(0,r.kt)("li",{parentName:"ol"},"Update the query which filters for the resource types to monitor.")),(0,r.kt)("p",null,"For this integration, the telemetry list needs to include ",(0,r.kt)("inlineCode",{parentName:"p"},"networksecurity"),"."),(0,r.kt)("h3",{id:"check-logzio-for-your-logs"},"Check Logz.io for your logs"),(0,r.kt)("p",null,"Give your logs some time to get from your system to ours, and then open ",(0,r.kt)("a",{parentName:"p",href:"https://app.logz.io/#/dashboard/osd"},"Open Search Dashboards"),"."),(0,r.kt)("h2",{id:"metrics"},"Metrics"),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"This integration is based on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/logzio/logzio-google-metrics"},(0,r.kt)("inlineCode",{parentName:"a"},"logzio-google-metrics")),".")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Before you begin, you'll need"),":"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Login to your GCP account.")),(0,r.kt)("h3",{id:"run-google-cloud-shell-configuration-1"},"Run Google Cloud Shell configuration"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/logzio/logzio-google-metrics"},"Click this link")," to clone the solution's repo and use it in your Google Cloud Shell."),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"You may encounter a pop up window. Check the ",(0,r.kt)("inlineCode",{parentName:"p"},"Trust repo")," checkbox, and press ",(0,r.kt)("inlineCode",{parentName:"p"},"Confirm"),".")),(0,r.kt)("h3",{id:"run-setup-script-in-google-cloud-shell-1"},"Run setup script in Google Cloud Shell"),(0,r.kt)("p",null,"Copy the following snippet and paste in your Google Cloud Shell:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-shell"},"./run.sh --listener_url=<<LISTENER-HOST>> --token=<<PROMETHEUS-METRICS-SHIPPING-TOKEN>> --gcp_region=<<GCP-REGION>> --function_name=<<FUNCTION-NAME-PREFIX>> --telemetry_list=<<TELEMETRY-LIST>>\n")),(0,r.kt)("p",null,"When you run this script, you should choose the project ID where you need to run the integration."),(0,r.kt)("p",null,"Replace the variables as per the table below:"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"<<LISTENER-HOST>>")),(0,r.kt)("td",{parentName:"tr",align:null},"Use the listener URL specific to the region of your Logz.io account. You can look it up ",(0,r.kt)("a",{parentName:"td",href:"https://docs.logz.io/docs/user-guide/admin/hosting-regions/account-region/"},"here"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"<<PROMETHEUS-METRICS-SHIPPING-TOKEN>>")),(0,r.kt)("td",{parentName:"tr",align:null},"The metrics' shipping token of the account you want to ship to.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"<<GCP-REGION>>")),(0,r.kt)("td",{parentName:"tr",align:null},"Region where you want to upload Cloud Function. Requires for Deploy to Cloud option for platform.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"<<FUNCTION-NAME-PREFIX>>")),(0,r.kt)("td",{parentName:"tr",align:null},"Function name will be using as Google Cloud Function name. (Default: ",(0,r.kt)("inlineCode",{parentName:"td"},"metrics_gcp"),")")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"<<TELEMETRY-LIST>>")),(0,r.kt)("td",{parentName:"tr",align:null},"Will send metrics that match the Google metric type. Detailed list you can find ",(0,r.kt)("a",{parentName:"td",href:"https://cloud.google.com/monitoring/api/metrics_gcp"},"here")," (ex: ",(0,r.kt)("inlineCode",{parentName:"td"},"cloudfunctions.googleapis.com"),")")))),(0,r.kt)("p",null,"For this integration, the telemetry list needs to include ",(0,r.kt)("inlineCode",{parentName:"p"},"networksecurity.googleapis.com"),"."),(0,r.kt)("h3",{id:"check-logzio-for-your-metrics"},"Check Logz.io for your metrics"),(0,r.kt)("p",null,"Give your data some time to get from your system to ours, then log in to your Logz.io Metrics account, and open ",(0,r.kt)("a",{parentName:"p",href:"https://app.logz.io/#/dashboard/metrics/"},"the Logz.io Metrics tab"),"."))}c.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.