Cloudflare Visualizations

Capturing the Index ID

Updating Index 'PROVIDED-AFTER-VISUALIZATION-IS-CREATED'

To correctly build the visualization, we need to first create a 'sample' visualization so we can capture the correct Index ID

  1. Once we Create a sample visualization from the Creating Visualizations section we will need to capture the Index ID and paste that value in the kibanaSavedObjectMeta.searchSourceJSON when appropriate.
  2. Navigate to Management -> Saved Objects and select the tab Visualizations

Cloudflare

CloudFlare - Client Device Type

{
  "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
  "filter": [
    {
      "meta": {
        "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
        "negate": true,
        "type": "phrase",
        "key": "root.ClientRequestUserAgent",
        "value": "",
        "params": {
          "query": "",
          "type": "phrase"
        },
        "disabled": false,
        "alias": null
      },
      "query": {
        "match": {
          "ClientRequestUserAgent": {
            "query": "",
            "type": "phrase"
          }
        }
      },
      "$state": {
        "store": "appState"
      }
    }
  ],
  "query": {
    "language": "lucene",
    "query": ""
  }
}
{
  "title": "CloudFlare - Client Device Type",
  "type": "pie",
  "params": {
    "addLegend": true,
    "addTooltip": true,
    "isDonut": true,
    "labels": {
      "last_level": true,
      "show": false,
      "truncate": 100,
      "values": true
    },
    "legendPosition": "right",
    "type": "pie"
  },
  "aggs": [
    {
      "id": "1",
      "enabled": true,
      "type": "count",
      "schema": "metric",
      "params": {}
    },
    {
      "id": "2",
      "enabled": true,
      "type": "terms",
      "schema": "segment",
      "params": {
        "field": "ClientDeviceType",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 5,
        "order": "desc",
        "orderBy": "1",
        "customLabel": "Client Device Type"
      }
    }
  ]
}

CloudFlare - Client Request Methods

{
  "title": "CloudFlare - Client Request Methods",
  "type": "pie",
  "params": {
    "type": "pie",
    "addTooltip": true,
    "addLegend": true,
    "legendPosition": "right",
    "isDonut": true,
    "labels": {
      "show": false,
      "values": true,
      "last_level": true,
      "truncate": 100
    }
  },
  "aggs": [
    {
      "id": "1",
      "enabled": true,
      "type": "count",
      "schema": "metric",
      "params": {}
    },
    {
      "id": "2",
      "enabled": true,
      "type": "terms",
      "schema": "segment",
      "params": {
        "field": "ClientRequestMethod",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 5,
        "order": "desc",
        "orderBy": "1"
      }
    }
  ]
}

CloudFlare - Client Request User Agent

{
  "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
  "filter": [
    {
      "meta": {
        "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
        "negate": true,
        "type": "phrase",
        "key": "ClientRequestUserAgent",
        "value": "",
        "params": {
          "query": "",
          "type": "phrase"
        },
        "disabled": false,
        "alias": null
      },
      "query": {
        "match": {
          "root.ClientRequestUserAgent": {
            "query": "",
            "type": "phrase"
          }
        }
      },
      "$state": {
        "store": "appState"
      }
    }
  ],
  "query": {
    "query": "",
    "language": "lucene"
  }
}
{
  "vis": {
    "params": {
      "sort": {
        "columnIndex": null,
        "direction": null
      }
    }
  }
}
{
  "title": "CloudFlare - Client Request User Agent",
  "type": "table",
  "params": {
    "perPage": 10,
    "showPartialRows": false,
    "showMeticsAtAllLevels": false,
    "sort": {
      "columnIndex": null,
      "direction": null
    },
    "showTotal": false,
    "totalFunc": "sum"
  },
  "aggs": [
    {
      "id": "1",
      "enabled": true,
      "type": "count",
      "schema": "metric",
      "params": {}
    },
    {
      "id": "2",
      "enabled": true,
      "type": "terms",
      "schema": "bucket",
      "params": {
        "field": "ClientRequestUserAgent",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 10,
        "order": "desc",
        "orderBy": "1",
        "customLabel": "Client Request User Agent"
      }
    }
  ]
}

CloudFlare - Edge Response Content Type

{
  "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
  "filter": [
    {
      "meta": {
        "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
        "negate": true,
        "type": "phrase",
        "key": "EdgeResponseContentType",
        "value": "",
        "params": {
          "query": "",
          "type": "phrase"
        },
        "disabled": false,
        "alias": null
      },
      "query": {
        "match": {
          "EdgeResponseContentType": {
            "query": "",
            "type": "phrase"
          }
        }
      },
      "$state": {
        "store": "globalState"
      }
    }
  ],
  "query": {
    "query": "",
    "language": "lucene"
  }
}
{
  "title": "CloudFlare - Edge Response Content Type",
  "type": "pie",
  "params": {
    "type": "pie",
    "addTooltip": true,
    "addLegend": true,
    "legendPosition": "right",
    "isDonut": true,
    "labels": {
      "show": false,
      "values": true,
      "last_level": true,
      "truncate": 100
    }
  },
  "aggs": [
    {
      "id": "1",
      "enabled": true,
      "type": "count",
      "schema": "metric",
      "params": {}
    },
    {
      "id": "2",
      "enabled": true,
      "type": "terms",
      "schema": "segment",
      "params": {
        "field": "EdgeResponseContentType",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 5,
        "order": "desc",
        "orderBy": "1"
      }
    }
  ]
}

