Fastly 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

Fastly

Fastly - Requests Overtime

{
  "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
  "filter": [
    {
      "$state": {
        "store": "appState"
      },
      "meta": {
        "alias": null,
        "disabled": false,
        "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
        "key": "request",
        "negate": true,
        "params": {
          "query": "\"HEAD / HTTP/1.1\"",
          "type": "phrase"
        },
        "type": "phrase",
        "value": "\"HEAD / HTTP/1.1\""
      },
      "query": {
        "match": {
          "request": {
            "query": "\"HEAD / HTTP/1.1\"",
            "type": "phrase"
          }
        }
      }
    },
    {
      "meta": {
        "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
        "negate": true,
        "type": "phrase",
        "key": "request",
        "value": "\"GET / HTTP/1.1\"",
        "params": {
          "query": "\"GET / HTTP/1.1\"",
          "type": "phrase"
        },
        "disabled": false,
        "alias": null
      },
      "query": {
        "match": {
          "request": {
            "query": "\"GET / HTTP/1.1\"",
            "type": "phrase"
          }
        }
      },
      "$state": {
        "store": "appState"
      }
    }
  ],
  "query": {
    "query": "",
    "language": "lucene"
  }
}
{
  "title": "Fastly - Requests Overtime",
  "type": "line",
  "params": {
    "type": "line",
    "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": "line",
        "mode": "normal",
        "data": {
          "label": "Count",
          "id": "1"
        },
        "valueAxis": "ValueAxis-1",
        "drawLinesBetweenPoints": true,
        "showCircles": true,
        "interpolate": "linear"
      }
    ],
    "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": "timestamp",
        "interval": "h",
        "customInterval": "1h",
        "min_doc_count": 1,
        "extended_bounds": {}
      }
    },
    {
      "id": "3",
      "enabled": true,
      "type": "terms",
      "schema": "group",
      "params": {
        "field": "request",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 10,
        "order": "desc",
        "orderBy": "1"
      }
    }
  ]
}

Fastly - Response Codes (non 200)

{
  "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
  "filter": [
    {
      "meta": {
        "index": "PROVIDED-AFTER-VISUALIZATION-IS-CREATED",
        "negate": true,
        "type": "phrase",
        "key": "response",
        "value": "200",
        "params": {
          "query": 200,
          "type": "phrase"
        },
        "disabled": false,
        "alias": null
      },
      "query": {
        "match": {
          "response": {
            "query": 200,
            "type": "phrase"
          }
        }
      },
      "$state": {
        "store": "appState"
      }
    }
  ],
  "query": {
    "query": "",
    "language": "lucene"
  }
}
{
  "title": "Fastly - Response Codes (non 200)",
  "type": "pie",
  "params": {
    "type": "pie",
    "addTooltip": true,
    "addLegend": true,
    "legendPosition": "top",
    "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": "response",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 5,
        "order": "desc",
        "orderBy": "1"
      }
    }
  ]
}

Fastly - Top IP with Requests

{
  "vis": {
    "params": {
      "sort": {
        "columnIndex": null,
        "direction": null
      }
    }
  }
}
{
  "title": "Fastly - Top IP with Requests",
  "type": "table",
  "params": {
    "perPage": 8,
    "showMeticsAtAllLevels": false,
    "showPartialRows": false,
    "showTotal": false,
    "sort": {
      "columnIndex": null,
      "direction": null
    },
    "totalFunc": "sum"
  },
  "aggs": [
    {
      "id": "1",
      "enabled": true,
      "type": "count",
      "schema": "metric",
      "params": {
        "customLabel": "Total Hits"
      }
    },
    {
      "id": "3",
      "enabled": true,
      "type": "terms",
      "schema": "bucket",
      "params": {
        "field": "ipaddress",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 5,
        "order": "desc",
        "orderBy": "1",
        "customLabel": "IP Address"
      }
    },
    {
      "id": "4",
      "enabled": true,
      "type": "terms",
      "schema": "bucket",
      "params": {
        "field": "request",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 5,
        "order": "desc",
        "orderBy": "1",
        "customLabel": "Request"
      }
    }
  ]
}

Fastly - Total Request Bytes

{
  "title": "Fastly - Total Request Bytes",
  "type": "histogram",
  "params": {
    "type": "histogram",
    "grid": {
      "categoryLines": false,
      "style": {
        "color": "#eee"
      },
      "valueAxis": "ValueAxis-1"
    },
    "categoryAxes": [
      {
        "id": "CategoryAxis-1",
        "type": "category",
        "position": "bottom",
        "show": true,
        "style": {},
        "scale": {
          "type": "linear"
        },
        "labels": {
          "show": true,
          "truncate": 100,
          "rotate": 0,
          "filter": false
        },
        "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": "Total Request Bytes"
        }
      }
    ],
    "seriesParams": [
      {
        "show": "true",
        "type": "histogram",
        "mode": "normal",
        "data": {
          "label": "Total Request Bytes",
          "id": "1"
        },
        "valueAxis": "ValueAxis-1",
        "drawLinesBetweenPoints": true,
        "showCircles": true
      }
    ],
    "addTooltip": true,
    "addLegend": true,
    "legendPosition": "top",
    "times": [],
    "addTimeMarker": false
  },
  "aggs": [
    {
      "id": "1",
      "enabled": true,
      "type": "sum",
      "schema": "metric",
      "params": {
        "field": "response",
        "customLabel": "Total Request Bytes"
      }
    },
    {
      "id": "2",
      "enabled": true,
      "type": "date_histogram",
      "schema": "segment",
      "params": {
        "field": "timestamp",
        "interval": "d",
        "customInterval": "2h",
        "min_doc_count": 1,
        "extended_bounds": {}
      }
    }
  ]
}

Fastly - Weekly Number of Failed Responses

{
  "title": "Fastly - Weekly Number of Failed Responses",
  "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": "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": "timestamp",
        "interval": "custom",
        "customInterval": "6h",
        "min_doc_count": 1,
        "extended_bounds": {},
        "customLabel": "6 hour Interval Timestamp"
      }
    },
    {
      "id": "3",
      "enabled": true,
      "type": "terms",
      "schema": "group",
      "params": {
        "field": "response",
        "otherBucket": false,
        "otherBucketLabel": "Other",
        "missingBucket": false,
        "missingBucketLabel": "Missing",
        "size": 10,
        "order": "desc",
        "orderBy": "1",
        "customLabel": "Number of Failed Responses"
      }
    }
  ]
}

Updated 2 months ago

Fastly Visualizations


Suggested Edits are limited on API Reference Pages

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