CloudFlare - Edge Status Codes

{
  "title": "CloudFlare - Edge Status Codes",
  "type": "horizontal_bar",
  "params": {
    "type": "histogram",
    "grid": {
      "categoryLines": false,
      "style": {
        "color": "#eee"
      }
    },
    "categoryAxes": [
      {
        "id": "CategoryAxis-1",
        "type": "category",
        "position": "left",
        "show": true,
        "style": {},
        "scale": {
          "type": "linear"
        },
        "labels": {
          "show": true,
          "rotate": 0,
          "filter": false,
          "truncate": 200
        },
        "title": {}
      }
    ],
    "valueAxes": [
      {
        "id": "ValueAxis-1",
        "name": "LeftAxis-1",
        "type": "value",
        "position": "bottom",
        "show": true,
        "style": {},
        "scale": {
          "type": "linear",
          "mode": "normal"
        },
        "labels": {
          "show": true,
          "rotate": 75,
          "filter": true,
          "truncate": 100
        },
        "title": {
          "text": "Count"
        }
      }
    ],
    "seriesParams": [
      {
        "show": true,
        "type": "histogram",
        "mode": "normal",
        "data": {
          "label": "Count",
          "id": "1"
        },
        "valueAxis": "ValueAxis-1",
        "drawLinesBetweenPoints": true,
        "showCircles": true
      }
    ],
    "addTooltip": true,
    "addLegend": true,
    "legendPosition": "right",
    "times": [],
    "addTimeMarker": false
  },
  "aggs": [
    {
      "id": "1",
      "enabled": true,
      "type": "count",
      "schema": "metric",
      "params": {}
    },
    {
      "id": "2",
      "enabled": true,
      "type": "terms",
      "schema": "segment",
      "params": {
        "field": "EdgeResponseStatus",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 5,
        "order": "desc",
        "orderBy": "1",
        "customLabel": "Edge Response Status"
      }
    }
  ]
}

CloudFlare - Edge Status Codes (not 200)

{
  "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
  "filter": [
    {
      "meta": {
        "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
        "negate": true,
        "type": "phrase",
        "key": "EdgeResponseStatus",
        "value": "200",
        "params": {
          "query": 200,
          "type": "phrase"
        },
        "disabled": false,
        "alias": null
      },
      "query": {
        "match": {
          "EdgeResponseStatus": {
            "query": 200,
            "type": "phrase"
          }
        }
      },
      "$state": {
        "store": "globalState"
      }
    }
  ],
  "query": {
    "query": "",
    "language": "lucene"
  }
}
{
  "title": "CloudFlare - Edge Status Codes (not 200)",
  "type": "pie",
  "params": {
    "type": "pie",
    "addTooltip": true,
    "addLegend": true,
    "legendPosition": "right",
    "isDonut": true,
    "labels": {
      "show": false,
      "values": true,
      "last_level": true,
      "truncate": 100
    }
  },
  "aggs": [
    {
      "id": "1",
      "enabled": true,
      "type": "count",
      "schema": "metric",
      "params": {}
    },
    {
      "id": "2",
      "enabled": true,
      "type": "terms",
      "schema": "segment",
      "params": {
        "field": "EdgeResponseStatus",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 5,
        "order": "desc",
        "orderBy": "1"
      }
    }
  ]
}

CloudFlare - Edge/Client Response by Bytes

{
  "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
  "filter": [
    {
      "meta": {
        "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
        "negate": true,
        "type": "phrase",
        "key": "CacheResponseBytes",
        "value": "0",
        "params": {
          "query": 0,
          "type": "phrase"
        },
        "disabled": false,
        "alias": null
      },
      "query": {
        "match": {
          "CacheResponseBytes": {
            "query": 0,
            "type": "phrase"
          }
        }
      },
      "$state": {
        "store": "appState"
      }
    }
  ],
  "query": {
    "query": "",
    "language": "lucene"
  }
}
{
  "title": "CloudFlare - Edge/Client Response by Bytes",
  "type": "histogram",
  "params": {
    "type": "histogram",
    "grid": {
      "categoryLines": false,
      "style": {
        "color": "#eee"
      }
    },
    "categoryAxes": [
      {
        "id": "CategoryAxis-1",
        "type": "category",
        "position": "bottom",
        "show": true,
        "style": {},
        "scale": {
          "type": "linear"
        },
        "labels": {
          "show": true,
          "truncate": 100
        },
        "title": {}
      }
    ],
    "valueAxes": [
      {
        "id": "ValueAxis-1",
        "name": "LeftAxis-1",
        "type": "value",
        "position": "left",
        "show": true,
        "style": {},
        "scale": {
          "type": "linear",
          "mode": "normal"
        },
        "labels": {
          "show": true,
          "rotate": 0,
          "filter": false,
          "truncate": 100
        },
        "title": {
          "text": "Count"
        }
      }
    ],
    "seriesParams": [
      {
        "show": "true",
        "type": "histogram",
        "mode": "stacked",
        "data": {
          "label": "Count",
          "id": "1"
        },
        "valueAxis": "ValueAxis-1",
        "drawLinesBetweenPoints": true,
        "showCircles": true
      }
    ],
    "addTooltip": true,
    "addLegend": true,
    "legendPosition": "right",
    "times": [],
    "addTimeMarker": false
  },
  "aggs": [
    {
      "id": "1",
      "enabled": true,
      "type": "count",
      "schema": "metric",
      "params": {}
    },
    {
      "id": "2",
      "enabled": true,
      "type": "date_histogram",
      "schema": "segment",
      "params": {
        "field": "EdgeStartTimestamp",
        "interval": "custom",
        "customInterval": "4h",
        "min_doc_count": 1,
        "extended_bounds": {},
        "customLabel": "Edge Start Timestamp"
      }
    },
    {
      "id": "3",
      "enabled": true,
      "type": "terms",
      "schema": "group",
      "params": {
        "field": "CacheResponseBytes",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 5,
        "order": "desc",
        "orderBy": "1",
        "customLabel": "Cache Response Bytes"
      }
    }
  ]
}

CloudFlare - Requests by IP

{
  "vis": {
    "params": {
      "sort": {
        "columnIndex": 0,
        "direction": "asc"
      }
    }
  }
}
{
  "title": "CloudFlare - Requests by IP",
  "type": "table",
  "params": {
    "perPage": 10,
    "showPartialRows": false,
    "showMeticsAtAllLevels": false,
    "sort": {
      "columnIndex": 0,
      "direction": "asc"
    },
    "showTotal": false,
    "totalFunc": "sum"
  },
  "aggs": [
    {
      "id": "1",
      "enabled": true,
      "type": "count",
      "schema": "metric",
      "params": {}
    },
    {
      "id": "2",
      "enabled": true,
      "type": "terms",
      "schema": "bucket",
      "params": {
        "field": "ClientIP",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 10,
        "order": "desc",
        "orderBy": "1",
        "customLabel": "Client IP"
      }
    },
    {
      "id": "3",
      "enabled": true,
      "type": "terms",
      "schema": "bucket",
      "params": {
        "field": "ClientCountry",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 5,
        "order": "desc",
        "orderBy": "1",
        "customLabel": "Client Country"
      }
    },
    {
      "id": "4",
      "enabled": true,
      "type": "terms",
      "schema": "bucket",
      "params": {
        "field": "ClientASN",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 5,
        "order": "desc",
        "orderBy": "1",
        "customLabel": "Client ASN"
      }
    }
  ]
}

CloudFlare - SSL Protocol

{
  "title": "CloudFlare - SSL Protocol",
  "type": "pie",
  "params": {
    "type": "pie",
    "addTooltip": true,
    "addLegend": true,
    "legendPosition": "right",
    "isDonut": true,
    "labels": {
      "show": false,
      "values": true,
      "last_level": true,
      "truncate": 100
    }
  },
  "aggs": [
    {
      "id": "1",
      "enabled": true,
      "type": "count",
      "schema": "metric",
      "params": {}
    },
    {
      "id": "2",
      "enabled": true,
      "type": "terms",
      "schema": "segment",
      "params": {
        "field": "ClientSSLProtocol",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 5,
        "order": "desc",
        "orderBy": "1"
      }
    }
  ]
}

CloudFlare - Top Country (non-us)

{
  "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
  "filter": [
    {
      "meta": {
        "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
        "negate": true,
        "type": "phrase",
        "key": "ClientCountry",
        "value": "us",
        "params": {
          "query": "us",
          "type": "phrase"
        },
        "disabled": false,
        "alias": null
      },
      "query": {
        "match": {
          "ClientCountry": {
            "query": "us",
            "type": "phrase"
          }
        }
      },
      "$state": {
        "store": "globalState"
      }
    }
  ],
  "query": {
    "query": "",
    "language": "lucene"
  }
}
{
  "title": "CloudFlare - Top Country (non-us)",
  "type": "pie",
  "params": {
    "type": "pie",
    "addTooltip": true,
    "addLegend": true,
    "legendPosition": "right",
    "isDonut": true,
    "labels": {
      "show": false,
      "values": true,
      "last_level": true,
      "truncate": 100
    }
  },
  "aggs": [
    {
      "id": "1",
      "enabled": true,
      "type": "count",
      "schema": "metric",
      "params": {}
    },
    {
      "id": "2",
      "enabled": true,
      "type": "terms",
      "schema": "segment",
      "params": {
        "field": "ClientCountry",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 10,
        "order": "desc",
        "orderBy": "1"
      }
    }
  ]
}

Cloudflare Dashboard

Cloudflare Dashboard

Cloudflare Dashboard

Updated 6 days ago

Cloudflare Visualizations


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.