From d26b213609d22a1b078ad8b7b94b1ab93633a58c Mon Sep 17 00:00:00 2001 From: Justin Kambic Date: Fri, 17 Apr 2020 15:34:56 -0400 Subject: [PATCH] [Uptime] Remove monitor states graphql (#62853) (#63871) * WIP replacing GQL with redux/rest. * Finish implementing migration. * Introduce new connected component for ping list. * Replace GraphQL type with io-ts. * Update some broken tests. * Add test for new helper function. * Write test snapshots. * Migrate api tests from graphql to rest. * Update fixtures that rely on pings. * Move ping types to runtime_types folder with rest of io-ts files. * Update Ping type location and imports, type checking. * Remove reliance on fixtures for ping functional API tests. * Fix broken unit tests. * Fix broken types. * Remove local state storage from parent components. * Add functional test to cover Ping List functionality. * Fix monitor page functional test that was broken by merge conflicts. * Fix broken tests. * Fix broken API test. * Replace a test with a describe block that will pre-navigate all tests. * Delete unused reducer keys. * Re-introduce loading to ping list reducer. * Inroduce code that will cause PingList to re-fetch when refresh button is pressed. * Update expanded rows to support multiple concurrent expanded rows. * Modify pingList reducer to have singular optional error field. * Delete unnecessary helper code. * Delete unused interface. * Add runtime_type to parse getPings params, fix pagination index. * Add dedicated monitor type to runtime_types. * Fix broken tests. * Fix broken tests. * Rename '@timestamp' property to 'timestamp' on Ping type. * Fix broken type and key pings list table on document ID instead of timestamp. * Fix broken unit tests. * Fix broken tests and types. * Fix broken functional test. * Add REST endpoint for monitor states. * Add REST route to constants file. * Introduce io-ts typing for monitor states. * Remove remaining GraphQL types. * Update monitor states types to use io-ts types. * Add state management for monitor states. * Introduce connected monitor list component. * Fixup runtime types for monitor states. * Remove all remaining references to apollo graphql. * Update URL generator function tests to use inline snapshots instead of snapshot files. * Fix missing imports and small type issues. * Prefer inline snapshot to object literal comparison. * Add type check and console log to API response. * Update README to remove graphql references. * Fix type error. * Make monitor list refresh when global refresh button is pressed. * Fix broken types. * Rename `@timestamp` field to `timestamp`. * Change spelling of var. * Add timestamp map for `@timestamp` field in monitor states fetcher. * Remove need for `monito_states` fixture. * Write test code that allows for deletion of the `monitor_states_id_filtered` fixture. * Rewrite pagination tests to no longer rely on monitor states page fixtures. * Skip test that is causing other functional tests to fail. * Remove unused translations. * Fix broken test snapshots. * Fix stale error reporting errors. * Remove runtime validation from REST handler. Co-authored-by: Elastic Machine Co-authored-by: Elastic Machine --- x-pack/legacy/plugins/uptime/README.md | 17 +- .../common/constants/context_defaults.ts | 2 +- .../uptime/common/constants/rest_api.ts | 1 + .../plugins/uptime/common/graphql/types.ts | 232 --- .../common/runtime_types/monitor/index.ts | 1 + .../common/runtime_types/monitor/state.ts | 145 ++ .../public/components/connected/index.ts | 1 + .../monitor/list_drawer_container.tsx | 3 +- .../connected/monitor/monitor_list.tsx | 31 + .../monitor_bar_series.test.tsx.snap | 1 - .../__tests__/monitor_bar_series.test.tsx | 13 +- .../functional/charts/monitor_bar_series.tsx | 18 +- .../public/components/functional/index.ts | 2 +- .../__snapshots__/monitor_list.test.tsx.snap | 909 +++++++--- .../monitor_list_pagination.test.tsx.snap | 307 ---- .../__tests__/monitor_list.test.tsx | 217 ++- .../monitor_list_pagination.test.tsx | 126 -- .../monitor_list_status_column.test.tsx | 47 +- .../functional/monitor_list/index.ts | 2 +- .../functional/monitor_list/monitor_list.tsx | 206 ++- .../monitor_list_drawer.test.tsx.snap | 8 +- .../__tests__/integration_group.test.tsx | 3 +- .../__tests__/monitor_list_drawer.test.tsx | 11 +- .../__tests__/monitor_status_list.test.tsx | 52 +- .../monitor_list_drawer/integration_group.tsx | 2 +- .../monitor_list_actions_popover.tsx | 2 +- .../monitor_list_drawer.tsx | 3 +- .../monitor_status_list.tsx | 2 +- .../monitor_list_status_column.tsx | 2 +- .../public/components/higher_order/index.ts | 1 - .../higher_order/uptime_graphql_query.tsx | 89 - .../framework/apollo_client_adapter.ts | 16 - .../framework/framework_adapter_types.ts | 12 - .../framework/new_platform_adapter.tsx | 2 - .../format_error_string.test.ts.snap | 7 - .../__tests__/format_error_string.test.ts | 41 - .../public/lib/helper/format_error_list.ts | 20 - .../__snapshots__/get_apm_href.test.ts.snap | 5 - .../__snapshots__/get_infra_href.test.ts.snap | 19 - .../get_logging_href.test.ts.snap | 13 - .../__tests__/get_apm_href.test.ts | 12 +- .../__tests__/get_infra_href.test.ts | 57 +- .../__tests__/get_logging_href.test.ts | 35 +- .../observability_integration/build_href.ts | 2 +- .../observability_integration/get_apm_href.ts | 2 +- .../get_infra_href.ts | 2 +- .../get_logging_href.ts | 2 +- .../lib/helper/series_has_down_values.ts | 4 +- .../legacy/plugins/uptime/public/lib/lib.ts | 8 +- .../plugins/uptime/public/pages/overview.tsx | 60 +- .../public/queries/monitor_states_query.ts | 110 -- .../uptime/public/state/actions/index.ts | 1 + .../public/state/actions/monitor_list.ts | 12 + .../public/state/actions/monitor_status.ts | 1 + .../plugins/uptime/public/state/api/index.ts | 1 + .../uptime/public/state/api/monitor_list.ts | 19 + .../uptime/public/state/effects/index.ts | 2 + .../public/state/effects/monitor_list.ts | 17 + .../uptime/public/state/reducers/index.ts | 2 + .../public/state/reducers/monitor_duration.ts | 4 +- .../public/state/reducers/monitor_list.ts | 51 + .../state/selectors/__tests__/index.test.ts | 9 + .../uptime/public/state/selectors/index.ts | 5 + .../plugins/uptime/public/uptime_app.tsx | 41 +- .../plugins/uptime/scripts/gql_gen.json | 11 - .../uptime/scripts/infer_graphql_types.js | 45 - .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 1 - .../uptime/server/graphql/constants.ts | 7 - x-pack/plugins/uptime/server/graphql/index.ts | 17 - .../server/graphql/monitor_states/index.ts | 8 - .../graphql/monitor_states/resolvers.ts | 76 - .../graphql/monitor_states/schema.gql.ts | 183 -- .../uptime/server/graphql/pings/index.ts | 7 - .../uptime/server/graphql/pings/schema.gql.ts | 264 --- x-pack/plugins/uptime/server/graphql/types.ts | 23 - .../__tests__/parse_literal.test.ts | 42 - .../__tests__/parse_value.test.ts | 19 - .../__tests__/serialize.test.ts | 24 - .../graphql/unsigned_int_scalar/index.ts | 8 - .../graphql/unsigned_int_scalar/resolvers.ts | 51 - .../graphql/unsigned_int_scalar/schema.gql.ts | 11 - .../lib/adapters/framework/adapter_types.ts | 2 - .../framework/kibana_framework_adapter.ts | 70 - .../lib/requests/get_monitor_details.ts | 4 +- .../server/lib/requests/get_monitor_states.ts | 5 +- .../search/__tests__/fetch_page.test.ts | 51 +- .../search/__tests__/query_context.test.ts | 2 +- .../requests/search/__tests__/test_helpers.ts | 2 +- .../requests/search/enrich_monitor_groups.ts | 15 +- .../server/lib/requests/search/fetch_page.ts | 2 +- .../requests/search/find_potential_matches.ts | 2 +- .../requests/search/monitor_group_iterator.ts | 2 +- .../search/refine_potential_matches.ts | 2 +- .../server/lib/requests/search/types.ts | 2 +- .../plugins/uptime/server/rest_api/index.ts | 2 + .../uptime/server/rest_api/monitors/index.ts | 1 + .../server/rest_api/monitors/monitor_list.ts | 69 + x-pack/plugins/uptime/server/uptime_server.ts | 8 - .../apis/uptime/feature_controls.ts | 26 - .../graphql/fixtures/monitor_states.json | 1609 ----------------- .../fixtures/monitor_states_id_filtered.json | 169 -- .../fixtures/monitor_states_page_1.json | 1609 ----------------- .../fixtures/monitor_states_page_10.json | 1609 ----------------- .../monitor_states_page_10_previous.json | 1609 ----------------- .../fixtures/monitor_states_page_2.json | 1609 ----------------- .../monitor_states_page_2_previous.json | 1609 ----------------- .../fixtures/monitor_states_page_3.json | 1609 ----------------- .../monitor_states_page_3_previous.json | 1609 ----------------- .../fixtures/monitor_states_page_4.json | 1609 ----------------- .../monitor_states_page_4_previous.json | 1609 ----------------- .../fixtures/monitor_states_page_5.json | 1609 ----------------- .../monitor_states_page_5_previous.json | 1609 ----------------- .../fixtures/monitor_states_page_6.json | 1609 ----------------- .../monitor_states_page_6_previous.json | 1609 ----------------- .../fixtures/monitor_states_page_7.json | 1609 ----------------- .../monitor_states_page_7_previous.json | 1609 ----------------- .../fixtures/monitor_states_page_8.json | 1609 ----------------- .../monitor_states_page_8_previous.json | 1609 ----------------- .../fixtures/monitor_states_page_9.json | 1609 ----------------- .../monitor_states_page_9_previous.json | 1609 ----------------- .../apis/uptime/graphql/index.ts | 17 - .../apis/uptime/graphql/monitor_states.ts | 245 --- .../test/api_integration/apis/uptime/index.ts | 1 - .../apis/uptime/rest/doc_count.ts | 2 +- .../apis/uptime/rest/filters.ts | 2 +- .../{graphql => rest}/fixtures/filters.json | 0 .../fixtures/monitor_status.json | 0 .../fixtures/monitor_status_all.json | 0 .../fixtures/monitors_with_location.json | 0 .../{graphql => rest}/fixtures/snapshot.json | 0 .../fixtures/snapshot_empty.json | 0 .../fixtures/snapshot_filtered_by_down.json | 0 .../fixtures/snapshot_filtered_by_up.json | 0 .../helper}/expect_fixture_eql.ts | 6 +- .../helpers => rest/helper}/make_checks.ts | 0 .../api_integration/apis/uptime/rest/index.ts | 2 + .../apis/uptime/rest/monitor_duration.ts | 2 +- .../apis/uptime/rest/monitor_latest_status.ts | 2 +- .../uptime/rest/monitor_states_generated.ts | 193 ++ .../uptime/rest/monitor_states_real_data.ts | 525 ++++++ .../apis/uptime/rest/ping_histogram.ts | 2 +- .../apis/uptime/rest/snapshot.ts | 4 +- .../apis/uptime/rest/telemetry_collectors.ts | 2 +- .../test/functional/apps/uptime/locations.ts | 2 +- .../test/functional/apps/uptime/settings.ts | 2 +- 146 files changed, 2261 insertions(+), 35212 deletions(-) delete mode 100644 x-pack/legacy/plugins/uptime/common/graphql/types.ts create mode 100644 x-pack/legacy/plugins/uptime/common/runtime_types/monitor/state.ts create mode 100644 x-pack/legacy/plugins/uptime/public/components/connected/monitor/monitor_list.tsx delete mode 100644 x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/__snapshots__/monitor_list_pagination.test.tsx.snap delete mode 100644 x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/monitor_list_pagination.test.tsx delete mode 100644 x-pack/legacy/plugins/uptime/public/components/higher_order/uptime_graphql_query.tsx delete mode 100644 x-pack/legacy/plugins/uptime/public/lib/adapters/framework/apollo_client_adapter.ts delete mode 100644 x-pack/legacy/plugins/uptime/public/lib/adapters/framework/framework_adapter_types.ts delete mode 100644 x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/__snapshots__/format_error_string.test.ts.snap delete mode 100644 x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/format_error_string.test.ts delete mode 100644 x-pack/legacy/plugins/uptime/public/lib/helper/format_error_list.ts delete mode 100644 x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_apm_href.test.ts.snap delete mode 100644 x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_infra_href.test.ts.snap delete mode 100644 x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_logging_href.test.ts.snap delete mode 100644 x-pack/legacy/plugins/uptime/public/queries/monitor_states_query.ts create mode 100644 x-pack/legacy/plugins/uptime/public/state/actions/monitor_list.ts create mode 100644 x-pack/legacy/plugins/uptime/public/state/api/monitor_list.ts create mode 100644 x-pack/legacy/plugins/uptime/public/state/effects/monitor_list.ts create mode 100644 x-pack/legacy/plugins/uptime/public/state/reducers/monitor_list.ts delete mode 100644 x-pack/legacy/plugins/uptime/scripts/gql_gen.json delete mode 100644 x-pack/legacy/plugins/uptime/scripts/infer_graphql_types.js delete mode 100644 x-pack/plugins/uptime/server/graphql/constants.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/index.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/monitor_states/index.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/monitor_states/resolvers.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/monitor_states/schema.gql.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/pings/index.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/pings/schema.gql.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/types.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/__tests__/parse_literal.test.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/__tests__/parse_value.test.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/__tests__/serialize.test.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/index.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/resolvers.ts delete mode 100644 x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/schema.gql.ts create mode 100644 x-pack/plugins/uptime/server/rest_api/monitors/monitor_list.ts delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_id_filtered.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_1.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_10.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_10_previous.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_2.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_2_previous.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_3.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_3_previous.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_4.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_4_previous.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_5.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_5_previous.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_6.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_6_previous.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_7.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_7_previous.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_8.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_8_previous.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_9.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_9_previous.json delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/index.ts delete mode 100644 x-pack/test/api_integration/apis/uptime/graphql/monitor_states.ts rename x-pack/test/api_integration/apis/uptime/{graphql => rest}/fixtures/filters.json (100%) rename x-pack/test/api_integration/apis/uptime/{graphql => rest}/fixtures/monitor_status.json (100%) rename x-pack/test/api_integration/apis/uptime/{graphql => rest}/fixtures/monitor_status_all.json (100%) rename x-pack/test/api_integration/apis/uptime/{graphql => rest}/fixtures/monitors_with_location.json (100%) rename x-pack/test/api_integration/apis/uptime/{graphql => rest}/fixtures/snapshot.json (100%) rename x-pack/test/api_integration/apis/uptime/{graphql => rest}/fixtures/snapshot_empty.json (100%) rename x-pack/test/api_integration/apis/uptime/{graphql => rest}/fixtures/snapshot_filtered_by_down.json (100%) rename x-pack/test/api_integration/apis/uptime/{graphql => rest}/fixtures/snapshot_filtered_by_up.json (100%) rename x-pack/test/api_integration/apis/uptime/{graphql/helpers => rest/helper}/expect_fixture_eql.ts (87%) rename x-pack/test/api_integration/apis/uptime/{graphql/helpers => rest/helper}/make_checks.ts (100%) create mode 100644 x-pack/test/api_integration/apis/uptime/rest/monitor_states_generated.ts create mode 100644 x-pack/test/api_integration/apis/uptime/rest/monitor_states_real_data.ts diff --git a/x-pack/legacy/plugins/uptime/README.md b/x-pack/legacy/plugins/uptime/README.md index 1f3e0329fee48..7921bb450d943 100644 --- a/x-pack/legacy/plugins/uptime/README.md +++ b/x-pack/legacy/plugins/uptime/README.md @@ -3,7 +3,7 @@ ## Purpose The purpose of this plugin is to provide users of Heartbeat more visibility of what's happening -in their infrastructure. It's primarily built using React and Apollo's GraphQL tools. +in their infrastructure. ## Layout @@ -11,13 +11,15 @@ There are three sections to the app, `common`, `public`, and `server`. ### common -Contains GraphQL types, constants and a few other files. +Contains runtime types types, constants and a few other files. + +Notably, we use `io-ts`/`fp-ts` functions and types to help provide +additional runtime safety for our API requests/responses. ### public -Components come in two main types, queries and functional. Queries are extended from Apollo's queries -type which abstracts a lot of the GraphQL connectivity away. Functional are dumb components that -don't store any state. +We use Redux and associated tools for managing our app state. Components come in the usual `connect`ed and +presentational varieties. The `lib` directory controls bootstrapping code and adapter types. @@ -27,12 +29,13 @@ The principal structure of the app is stored in `uptime_app.tsx`. ### server -There is a `graphql` directory which contains the resolvers, schema files, and constants. - The `lib` directory contains `adapters`, which are connections to external resources like Kibana Server, Elasticsearch, etc. In addition, it contains domains, which are libraries that provide functionality via adapters. +The `requests` directory contains functions responsible for querying Elasticsearch and parsing its +responses. + There's also a `rest_api` folder that defines the structure of the RESTful API endpoints. ## Testing diff --git a/x-pack/legacy/plugins/uptime/common/constants/context_defaults.ts b/x-pack/legacy/plugins/uptime/common/constants/context_defaults.ts index 540e60a28b066..c6b79afd9043b 100644 --- a/x-pack/legacy/plugins/uptime/common/constants/context_defaults.ts +++ b/x-pack/legacy/plugins/uptime/common/constants/context_defaults.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { SortOrder, CursorDirection } from '../graphql/types'; +import { CursorDirection, SortOrder } from '../runtime_types'; /** * The Uptime UI utilizes a settings context, the defaults for which are stored here. diff --git a/x-pack/legacy/plugins/uptime/common/constants/rest_api.ts b/x-pack/legacy/plugins/uptime/common/constants/rest_api.ts index dffa131870db1..9721d396625fc 100644 --- a/x-pack/legacy/plugins/uptime/common/constants/rest_api.ts +++ b/x-pack/legacy/plugins/uptime/common/constants/rest_api.ts @@ -7,6 +7,7 @@ export enum API_URLS { INDEX_PATTERN = `/api/uptime/index_pattern`, INDEX_STATUS = '/api/uptime/index_status', + MONITOR_LIST = `/api/uptime/monitor/list`, MONITOR_LOCATIONS = `/api/uptime/monitor/locations`, MONITOR_DURATION = `/api/uptime/monitor/duration`, MONITOR_DETAILS = `/api/uptime/monitor/details`, diff --git a/x-pack/legacy/plugins/uptime/common/graphql/types.ts b/x-pack/legacy/plugins/uptime/common/graphql/types.ts deleted file mode 100644 index 506966ec6b5c9..0000000000000 --- a/x-pack/legacy/plugins/uptime/common/graphql/types.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* tslint:disable */ - -// ==================================================== -// START: Typescript template -// ==================================================== - -// ==================================================== -// Scalars -// ==================================================== - -export type UnsignedInteger = any; - -// ==================================================== -// Types -// ==================================================== - -export interface Query { - /** Fetches the current state of Uptime monitors for the given parameters. */ - getMonitorStates?: MonitorSummaryResult | null; -} - -/** The monitor's status for a ping */ -export interface Duration { - us?: UnsignedInteger | null; -} - -export interface Rtt { - connect?: Duration | null; - - handshake?: Duration | null; - - validate?: Duration | null; -} - -export interface Summary { - up?: number | null; - - down?: number | null; - - geo?: CheckGeo | null; -} - -export interface CheckGeo { - name?: string | null; - - location?: Location | null; -} - -export interface Location { - lat?: number | null; - - lon?: number | null; -} - -export interface DocCount { - count: UnsignedInteger; -} - -/** The primary object returned for monitor states. */ -export interface MonitorSummaryResult { - /** Used to go to the next page of results */ - prevPagePagination?: string | null; - /** Used to go to the previous page of results */ - nextPagePagination?: string | null; - /** The objects representing the state of a series of heartbeat monitors. */ - summaries?: MonitorSummary[] | null; - /** The number of summaries. */ - totalSummaryCount: number; -} -/** Represents the current state and associated data for an Uptime monitor. */ -export interface MonitorSummary { - /** The ID assigned by the config or generated by the user. */ - monitor_id: string; - /** The state of the monitor and its associated details. */ - state: State; - - histogram?: SummaryHistogram | null; -} -/** Unifies the subsequent data for an uptime monitor. */ -export interface State { - /** The agent processing the monitor. */ - agent?: Agent | null; - /** There is a check object for each instance of the monitoring agent. */ - checks?: Check[] | null; - - geo?: StateGeo | null; - - observer?: StateObserver | null; - - monitor?: MonitorState | null; - - summary: Summary; - - timestamp: UnsignedInteger; - /** Transport encryption information. */ - tls?: (StateTls | null)[] | null; - - url?: StateUrl | null; -} - -export interface Agent { - id: string; -} - -export interface Check { - agent?: Agent | null; - - container?: StateContainer | null; - - kubernetes?: StateKubernetes | null; - - monitor: CheckMonitor; - - observer?: CheckObserver | null; - - timestamp: string; -} - -export interface StateContainer { - id?: string | null; -} - -export interface StateKubernetes { - pod?: StatePod | null; -} - -export interface StatePod { - uid?: string | null; -} - -export interface CheckMonitor { - ip?: string | null; - - name?: string | null; - - status: string; -} - -export interface CheckObserver { - geo?: CheckGeo | null; -} - -export interface StateGeo { - name?: (string | null)[] | null; - - location?: Location | null; -} - -export interface StateObserver { - geo?: StateGeo | null; -} - -export interface MonitorState { - status?: string | null; - - name?: string | null; - - id?: string | null; - - type?: string | null; -} -/** Contains monitor transmission encryption information. */ -export interface StateTls { - /** The date and time after which the certificate is invalid. */ - certificate_not_valid_after?: string | null; - - certificate_not_valid_before?: string | null; - - certificates?: string | null; - - rtt?: Rtt | null; -} - -export interface StateUrl { - domain?: string | null; - - full?: string | null; - - path?: string | null; - - port?: number | null; - - scheme?: string | null; -} -/** Monitor status data over time. */ -export interface SummaryHistogram { - /** The number of documents used to assemble the histogram. */ - count: number; - /** The individual histogram data points. */ - points: SummaryHistogramPoint[]; -} -/** Represents a monitor's statuses for a period of time. */ -export interface SummaryHistogramPoint { - /** The time at which these data were collected. */ - timestamp: UnsignedInteger; - /** The number of _up_ documents. */ - up: number; - /** The number of _down_ documents. */ - down: number; -} - -export interface GetMonitorStatesQueryArgs { - dateRangeStart: string; - - dateRangeEnd: string; - - pagination?: string | null; - - filters?: string | null; - - statusFilter?: string | null; - - pageSize: number; -} - -// ==================================================== -// Enums -// ==================================================== - -export enum CursorDirection { - AFTER = 'AFTER', - BEFORE = 'BEFORE', -} - -export enum SortOrder { - ASC = 'ASC', - DESC = 'DESC', -} - -// ==================================================== -// END: Typescript template -// ==================================================== diff --git a/x-pack/legacy/plugins/uptime/common/runtime_types/monitor/index.ts b/x-pack/legacy/plugins/uptime/common/runtime_types/monitor/index.ts index 80b48d09dc5b8..46b19d8442a94 100644 --- a/x-pack/legacy/plugins/uptime/common/runtime_types/monitor/index.ts +++ b/x-pack/legacy/plugins/uptime/common/runtime_types/monitor/index.ts @@ -6,3 +6,4 @@ export * from './details'; export * from './locations'; +export * from './state'; diff --git a/x-pack/legacy/plugins/uptime/common/runtime_types/monitor/state.ts b/x-pack/legacy/plugins/uptime/common/runtime_types/monitor/state.ts new file mode 100644 index 0000000000000..90aa692f89a42 --- /dev/null +++ b/x-pack/legacy/plugins/uptime/common/runtime_types/monitor/state.ts @@ -0,0 +1,145 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import * as t from 'io-ts'; + +export const CheckMonitorType = t.intersection([ + t.partial({ + name: t.string, + ip: t.union([t.array(t.string), t.string]), + }), + t.type({ + status: t.string, + }), +]); + +export const CheckType = t.intersection([ + t.partial({ + agent: t.partial({ + id: t.string, + }), + container: t.type({ + id: t.string, + }), + kubernetes: t.type({ + pod: t.type({ + uid: t.string, + }), + }), + observer: t.type({ + geo: t.partial({ + name: t.string, + location: t.partial({ + lat: t.number, + lon: t.number, + }), + }), + }), + }), + t.type({ + monitor: CheckMonitorType, + timestamp: t.number, + }), +]); + +export type Check = t.TypeOf; + +export const StateType = t.intersection([ + t.partial({ + checks: t.array(CheckType), + observer: t.partial({ + geo: t.partial({ + name: t.array(t.string), + }), + }), + summary: t.partial({ + up: t.number, + down: t.number, + geo: t.partial({ + name: t.string, + location: t.partial({ + lat: t.number, + lon: t.number, + }), + }), + }), + }), + t.type({ + timestamp: t.string, + url: t.partial({ + domain: t.string, + full: t.string, + path: t.string, + port: t.number, + scheme: t.string, + }), + }), +]); + +export const HistogramPointType = t.type({ + timestamp: t.number, + up: t.number, + down: t.number, +}); + +export type HistogramPoint = t.TypeOf; + +export const HistogramType = t.type({ + count: t.number, + points: t.array(HistogramPointType), +}); + +export type Histogram = t.TypeOf; + +export const MonitorSummaryType = t.intersection([ + t.type({ + monitor_id: t.string, + state: StateType, + }), + t.partial({ + histogram: HistogramType, + }), +]); + +export type MonitorSummary = t.TypeOf; + +export const MonitorSummaryResultType = t.intersection([ + t.partial({ + summaries: t.array(MonitorSummaryType), + }), + t.type({ + prevPagePagination: t.union([t.string, t.null]), + nextPagePagination: t.union([t.string, t.null]), + totalSummaryCount: t.number, + }), +]); + +export type MonitorSummaryResult = t.TypeOf; + +export const FetchMonitorStatesQueryArgsType = t.intersection([ + t.partial({ + pagination: t.string, + filters: t.string, + statusFilter: t.string, + }), + t.type({ + dateRangeStart: t.string, + dateRangeEnd: t.string, + pageSize: t.number, + }), +]); + +export type FetchMonitorStatesQueryArgs = t.TypeOf; + +export enum CursorDirection { + AFTER = 'AFTER', + BEFORE = 'BEFORE', +} + +export enum SortOrder { + ASC = 'ASC', + DESC = 'DESC', +} diff --git a/x-pack/legacy/plugins/uptime/public/components/connected/index.ts b/x-pack/legacy/plugins/uptime/public/components/connected/index.ts index be3cc5b65aa0e..94e2529a46a00 100644 --- a/x-pack/legacy/plugins/uptime/public/components/connected/index.ts +++ b/x-pack/legacy/plugins/uptime/public/components/connected/index.ts @@ -11,6 +11,7 @@ export { KueryBar } from './kuerybar/kuery_bar_container'; export { FilterGroup } from './filter_group/filter_group_container'; export { MonitorStatusDetails } from './monitor/status_details_container'; export { MonitorStatusBar } from './monitor/status_bar_container'; +export { MonitorList } from './monitor/monitor_list'; export { MonitorListDrawer } from './monitor/list_drawer_container'; export { MonitorListActionsPopover } from './monitor/drawer_popover_container'; export { PingList, PingListProps } from './pings'; diff --git a/x-pack/legacy/plugins/uptime/public/components/connected/monitor/list_drawer_container.tsx b/x-pack/legacy/plugins/uptime/public/components/connected/monitor/list_drawer_container.tsx index 70da62d5833af..37a96ba0396aa 100644 --- a/x-pack/legacy/plugins/uptime/public/components/connected/monitor/list_drawer_container.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/connected/monitor/list_drawer_container.tsx @@ -12,8 +12,7 @@ import { MonitorDetailsActionPayload } from '../../../state/actions/types'; import { getMonitorDetailsAction } from '../../../state/actions/monitor'; import { MonitorListDrawerComponent } from '../../functional/monitor_list/monitor_list_drawer/monitor_list_drawer'; import { useGetUrlParams } from '../../../hooks'; -import { MonitorSummary } from '../../../../common/graphql/types'; -import { MonitorDetails } from '../../../../common/runtime_types/monitor'; +import { MonitorDetails, MonitorSummary } from '../../../../common/runtime_types'; interface ContainerProps { summary: MonitorSummary; diff --git a/x-pack/legacy/plugins/uptime/public/components/connected/monitor/monitor_list.tsx b/x-pack/legacy/plugins/uptime/public/components/connected/monitor/monitor_list.tsx new file mode 100644 index 0000000000000..c9457664566b7 --- /dev/null +++ b/x-pack/legacy/plugins/uptime/public/components/connected/monitor/monitor_list.tsx @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React, { useCallback } from 'react'; +import { useSelector, useDispatch } from 'react-redux'; +import { getMonitorList } from '../../../state/actions'; +import { FetchMonitorStatesQueryArgs } from '../../../../common/runtime_types'; +import { monitorListSelector } from '../../../state/selectors'; +import { MonitorListComponent } from '../../functional/monitor_list'; + +export interface MonitorListProps { + filters?: string; + linkParameters?: string; +} + +export const MonitorList: React.FC = props => { + const dispatch = useDispatch(); + const dispatchCallback = useCallback( + (params: FetchMonitorStatesQueryArgs) => { + dispatch(getMonitorList(params)); + }, + [dispatch] + ); + const monitorListState = useSelector(monitorListSelector); + return ( + + ); +}; diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/charts/__tests__/__snapshots__/monitor_bar_series.test.tsx.snap b/x-pack/legacy/plugins/uptime/public/components/functional/charts/__tests__/__snapshots__/monitor_bar_series.test.tsx.snap index 8ca73879cab8c..b389139d71dbf 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/charts/__tests__/__snapshots__/monitor_bar_series.test.tsx.snap +++ b/x-pack/legacy/plugins/uptime/public/components/functional/charts/__tests__/__snapshots__/monitor_bar_series.test.tsx.snap @@ -82,7 +82,6 @@ exports[`MonitorBarSeries component shallow renders a series when there are down } > { let props: MonitorBarSeriesProps; - let histogramSeries: SummaryHistogramPoint[]; + let histogramSeries: HistogramPoint[]; beforeEach(() => { props = { - dangerColor: 'A danger color', histogramSeries: [ { timestamp: 124, @@ -193,16 +192,12 @@ describe('MonitorBarSeries component', () => { }); it('shallow renders nothing if the data series is null', () => { - const component = shallowWithRouter( - - ); + const component = shallowWithRouter(); expect(component).toEqual({}); }); it('renders if the data series is present', () => { - const component = renderWithRouter( - - ); + const component = renderWithRouter(); expect(component).toMatchSnapshot(); }); }); diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/charts/monitor_bar_series.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/charts/monitor_bar_series.tsx index 6a1e255d308d7..5e11685e36140 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/charts/monitor_bar_series.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/charts/monitor_bar_series.tsx @@ -14,23 +14,20 @@ import { timeFormatter, } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; -import React from 'react'; +import React, { useContext } from 'react'; import moment from 'moment'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiText, EuiToolTip } from '@elastic/eui'; -import { SummaryHistogramPoint } from '../../../../common/graphql/types'; +import { HistogramPoint } from '../../../../common/runtime_types'; import { getChartDateLabel, seriesHasDownValues } from '../../../lib/helper'; import { useUrlParams } from '../../../hooks'; +import { UptimeThemeContext } from '../../../contexts'; export interface MonitorBarSeriesProps { - /** - * The color to use for the display of down states. - */ - dangerColor: string; /** * The timeseries data to display. */ - histogramSeries: SummaryHistogramPoint[] | null; + histogramSeries: HistogramPoint[] | null; } /** @@ -38,7 +35,10 @@ export interface MonitorBarSeriesProps { * so we will only render the series component if there are down counts for the selected monitor. * @param props - the values for the monitor this chart visualizes */ -export const MonitorBarSeries = ({ dangerColor, histogramSeries }: MonitorBarSeriesProps) => { +export const MonitorBarSeries = ({ histogramSeries }: MonitorBarSeriesProps) => { + const { + colors: { danger }, + } = useContext(UptimeThemeContext); const [getUrlParams, updateUrlParams] = useUrlParams(); const { absoluteDateRangeStart, absoluteDateRangeEnd } = getUrlParams(); @@ -68,7 +68,7 @@ export const MonitorBarSeries = ({ dangerColor, histogramSeries }: MonitorBarSer /> [timestamp, down])} name={i18n.translate('xpack.uptime.monitorList.downLineSeries.downLabel', { defaultMessage: 'Down checks', diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/index.ts b/x-pack/legacy/plugins/uptime/public/components/functional/index.ts index d82912a6216e8..07809561c31b7 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/index.ts +++ b/x-pack/legacy/plugins/uptime/public/components/functional/index.ts @@ -13,7 +13,7 @@ export * from './alerts'; export { DonutChart } from './charts/donut_chart'; export { KueryBarComponent } from './kuery_bar/kuery_bar'; export { MonitorCharts } from './monitor_charts'; -export { MonitorList } from './monitor_list'; +export { MonitorListComponent } from './monitor_list'; export { OverviewPageParsingErrorCallout } from './overview_page_parsing_error_callout'; export { PingListComponent } from './ping_list'; export { PingHistogramComponent } from './charts'; diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/__snapshots__/monitor_list.test.tsx.snap b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/__snapshots__/monitor_list.test.tsx.snap index 2b8bc0bb06ddf..ed5602323d254 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/__snapshots__/monitor_list.test.tsx.snap +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/__snapshots__/monitor_list.test.tsx.snap @@ -1,125 +1,535 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`MonitorList component renders a no items message when no data is provided 1`] = ` - - - -
- -
-
- - + + +`; + +exports[`MonitorList component MonitorListPagination component renders the pagination 1`] = ` + + + +`; + +exports[`MonitorList component renders a no items message when no data is provided 1`] = ` + + + +`; + +exports[`MonitorList component renders error list 1`] = ` + + + +`; + +exports[`MonitorList component renders loading state 1`] = ` + + - - - - - - - - - - - - - - - - -
-
+ } + /> + `; exports[`MonitorList component renders the monitor list 1`] = ` @@ -672,185 +1082,132 @@ exports[`MonitorList component renders the monitor list 1`] = ` `; exports[`MonitorList component shallow renders the monitor list 1`] = ` - - - -
- -
-
- - + - - - - - - - - - - - - - - - - -
-
+ } + /> + `; diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/__snapshots__/monitor_list_pagination.test.tsx.snap b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/__snapshots__/monitor_list_pagination.test.tsx.snap deleted file mode 100644 index db5bfa72deb36..0000000000000 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/__snapshots__/monitor_list_pagination.test.tsx.snap +++ /dev/null @@ -1,307 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`MonitorListPagination component renders a no items message when no data is provided 1`] = ` - - - -
- -
-
- - - - - - - - - - - - - - - - - - -
-
-`; - -exports[`MonitorListPagination component renders the monitor list 1`] = ` - - - -
- -
-
- - - - - - - - - - - - - - - - - - -
-
-`; diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/monitor_list.test.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/monitor_list.test.tsx index d2030155d0092..9b1d799a23e37 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/monitor_list.test.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/monitor_list.test.tsx @@ -4,17 +4,30 @@ * you may not use this file except in compliance with the Elastic License. */ -import { shallowWithIntl } from 'test_utils/enzyme_helpers'; import React from 'react'; -import { MonitorSummaryResult } from '../../../../../common/graphql/types'; +import { + MonitorSummaryResult, + CursorDirection, + SortOrder, +} from '../../../../../common/runtime_types'; import { MonitorListComponent } from '../monitor_list'; -import { renderWithRouter } from '../../../../lib'; +import { renderWithRouter, shallowWithRouter } from '../../../../lib'; describe('MonitorList component', () => { let result: MonitorSummaryResult; + let localStorageMock: any; beforeEach(() => { + localStorageMock = { + getItem: jest.fn().mockImplementation(() => '25'), + setItem: jest.fn(), + }; + + // @ts-ignore replacing a call to localStorage we use for monitor list size + global.localStorage = localStorageMock; result = { + nextPagePagination: null, + prevPagePagination: null, summaries: [ { monitor_id: 'foo', @@ -25,21 +38,21 @@ describe('MonitorList component', () => { ip: '127.0.0.1', status: 'up', }, - timestamp: '124', + timestamp: 124, }, { monitor: { ip: '127.0.0.2', status: 'down', }, - timestamp: '125', + timestamp: 125, }, { monitor: { ip: '127.0.0.3', status: 'down', }, - timestamp: '126', + timestamp: 126, }, ], summary: { @@ -47,6 +60,7 @@ describe('MonitorList component', () => { down: 2, }, timestamp: '123', + url: {}, }, }, { @@ -58,14 +72,14 @@ describe('MonitorList component', () => { ip: '127.0.0.1', status: 'up', }, - timestamp: '125', + timestamp: 125, }, { monitor: { ip: '127.0.0.2', status: 'up', }, - timestamp: '126', + timestamp: 126, }, ], summary: { @@ -73,6 +87,7 @@ describe('MonitorList component', () => { down: 0, }, timestamp: '125', + url: {}, }, }, ], @@ -81,15 +96,11 @@ describe('MonitorList component', () => { }); it('shallow renders the monitor list', () => { - const component = shallowWithIntl( + const component = shallowWithRouter( ); @@ -97,15 +108,19 @@ describe('MonitorList component', () => { }); it('renders a no items message when no data is provided', () => { - const component = shallowWithIntl( + const component = shallowWithRouter( ); expect(component).toMatchSnapshot(); @@ -114,16 +129,156 @@ describe('MonitorList component', () => { it('renders the monitor list', () => { const component = renderWithRouter( + ); + + expect(component).toMatchSnapshot(); + }); + + it('renders error list', () => { + const component = shallowWithRouter( + ); expect(component).toMatchSnapshot(); }); + + it('renders loading state', () => { + const component = shallowWithRouter( + + ); + + expect(component).toMatchSnapshot(); + }); + + describe('MonitorListPagination component', () => { + let paginationResult: MonitorSummaryResult; + + beforeEach(() => { + paginationResult = { + prevPagePagination: JSON.stringify({ + cursorKey: { monitor_id: 123 }, + cursorDirection: CursorDirection.BEFORE, + sortOrder: SortOrder.ASC, + }), + nextPagePagination: JSON.stringify({ + cursorKey: { monitor_id: 456 }, + cursorDirection: CursorDirection.AFTER, + sortOrder: SortOrder.ASC, + }), + summaries: [ + { + monitor_id: 'foo', + state: { + checks: [ + { + monitor: { + ip: '127.0.0.1', + status: 'up', + }, + timestamp: 124, + }, + { + monitor: { + ip: '127.0.0.2', + status: 'down', + }, + timestamp: 125, + }, + { + monitor: { + ip: '127.0.0.3', + status: 'down', + }, + timestamp: 126, + }, + ], + summary: { + up: 1, + down: 2, + }, + timestamp: '123', + url: {}, + }, + }, + { + monitor_id: 'bar', + state: { + checks: [ + { + monitor: { + ip: '127.0.0.1', + status: 'up', + }, + timestamp: 125, + }, + { + monitor: { + ip: '127.0.0.2', + status: 'up', + }, + timestamp: 126, + }, + ], + summary: { + up: 2, + down: 0, + }, + timestamp: '125', + url: {}, + }, + }, + ], + totalSummaryCount: 2, + }; + }); + + it('renders the pagination', () => { + const component = shallowWithRouter( + + ); + + expect(component).toMatchSnapshot(); + }); + + it('renders a no items message when no data is provided', () => { + const component = shallowWithRouter( + + ); + + expect(component).toMatchSnapshot(); + }); + }); }); diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/monitor_list_pagination.test.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/monitor_list_pagination.test.tsx deleted file mode 100644 index b08b8b3fabc3e..0000000000000 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/monitor_list_pagination.test.tsx +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { shallowWithIntl } from 'test_utils/enzyme_helpers'; -import React from 'react'; -import { - CursorDirection, - MonitorSummaryResult, - SortOrder, -} from '../../../../../common/graphql/types'; -import { MonitorListComponent } from '../monitor_list'; - -describe('MonitorListPagination component', () => { - let result: MonitorSummaryResult; - - beforeEach(() => { - result = { - prevPagePagination: JSON.stringify({ - cursorKey: { monitor_id: 123 }, - cursorDirection: CursorDirection.BEFORE, - sortOrder: SortOrder.ASC, - }), - nextPagePagination: JSON.stringify({ - cursorKey: { monitor_id: 456 }, - cursorDirection: CursorDirection.AFTER, - sortOrder: SortOrder.ASC, - }), - summaries: [ - { - monitor_id: 'foo', - state: { - checks: [ - { - monitor: { - ip: '127.0.0.1', - status: 'up', - }, - timestamp: '124', - }, - { - monitor: { - ip: '127.0.0.2', - status: 'down', - }, - timestamp: '125', - }, - { - monitor: { - ip: '127.0.0.3', - status: 'down', - }, - timestamp: '126', - }, - ], - summary: { - up: 1, - down: 2, - }, - timestamp: '123', - }, - }, - { - monitor_id: 'bar', - state: { - checks: [ - { - monitor: { - ip: '127.0.0.1', - status: 'up', - }, - timestamp: '125', - }, - { - monitor: { - ip: '127.0.0.2', - status: 'up', - }, - timestamp: '126', - }, - ], - summary: { - up: 2, - down: 0, - }, - timestamp: '125', - }, - }, - ], - totalSummaryCount: 2, - }; - }); - - it('renders the monitor list', () => { - const component = shallowWithIntl( - - ); - - expect(component).toMatchSnapshot(); - }); - - it('renders a no items message when no data is provided', () => { - const component = shallowWithIntl( - - ); - expect(component).toMatchSnapshot(); - }); -}); diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/monitor_list_status_column.test.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/monitor_list_status_column.test.tsx index 406e18535f34c..d765c0b33ea4b 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/monitor_list_status_column.test.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/__tests__/monitor_list_status_column.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import moment from 'moment'; import { renderWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers'; import { getLocationStatus, MonitorListStatusColumn } from '../monitor_list_status_column'; -import { Check } from '../../../../../common/graphql/types'; +import { Check } from '../../../../../common/runtime_types'; import { STATUS } from '../../../../../common/constants'; describe('MonitorListStatusColumn', () => { @@ -29,9 +29,6 @@ describe('MonitorListStatusColumn', () => { beforeEach(() => { upChecks = [ { - agent: { id: '6a2f2a1c-e346-49ed-8418-6d48af8841d6' }, - container: null, - kubernetes: null, monitor: { ip: '104.86.46.103', name: '', @@ -46,12 +43,9 @@ describe('MonitorListStatusColumn', () => { }, }, }, - timestamp: '1579794631464', + timestamp: 1579794631464, }, { - agent: { id: '1117fd01-bc1a-4aa5-bfab-40ab455eadf9' }, - container: null, - kubernetes: null, monitor: { ip: '104.86.46.103', name: '', @@ -66,12 +60,9 @@ describe('MonitorListStatusColumn', () => { }, }, }, - timestamp: '1579794634220', + timestamp: 1579794634220, }, { - agent: { id: 'eda59510-45e8-4dfe-b0f8-959c449e3565' }, - container: null, - kubernetes: null, monitor: { ip: '104.86.46.103', name: '', @@ -86,15 +77,12 @@ describe('MonitorListStatusColumn', () => { }, }, }, - timestamp: '1579794628368', + timestamp: 1579794628368, }, ]; downChecks = [ { - agent: { id: '6a2f2a1c-e346-49ed-8418-6d48af8841d6' }, - container: null, - kubernetes: null, monitor: { ip: '104.86.46.103', name: '', @@ -109,12 +97,9 @@ describe('MonitorListStatusColumn', () => { }, }, }, - timestamp: '1579794631464', + timestamp: 1579794631464, }, { - agent: { id: '1117fd01-bc1a-4aa5-bfab-40ab455eadf9' }, - container: null, - kubernetes: null, monitor: { ip: '104.86.46.103', name: '', @@ -129,12 +114,9 @@ describe('MonitorListStatusColumn', () => { }, }, }, - timestamp: '1579794634220', + timestamp: 1579794634220, }, { - agent: { id: 'eda59510-45e8-4dfe-b0f8-959c449e3565' }, - container: null, - kubernetes: null, monitor: { ip: '104.86.46.103', name: '', @@ -149,15 +131,12 @@ describe('MonitorListStatusColumn', () => { }, }, }, - timestamp: '1579794628368', + timestamp: 1579794628368, }, ]; checks = [ { - agent: { id: '6a2f2a1c-e346-49ed-8418-6d48af8841d6' }, - container: null, - kubernetes: null, monitor: { ip: '104.86.46.103', name: '', @@ -172,12 +151,9 @@ describe('MonitorListStatusColumn', () => { }, }, }, - timestamp: '1579794631464', + timestamp: 1579794631464, }, { - agent: { id: '1117fd01-bc1a-4aa5-bfab-40ab455eadf9' }, - container: null, - kubernetes: null, monitor: { ip: '104.86.46.103', name: '', @@ -192,12 +168,9 @@ describe('MonitorListStatusColumn', () => { }, }, }, - timestamp: '1579794634220', + timestamp: 1579794634220, }, { - agent: { id: 'eda59510-45e8-4dfe-b0f8-959c449e3565' }, - container: null, - kubernetes: null, monitor: { ip: '104.86.46.103', name: '', @@ -212,7 +185,7 @@ describe('MonitorListStatusColumn', () => { }, }, }, - timestamp: '1579794628368', + timestamp: 1579794628368, }, ]; }); diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/index.ts b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/index.ts index a83330a7a3a0b..2dc43050f9515 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/index.ts +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/index.ts @@ -4,6 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -export { MonitorList } from './monitor_list'; +export { MonitorListComponent } from './monitor_list'; export { Criteria, Pagination } from './types'; export { LocationLink } from './monitor_list_drawer'; diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list.tsx index a9fb1ce2f4be1..6705101ccd572 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list.tsx @@ -16,17 +16,11 @@ import { EuiTitle, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import styled from 'styled-components'; -import { withUptimeGraphQL, UptimeGraphQLQueryProps } from '../../higher_order'; -import { monitorStatesQuery } from '../../../queries/monitor_states_query'; -import { - MonitorSummary, - MonitorSummaryResult, - SummaryHistogramPoint, -} from '../../../../common/graphql/types'; +import { HistogramPoint, FetchMonitorStatesQueryArgs } from '../../../../common/runtime_types'; +import { MonitorSummary } from '../../../../common/runtime_types'; import { MonitorListStatusColumn } from './monitor_list_status_column'; -import { formatUptimeGraphQLErrorList } from '../../../lib/helper/format_error_list'; import { ExpandedRowMap } from './types'; import { MonitorBarSeries } from '../charts'; import { MonitorPageLink } from './monitor_page_link'; @@ -34,36 +28,69 @@ import { OverviewPageLink } from './overview_page_link'; import * as labels from './translations'; import { MonitorListDrawer } from '../../connected'; import { MonitorListPageSizeSelect } from './monitor_list_page_size_select'; +import { MonitorListProps } from '../../connected/monitor/monitor_list'; +import { MonitorList } from '../../../state/reducers/monitor_list'; +import { useUrlParams } from '../../../hooks'; -interface MonitorListQueryResult { - monitorStates?: MonitorSummaryResult; -} - -interface MonitorListProps { - dangerColor: string; - hasActiveFilters: boolean; - successColor: string; - linkParameters?: string; - pageSize: number; - setPageSize: (size: number) => void; +interface Props extends MonitorListProps { + lastRefresh: number; + monitorList: MonitorList; + getMonitorList: (params: FetchMonitorStatesQueryArgs) => void; } -type Props = UptimeGraphQLQueryProps & MonitorListProps; - const TruncatedEuiLink = styled(EuiLink)` white-space: nowrap; overflow: hidden; text-overflow: ellipsis; `; -export const MonitorListComponent = (props: Props) => { - const { dangerColor, data, errors, hasActiveFilters, linkParameters, loading } = props; +const DEFAULT_PAGE_SIZE = 10; +const LOCAL_STORAGE_KEY = 'xpack.uptime.monitorList.pageSize'; +const getPageSizeValue = () => { + const value = parseInt(localStorage.getItem(LOCAL_STORAGE_KEY) ?? '', 10); + if (isNaN(value)) { + return DEFAULT_PAGE_SIZE; + } + return value; +}; + +export const MonitorListComponent: React.FC = ({ + filters, + getMonitorList, + lastRefresh, + monitorList: { list, error, loading }, + linkParameters, +}) => { + const [pageSize, setPageSize] = useState(getPageSizeValue()); const [drawerIds, updateDrawerIds] = useState([]); - const items = data?.monitorStates?.summaries ?? []; + const [getUrlValues] = useUrlParams(); + const { dateRangeStart, dateRangeEnd, pagination, statusFilter } = getUrlValues(); + + useEffect(() => { + getMonitorList({ + dateRangeStart, + dateRangeEnd, + filters, + pageSize, + pagination, + statusFilter, + }); + }, [ + getMonitorList, + dateRangeStart, + dateRangeEnd, + filters, + lastRefresh, + pageSize, + pagination, + statusFilter, + ]); + + const items = list.summaries ?? []; - const nextPagePagination = data?.monitorStates?.nextPagePagination ?? ''; - const prevPagePagination = data?.monitorStates?.prevPagePagination ?? ''; + const nextPagePagination = list.nextPagePagination ?? ''; + const prevPagePagination = list.prevPagePagination ?? ''; const getExpandedRowMap = () => { return drawerIds.reduce((map: ExpandedRowMap, id: string) => { @@ -123,8 +150,8 @@ export const MonitorListComponent = (props: Props) => { mobileOptions: { show: false, }, - render: (histogramSeries: SummaryHistogramPoint[] | null) => ( - + render: (histogramSeries: HistogramPoint[] | null) => ( + ), }, { @@ -153,70 +180,61 @@ export const MonitorListComponent = (props: Props) => { ]; return ( - <> - - -
- -
-
- - - - - - - - - - - - - - - - - - -
- + + +
+ +
+
+ + + + + + + + + + + + + + + + + + +
); }; - -export const MonitorList = withUptimeGraphQL( - MonitorListComponent, - monitorStatesQuery -); diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/__snapshots__/monitor_list_drawer.test.tsx.snap b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/__snapshots__/monitor_list_drawer.test.tsx.snap index cf754581b1a33..4520b760be379 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/__snapshots__/monitor_list_drawer.test.tsx.snap +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/__snapshots__/monitor_list_drawer.test.tsx.snap @@ -71,21 +71,21 @@ exports[`MonitorListDrawer component renders a MonitorListDrawer when there are "ip": "127.0.0.1", "status": "up", }, - "timestamp": "121", + "timestamp": 121, }, Object { "monitor": Object { "ip": "127.0.0.2", "status": "down", }, - "timestamp": "123", + "timestamp": 123, }, Object { "monitor": Object { "ip": "127.0.0.3", "status": "up", }, - "timestamp": "125", + "timestamp": 125, }, ], "summary": Object { @@ -175,7 +175,7 @@ exports[`MonitorListDrawer component renders a MonitorListDrawer when there is o "ip": "127.0.0.1", "status": "up", }, - "timestamp": "121", + "timestamp": 121, }, ], "summary": Object { diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/integration_group.test.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/integration_group.test.tsx index 723f8f9f4430a..48fa2c9766681 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/integration_group.test.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/integration_group.test.tsx @@ -5,7 +5,7 @@ */ import React from 'react'; -import { MonitorSummary } from '../../../../../../common/graphql/types'; +import { MonitorSummary } from '../../../../../../common/runtime_types'; import { shallowWithIntl } from 'test_utils/enzyme_helpers'; import { IntegrationGroup } from '../integration_group'; @@ -19,6 +19,7 @@ describe('IntegrationGroup', () => { summary: {}, checks: [], timestamp: '123', + url: {}, }, }; }); diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/monitor_list_drawer.test.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/monitor_list_drawer.test.tsx index d870acefaaea6..4bc0c3f0a40ba 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/monitor_list_drawer.test.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/monitor_list_drawer.test.tsx @@ -4,10 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ import 'jest'; -import { MonitorSummary, Check } from '../../../../../../common/graphql/types'; import React from 'react'; import { MonitorListDrawerComponent } from '../monitor_list_drawer'; -import { MonitorDetails } from '../../../../../../common/runtime_types'; +import { Check, MonitorDetails, MonitorSummary } from '../../../../../../common/runtime_types'; import { shallowWithRouter } from '../../../../../lib'; describe('MonitorListDrawer component', () => { @@ -24,7 +23,7 @@ describe('MonitorListDrawer component', () => { ip: '127.0.0.1', status: 'up', }, - timestamp: '121', + timestamp: 121, }, ], summary: { @@ -77,21 +76,21 @@ describe('MonitorListDrawer component', () => { ip: '127.0.0.1', status: 'up', }, - timestamp: '121', + timestamp: 121, }, { monitor: { ip: '127.0.0.2', status: 'down', }, - timestamp: '123', + timestamp: 123, }, { monitor: { ip: '127.0.0.3', status: 'up', }, - timestamp: '125', + timestamp: 125, }, ]; summary.state.checks = checks; diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/monitor_status_list.test.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/monitor_status_list.test.tsx index 8c07d0b1a7d22..c7f3aef4075e1 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/monitor_status_list.test.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/monitor_status_list.test.tsx @@ -8,7 +8,7 @@ import { shallowWithIntl } from 'test_utils/enzyme_helpers'; import React from 'react'; import moment from 'moment'; import { MonitorStatusList } from '../monitor_status_list'; -import { Check } from '../../../../../../common/graphql/types'; +import { Check } from '../../../../../../common/runtime_types'; describe('MonitorStatusList component', () => { let checks: Check[]; @@ -21,110 +21,92 @@ describe('MonitorStatusList component', () => { beforeEach(() => { checks = [ { - agent: { id: '8f9a37fb-573a-4fdc-9895-440a5b39c250' }, monitor: { ip: '151.101.130.217', name: 'elastic', status: 'up', }, observer: { - geo: { name: null, location: null }, + geo: {}, }, - timestamp: '1570538236414', + timestamp: 1570538236414, }, { - agent: { id: '8f9a37fb-573a-4fdc-9895-440a5b39c250' }, monitor: { ip: '151.101.194.217', name: 'elastic', status: 'up', }, observer: { - geo: { name: null, location: null }, + geo: {}, }, - timestamp: '1570538236414', + timestamp: 1570538236414, }, { - agent: { id: '8f9a37fb-573a-4fdc-9895-440a5b39c250' }, monitor: { ip: '151.101.2.217', name: 'elastic', status: 'up', }, observer: { - geo: { name: null, location: null }, + geo: {}, }, - timestamp: '1570538236414', + timestamp: 1570538236414, }, { - agent: { id: '8f9a37fb-573a-4fdc-9895-440a5b39c250' }, - container: null, - kubernetes: null, monitor: { ip: '151.101.66.217', name: 'elastic', status: 'up', }, observer: { - geo: { name: null, location: null }, + geo: {}, }, - timestamp: '1570538236414', + timestamp: 1570538236414, }, { - agent: { id: '8f9a37fb-573a-4fdc-9895-440a5b39c250' }, - container: null, - kubernetes: null, monitor: { ip: '2a04:4e42:200::729', name: 'elastic', status: 'down', }, observer: { - geo: { name: null, location: null }, + geo: {}, }, - timestamp: '1570538236414', + timestamp: 1570538236414, }, { - agent: { id: '8f9a37fb-573a-4fdc-9895-440a5b39c250' }, - container: null, - kubernetes: null, monitor: { ip: '2a04:4e42:400::729', name: 'elastic', status: 'down', }, observer: { - geo: { name: null, location: null }, + geo: {}, }, - timestamp: '1570538236414', + timestamp: 1570538236414, }, { - agent: { id: '8f9a37fb-573a-4fdc-9895-440a5b39c250' }, - container: null, - kubernetes: null, monitor: { ip: '2a04:4e42:600::729', name: 'elastic', status: 'down', }, observer: { - geo: { name: null, location: null }, + geo: {}, }, - timestamp: '1570538236414', + timestamp: 1570538236414, }, { - agent: { id: '8f9a37fb-573a-4fdc-9895-440a5b39c250' }, - container: null, - kubernetes: null, monitor: { ip: '2a04:4e42::729', name: 'elastic', status: 'down', }, observer: { - geo: { name: null, location: null }, + geo: {}, }, - timestamp: '1570538236414', + timestamp: 1570538236414, }, ]; }); diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/integration_group.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/integration_group.tsx index 34bff58a3e2d9..cc06b9a2306c7 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/integration_group.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/integration_group.tsx @@ -19,7 +19,7 @@ import { getLoggingIpHref, getLoggingKubernetesHref, } from '../../../../lib/helper'; -import { MonitorSummary } from '../../../../../common/graphql/types'; +import { MonitorSummary } from '../../../../../common/runtime_types'; import { UptimeSettingsContext } from '../../../../contexts'; interface IntegrationGroupProps { diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/monitor_list_actions_popover.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/monitor_list_actions_popover.tsx index 6b946baa8d403..c57ecbaa4d3ed 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/monitor_list_actions_popover.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/monitor_list_actions_popover.tsx @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { EuiPopover, EuiButton } from '@elastic/eui'; import { IntegrationGroup } from './integration_group'; -import { MonitorSummary } from '../../../../../common/graphql/types'; +import { MonitorSummary } from '../../../../../common/runtime_types'; import { toggleIntegrationsPopover, PopoverState } from '../../../../state/actions'; interface MonitorListActionsPopoverProps { diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/monitor_list_drawer.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/monitor_list_drawer.tsx index 8383596ccc346..6dc9ebbef1287 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/monitor_list_drawer.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/monitor_list_drawer.tsx @@ -7,10 +7,9 @@ import React from 'react'; import styled from 'styled-components'; import { EuiLink, EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText } from '@elastic/eui'; -import { MonitorSummary } from '../../../../../common/graphql/types'; import { MostRecentError } from './most_recent_error'; import { MonitorStatusList } from './monitor_status_list'; -import { MonitorDetails } from '../../../../../common/runtime_types'; +import { MonitorDetails, MonitorSummary } from '../../../../../common/runtime_types'; import { MonitorListActionsPopover } from '../../../connected'; const ContainerDiv = styled.div` diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/monitor_status_list.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/monitor_status_list.tsx index a2042e379dd80..8a46167dcd3bc 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/monitor_status_list.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/monitor_status_list.tsx @@ -8,9 +8,9 @@ import React from 'react'; import { get, capitalize } from 'lodash'; import { EuiCallOut, EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import { Check } from '../../../../../common/graphql/types'; import { LocationLink } from './location_link'; import { MonitorStatusRow } from './monitor_status_row'; +import { Check } from '../../../../../common/runtime_types'; import { STATUS, UNNAMED_LOCATION } from '../../../../../common/constants'; interface MonitorStatusListProps { diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_status_column.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_status_column.tsx index 7e23be572a6f9..8076fe66cc208 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_status_column.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_status_column.tsx @@ -11,7 +11,7 @@ import { capitalize } from 'lodash'; import styled from 'styled-components'; import { EuiHealth, EuiFlexGroup, EuiFlexItem, EuiText, EuiToolTip } from '@elastic/eui'; import { parseTimestamp } from './parse_timestamp'; -import { Check } from '../../../../common/graphql/types'; +import { Check } from '../../../../common/runtime_types'; import { STATUS, SHORT_TIMESPAN_LOCALE, diff --git a/x-pack/legacy/plugins/uptime/public/components/higher_order/index.ts b/x-pack/legacy/plugins/uptime/public/components/higher_order/index.ts index e0e14456cfc68..0682f6d0478f3 100644 --- a/x-pack/legacy/plugins/uptime/public/components/higher_order/index.ts +++ b/x-pack/legacy/plugins/uptime/public/components/higher_order/index.ts @@ -4,5 +4,4 @@ * you may not use this file except in compliance with the Elastic License. */ -export { UptimeGraphQLQueryProps, withUptimeGraphQL } from './uptime_graphql_query'; export { ResponsiveWrapperProps, withResponsiveWrapper } from './responsive_wrapper'; diff --git a/x-pack/legacy/plugins/uptime/public/components/higher_order/uptime_graphql_query.tsx b/x-pack/legacy/plugins/uptime/public/components/higher_order/uptime_graphql_query.tsx deleted file mode 100644 index 6839050cec7a8..0000000000000 --- a/x-pack/legacy/plugins/uptime/public/components/higher_order/uptime_graphql_query.tsx +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { OperationVariables } from 'apollo-client'; -import { GraphQLError } from 'graphql'; -import React, { Fragment, useContext, useEffect, useState } from 'react'; -import { withApollo, WithApolloClient } from 'react-apollo'; -import { formatUptimeGraphQLErrorList } from '../../lib/helper/format_error_list'; -import { UptimeRefreshContext } from '../../contexts'; - -export interface UptimeGraphQLQueryProps { - loading: boolean; - data?: T; - errors?: GraphQLError[]; -} - -interface UptimeGraphQLProps { - implementsCustomErrorState?: boolean; - variables: OperationVariables; -} - -/** - * This HOC abstracts the task of querying our GraphQL endpoint, - * which eliminates the need for a lot of boilerplate code in the other components. - * - * @type T - the expected result's type - * @type P - any props the wrapped component will require - * @param WrappedComponent - the consuming component - * @param query - the graphQL query - */ -export function withUptimeGraphQL(WrappedComponent: any, query: any) { - type Props = UptimeGraphQLProps & WithApolloClient & P; - - return withApollo((props: Props) => { - const { lastRefresh } = useContext(UptimeRefreshContext); - const [loading, setLoading] = useState(true); - const [data, setData] = useState(undefined); - const [errors, setErrors] = useState(undefined); - let updateState = ( - loadingVal: boolean, - dataVal: T | undefined, - errorsVal: GraphQLError[] | undefined - ) => { - setLoading(loadingVal); - setData(dataVal); - setErrors(errorsVal); - }; - const { client, implementsCustomErrorState, variables } = props; - const fetch = () => { - setLoading(true); - client - .query({ fetchPolicy: 'network-only', query, variables }) - .then( - (result: any) => { - updateState(result.loading, result.data, result.errors); - }, - (result: any) => { - updateState(false, undefined, result.graphQLErrors); - } - ); - }; - useEffect(() => { - fetch(); - - /** - * If the `then` handler in `fetch`'s promise is fired after - * this component has unmounted, it will try to set state on an - * unmounted component, which indicates a memory leak and will trigger - * React warnings. - * - * We counteract this side effect by providing a cleanup function that will - * reassign the update function to do nothing with the returned values. - */ - return () => { - // this component is planned to be deprecated, for the time being - // we will want to preserve this for the reason above. - // eslint-disable-next-line react-hooks/exhaustive-deps - updateState = () => {}; - }; - }, [variables, lastRefresh]); - if (!implementsCustomErrorState && errors && errors.length > 0) { - return {formatUptimeGraphQLErrorList(errors)}; - } - return ; - }); -} diff --git a/x-pack/legacy/plugins/uptime/public/lib/adapters/framework/apollo_client_adapter.ts b/x-pack/legacy/plugins/uptime/public/lib/adapters/framework/apollo_client_adapter.ts deleted file mode 100644 index 2cec0d5fc8c64..0000000000000 --- a/x-pack/legacy/plugins/uptime/public/lib/adapters/framework/apollo_client_adapter.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { InMemoryCache } from 'apollo-cache-inmemory'; -import { ApolloClient } from 'apollo-client'; -import { HttpLink } from 'apollo-link-http'; -import { CreateGraphQLClient } from './framework_adapter_types'; - -export const createApolloClient: CreateGraphQLClient = (uri: string, xsrfHeader: string) => - new ApolloClient({ - link: new HttpLink({ uri, credentials: 'same-origin', headers: { 'kbn-xsrf': xsrfHeader } }), - cache: new InMemoryCache({ dataIdFromObject: () => undefined }), - }); diff --git a/x-pack/legacy/plugins/uptime/public/lib/adapters/framework/framework_adapter_types.ts b/x-pack/legacy/plugins/uptime/public/lib/adapters/framework/framework_adapter_types.ts deleted file mode 100644 index 34cf48514c932..0000000000000 --- a/x-pack/legacy/plugins/uptime/public/lib/adapters/framework/framework_adapter_types.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { NormalizedCacheObject } from 'apollo-cache-inmemory'; -import { ApolloClient } from 'apollo-client'; - -export type GraphQLClient = ApolloClient; - -export type CreateGraphQLClient = (url: string, xsrfHeader: string) => GraphQLClient; diff --git a/x-pack/legacy/plugins/uptime/public/lib/adapters/framework/new_platform_adapter.tsx b/x-pack/legacy/plugins/uptime/public/lib/adapters/framework/new_platform_adapter.tsx index a2f3328b98612..71c73bf5ba5d4 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/adapters/framework/new_platform_adapter.tsx +++ b/x-pack/legacy/plugins/uptime/public/lib/adapters/framework/new_platform_adapter.tsx @@ -20,7 +20,6 @@ import { DEFAULT_TIMEPICKER_QUICK_RANGES, } from '../../../../common/constants'; import { UMFrameworkAdapter } from '../../lib'; -import { createApolloClient } from './apollo_client_adapter'; export const getKibanaFrameworkAdapter = ( core: CoreStart, @@ -60,7 +59,6 @@ export const getKibanaFrameworkAdapter = ( const props: UptimeAppProps = { basePath: basePath.get(), canSave, - client: createApolloClient(`${basePath.get()}/api/uptime/graphql`, 'true'), core, darkMode: core.uiSettings.get(DEFAULT_DARK_MODE), commonlyUsedRanges: core.uiSettings.get(DEFAULT_TIMEPICKER_QUICK_RANGES), diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/__snapshots__/format_error_string.test.ts.snap b/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/__snapshots__/format_error_string.test.ts.snap deleted file mode 100644 index 8519157e4039e..0000000000000 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/__snapshots__/format_error_string.test.ts.snap +++ /dev/null @@ -1,7 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`formatErrorString returns a formatted string containing each error 1`] = ` -"Error: foo is bar -Error: bar is not foo -" -`; diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/format_error_string.test.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/format_error_string.test.ts deleted file mode 100644 index ba437c05cbe2b..0000000000000 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/format_error_string.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { formatUptimeGraphQLErrorList } from '../format_error_list'; - -describe('formatErrorString', () => { - it('returns an empty string for empty array', () => { - const result = formatUptimeGraphQLErrorList([]); - expect(result).toEqual(''); - }); - it('returns a formatted string containing each error', () => { - const result = formatUptimeGraphQLErrorList([ - { - message: 'foo is bar', - locations: undefined, - path: undefined, - nodes: undefined, - source: undefined, - positions: undefined, - originalError: undefined, - extensions: undefined, - name: 'test error', - }, - { - message: 'bar is not foo', - locations: undefined, - path: undefined, - nodes: undefined, - source: undefined, - positions: undefined, - originalError: undefined, - extensions: undefined, - name: 'test error', - }, - ]); - expect(result).toMatchSnapshot(); - }); -}); diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/format_error_list.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/format_error_list.ts deleted file mode 100644 index a23122c5eead5..0000000000000 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/format_error_list.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { i18n } from '@kbn/i18n'; -import { GraphQLError } from 'graphql'; - -export const formatUptimeGraphQLErrorList = (errors: GraphQLError[]) => - errors.reduce( - (errorString, error) => - errorString.concat( - `${i18n.translate('xpack.uptime.errorMessage', { - values: { message: error.message }, - defaultMessage: 'Error: {message}', - })}\n` - ), - '' - ); diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_apm_href.test.ts.snap b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_apm_href.test.ts.snap deleted file mode 100644 index 53d336b52bd24..0000000000000 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_apm_href.test.ts.snap +++ /dev/null @@ -1,5 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`getApmHref creates href with base path when present 1`] = `"foo/app/apm#/services?kuery=url.domain:%20%22www.elastic.co%22&rangeFrom=now-15m&rangeTo=now"`; - -exports[`getApmHref does not add a base path or extra slash when base path is empty string 1`] = `"/app/apm#/services?kuery=url.domain:%20%22www.elastic.co%22&rangeFrom=now-15m&rangeTo=now"`; diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_infra_href.test.ts.snap b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_infra_href.test.ts.snap deleted file mode 100644 index e79eb50d384a8..0000000000000 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_infra_href.test.ts.snap +++ /dev/null @@ -1,19 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`getInfraHref getInfraContainerHref creates a link for valid parameters 1`] = `"foo/app/metrics/link-to/container-detail/test-container-id"`; - -exports[`getInfraHref getInfraContainerHref does not specify a base path when none is available 1`] = `"/app/metrics/link-to/container-detail/test-container-id"`; - -exports[`getInfraHref getInfraContainerHref returns the first item when multiple container ids are supplied 1`] = `"bar/app/metrics/link-to/container-detail/test-container-id"`; - -exports[`getInfraHref getInfraIpHref creates a link for valid parameters 1`] = `"bar/app/metrics/inventory?waffleFilter=(expression:'host.ip%20%3A%20151.101.202.217',kind:kuery)"`; - -exports[`getInfraHref getInfraIpHref does not specify a base path when none is available 1`] = `"/app/metrics/inventory?waffleFilter=(expression:'host.ip%20%3A%20151.101.202.217',kind:kuery)"`; - -exports[`getInfraHref getInfraIpHref returns a url for ors between multiple ips 1`] = `"foo/app/metrics/inventory?waffleFilter=(expression:'host.ip%20%3A%20152.151.23.192%20or%20host.ip%20%3A%20151.101.202.217',kind:kuery)"`; - -exports[`getInfraHref getInfraKubernetesHref creates a link for valid parameters 1`] = `"foo/app/metrics/link-to/pod-detail/test-pod-uid"`; - -exports[`getInfraHref getInfraKubernetesHref does not specify a base path when none is available 1`] = `"/app/metrics/link-to/pod-detail/test-pod-uid"`; - -exports[`getInfraHref getInfraKubernetesHref selects the first pod uid when there are multiple 1`] = `"/app/metrics/link-to/pod-detail/test-pod-uid"`; diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_logging_href.test.ts.snap b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_logging_href.test.ts.snap deleted file mode 100644 index cfac6ce133c8a..0000000000000 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/__snapshots__/get_logging_href.test.ts.snap +++ /dev/null @@ -1,13 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`getLoggingHref creates a container href with base path when present 1`] = `"bar/app/logs?logFilter=(expression:'container.id%20:%20test-container-id',kind:kuery)"`; - -exports[`getLoggingHref creates a container href without a base path if it's an empty string 1`] = `"/app/logs?logFilter=(expression:'container.id%20:%20test-container-id',kind:kuery)"`; - -exports[`getLoggingHref creates a pod href with base path when present 1`] = `"bar/app/logs?logFilter=(expression:'pod.uid%20:%20test-pod-id',kind:kuery)"`; - -exports[`getLoggingHref creates a pod href without a base path when it's an empty string 1`] = `"/app/logs?logFilter=(expression:'pod.uid%20:%20test-pod-id',kind:kuery)"`; - -exports[`getLoggingHref creates an ip href with base path when present 1`] = `"bar/app/logs?logFilter=(expression:'pod.uid%20:%20test-pod-id',kind:kuery)"`; - -exports[`getLoggingHref creates an ip href without a base path when it's an empty string 1`] = `"/app/logs?logFilter=(expression:'host.ip%20%3A%20151.101.202.217',kind:kuery)"`; diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_apm_href.test.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_apm_href.test.ts index db49e95896ac1..f27ed78d593ac 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_apm_href.test.ts +++ b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_apm_href.test.ts @@ -5,7 +5,7 @@ */ import { getApmHref } from '../get_apm_href'; -import { MonitorSummary } from '../../../../../common/graphql/types'; +import { MonitorSummary } from '../../../../../common/runtime_types'; describe('getApmHref', () => { let summary: MonitorSummary; @@ -29,7 +29,7 @@ describe('getApmHref', () => { uid: 'test-pod-id', }, }, - timestamp: '123', + timestamp: 123, }, ], timestamp: '123', @@ -43,11 +43,15 @@ describe('getApmHref', () => { it('creates href with base path when present', () => { const result = getApmHref(summary, 'foo', 'now-15m', 'now'); - expect(result).toMatchSnapshot(); + expect(result).toMatchInlineSnapshot( + `"foo/app/apm#/services?kuery=url.domain:%20%22www.elastic.co%22&rangeFrom=now-15m&rangeTo=now"` + ); }); it('does not add a base path or extra slash when base path is empty string', () => { const result = getApmHref(summary, '', 'now-15m', 'now'); - expect(result).toMatchSnapshot(); + expect(result).toMatchInlineSnapshot( + `"/app/apm#/services?kuery=url.domain:%20%22www.elastic.co%22&rangeFrom=now-15m&rangeTo=now"` + ); }); }); diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_infra_href.test.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_infra_href.test.ts index c2360c321da8f..ee5db74af22c2 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_infra_href.test.ts +++ b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_infra_href.test.ts @@ -5,7 +5,7 @@ */ import { getInfraContainerHref, getInfraKubernetesHref, getInfraIpHref } from '../get_infra_href'; -import { MonitorSummary } from '../../../../../common/graphql/types'; +import { MonitorSummary } from '../../../../../common/runtime_types'; describe('getInfraHref', () => { let summary: MonitorSummary; @@ -13,7 +13,6 @@ describe('getInfraHref', () => { summary = { monitor_id: 'foo', state: { - summary: {}, checks: [ { monitor: { @@ -28,9 +27,11 @@ describe('getInfraHref', () => { uid: 'test-pod-uid', }, }, - timestamp: '123', + timestamp: 123, }, ], + summary: {}, + url: {}, timestamp: '123', }, }; @@ -38,11 +39,15 @@ describe('getInfraHref', () => { it('getInfraContainerHref creates a link for valid parameters', () => { const result = getInfraContainerHref(summary, 'foo'); - expect(result).toMatchSnapshot(); + expect(result).toMatchInlineSnapshot( + `"foo/app/metrics/link-to/container-detail/test-container-id"` + ); }); it('getInfraContainerHref does not specify a base path when none is available', () => { - expect(getInfraContainerHref(summary, '')).toMatchSnapshot(); + expect(getInfraContainerHref(summary, '')).toMatchInlineSnapshot( + `"/app/metrics/link-to/container-detail/test-container-id"` + ); }); it('getInfraContainerHref returns undefined when no container id is present', () => { @@ -65,7 +70,7 @@ describe('getInfraHref', () => { uid: 'test-pod-uid', }, }, - timestamp: '123', + timestamp: 123, }, { monitor: { @@ -80,10 +85,12 @@ describe('getInfraHref', () => { uid: 'test-pod-uid-bar', }, }, - timestamp: '123', + timestamp: 123, }, ]; - expect(getInfraContainerHref(summary, 'bar')).toMatchSnapshot(); + expect(getInfraContainerHref(summary, 'bar')).toMatchInlineSnapshot( + `"bar/app/metrics/link-to/container-detail/test-container-id"` + ); }); it('getInfraContainerHref returns undefined when checks are undefined', () => { @@ -94,11 +101,13 @@ describe('getInfraHref', () => { it('getInfraKubernetesHref creates a link for valid parameters', () => { const result = getInfraKubernetesHref(summary, 'foo'); expect(result).not.toBeUndefined(); - expect(result).toMatchSnapshot(); + expect(result).toMatchInlineSnapshot(`"foo/app/metrics/link-to/pod-detail/test-pod-uid"`); }); it('getInfraKubernetesHref does not specify a base path when none is available', () => { - expect(getInfraKubernetesHref(summary, '')).toMatchSnapshot(); + expect(getInfraKubernetesHref(summary, '')).toMatchInlineSnapshot( + `"/app/metrics/link-to/pod-detail/test-pod-uid"` + ); }); it('getInfraKubernetesHref returns undefined when no pod data is present', () => { @@ -121,7 +130,7 @@ describe('getInfraHref', () => { uid: 'test-pod-uid', }, }, - timestamp: '123', + timestamp: 123, }, { monitor: { @@ -136,10 +145,12 @@ describe('getInfraHref', () => { uid: 'test-pod-uid-bar', }, }, - timestamp: '123', + timestamp: 123, }, ]; - expect(getInfraKubernetesHref(summary, '')).toMatchSnapshot(); + expect(getInfraKubernetesHref(summary, '')).toMatchInlineSnapshot( + `"/app/metrics/link-to/pod-detail/test-pod-uid"` + ); }); it('getInfraKubernetesHref returns undefined when checks are undefined', () => { @@ -148,17 +159,21 @@ describe('getInfraHref', () => { }); it('getInfraKubernetesHref returns undefined when checks are null', () => { - summary.state.checks![0]!.kubernetes!.pod!.uid = null; + delete summary.state.checks![0]!.kubernetes!.pod!.uid; expect(getInfraKubernetesHref(summary, '')).toBeUndefined(); }); it('getInfraIpHref creates a link for valid parameters', () => { const result = getInfraIpHref(summary, 'bar'); - expect(result).toMatchSnapshot(); + expect(result).toMatchInlineSnapshot( + `"bar/app/metrics/inventory?waffleFilter=(expression:'host.ip%20%3A%20151.101.202.217',kind:kuery)"` + ); }); it('getInfraIpHref does not specify a base path when none is available', () => { - expect(getInfraIpHref(summary, '')).toMatchSnapshot(); + expect(getInfraIpHref(summary, '')).toMatchInlineSnapshot( + `"/app/metrics/inventory?waffleFilter=(expression:'host.ip%20%3A%20151.101.202.217',kind:kuery)"` + ); }); it('getInfraIpHref returns undefined when ip is undefined', () => { @@ -167,14 +182,14 @@ describe('getInfraHref', () => { }); it('getInfraIpHref returns undefined when ip is null', () => { - summary.state.checks![0].monitor.ip = null; + delete summary.state.checks![0].monitor.ip; expect(getInfraIpHref(summary, 'foo')).toBeUndefined(); }); it('getInfraIpHref returns a url for ors between multiple ips', () => { summary.state.checks = [ { - timestamp: '123', + timestamp: 123, monitor: { ip: '152.151.23.192', status: 'up', @@ -193,10 +208,12 @@ describe('getInfraHref', () => { uid: 'test-pod-uid', }, }, - timestamp: '123', + timestamp: 123, }, ]; - expect(getInfraIpHref(summary, 'foo')).toMatchSnapshot(); + expect(getInfraIpHref(summary, 'foo')).toMatchInlineSnapshot( + `"foo/app/metrics/inventory?waffleFilter=(expression:'host.ip%20%3A%20152.151.23.192%20or%20host.ip%20%3A%20151.101.202.217',kind:kuery)"` + ); }); it('getInfraIpHref returns undefined if checks are undefined', () => { diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_logging_href.test.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_logging_href.test.ts index 1117fa1429962..b188a8d1b8ef6 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_logging_href.test.ts +++ b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/__tests__/get_logging_href.test.ts @@ -9,7 +9,7 @@ import { getLoggingKubernetesHref, getLoggingIpHref, } from '../get_logging_href'; -import { MonitorSummary } from '../../../../../common/graphql/types'; +import { MonitorSummary } from '../../../../../common/runtime_types'; describe('getLoggingHref', () => { let summary: MonitorSummary; @@ -33,10 +33,11 @@ describe('getLoggingHref', () => { uid: 'test-pod-id', }, }, - timestamp: '123', + timestamp: 123, }, ], timestamp: '123', + url: {}, }, }; }); @@ -44,37 +45,49 @@ describe('getLoggingHref', () => { it('creates a container href with base path when present', () => { const result = getLoggingContainerHref(summary, 'bar'); expect(result).not.toBeUndefined(); - expect(result).toMatchSnapshot(); + expect(result).toMatchInlineSnapshot( + `"bar/app/logs?logFilter=(expression:'container.id%20:%20test-container-id',kind:kuery)"` + ); }); it(`creates a container href without a base path if it's an empty string`, () => { const result = getLoggingContainerHref(summary, ''); expect(result).not.toBeUndefined(); - expect(result).toMatchSnapshot(); + expect(result).toMatchInlineSnapshot( + `"/app/logs?logFilter=(expression:'container.id%20:%20test-container-id',kind:kuery)"` + ); }); it(`creates an ip href with base path when present`, () => { const result = getLoggingKubernetesHref(summary, 'bar'); expect(result).not.toBeUndefined(); - expect(result).toMatchSnapshot(); + expect(result).toMatchInlineSnapshot( + `"bar/app/logs?logFilter=(expression:'pod.uid%20:%20test-pod-id',kind:kuery)"` + ); }); it('creates a pod href with base path when present', () => { const result = getLoggingKubernetesHref(summary, 'bar'); expect(result).not.toBeUndefined(); - expect(result).toMatchSnapshot(); + expect(result).toMatchInlineSnapshot( + `"bar/app/logs?logFilter=(expression:'pod.uid%20:%20test-pod-id',kind:kuery)"` + ); }); it(`creates a pod href without a base path when it's an empty string`, () => { const result = getLoggingKubernetesHref(summary, ''); expect(result).not.toBeUndefined(); - expect(result).toMatchSnapshot(); + expect(result).toMatchInlineSnapshot( + `"/app/logs?logFilter=(expression:'pod.uid%20:%20test-pod-id',kind:kuery)"` + ); }); it(`creates an ip href without a base path when it's an empty string`, () => { const result = getLoggingIpHref(summary, ''); expect(result).not.toBeUndefined(); - expect(result).toMatchSnapshot(); + expect(result).toMatchInlineSnapshot( + `"/app/logs?logFilter=(expression:'host.ip%20%3A%20151.101.202.217',kind:kuery)"` + ); }); it('returns undefined if necessary container is not present', () => { @@ -83,7 +96,7 @@ describe('getLoggingHref', () => { }); it('returns undefined if necessary container is null', () => { - summary.state.checks![0].container!.id = null; + delete summary.state.checks![0].container!.id; expect(getLoggingContainerHref(summary, '')).toBeUndefined(); }); @@ -93,7 +106,7 @@ describe('getLoggingHref', () => { }); it('returns undefined if necessary pod is null', () => { - summary.state.checks![0].kubernetes!.pod!.uid = null; + delete summary.state.checks![0].kubernetes!.pod!.uid; expect(getLoggingKubernetesHref(summary, '')).toBeUndefined(); }); @@ -103,7 +116,7 @@ describe('getLoggingHref', () => { }); it('returns undefined ip href if ip is null', () => { - summary.state.checks![0].monitor.ip = null; + delete summary.state.checks![0].monitor.ip; expect(getLoggingIpHref(summary, '')).toBeUndefined(); }); }); diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/build_href.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/build_href.ts index 19e437651090b..0f830435be89d 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/build_href.ts +++ b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/build_href.ts @@ -5,7 +5,7 @@ */ import { get } from 'lodash'; -import { Check } from '../../../../common/graphql/types'; +import { Check } from '../../../../common/runtime_types'; /** * Builds URLs to the designated features by extracting values from the provided diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/get_apm_href.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/get_apm_href.ts index aaa57acee6c6a..0ff5a8acb3367 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/get_apm_href.ts +++ b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/get_apm_href.ts @@ -6,7 +6,7 @@ import { get } from 'lodash'; import { addBasePath } from './add_base_path'; -import { MonitorSummary } from '../../../../common/graphql/types'; +import { MonitorSummary } from '../../../../common/runtime_types'; export const getApmHref = ( summary: MonitorSummary, diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/get_infra_href.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/get_infra_href.ts index 73065be395c76..384067e4b033b 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/get_infra_href.ts +++ b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/get_infra_href.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { MonitorSummary } from '../../../../common/graphql/types'; +import { MonitorSummary } from '../../../../common/runtime_types'; import { addBasePath } from './add_base_path'; import { buildHref } from './build_href'; diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/get_logging_href.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/get_logging_href.ts index b97b5a34855fb..222c7b57c9272 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/get_logging_href.ts +++ b/x-pack/legacy/plugins/uptime/public/lib/helper/observability_integration/get_logging_href.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { MonitorSummary } from '../../../../common/graphql/types'; +import { MonitorSummary } from '../../../../common/runtime_types'; import { addBasePath } from './add_base_path'; import { buildHref } from './build_href'; diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/series_has_down_values.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/series_has_down_values.ts index 13079b912a147..4ebeb350ed892 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/series_has_down_values.ts +++ b/x-pack/legacy/plugins/uptime/public/lib/helper/series_has_down_values.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { SummaryHistogramPoint } from '../../../common/graphql/types'; +import { HistogramPoint } from '../../../common/runtime_types'; -export const seriesHasDownValues = (series: SummaryHistogramPoint[] | null): boolean => { +export const seriesHasDownValues = (series: HistogramPoint[] | null): boolean => { return series ? series.some(point => !!point.down) : false; }; diff --git a/x-pack/legacy/plugins/uptime/public/lib/lib.ts b/x-pack/legacy/plugins/uptime/public/lib/lib.ts index aba151bf5aab3..6b6191441c931 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/lib.ts +++ b/x-pack/legacy/plugins/uptime/public/lib/lib.ts @@ -4,9 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { NormalizedCacheObject } from 'apollo-cache-inmemory'; -import ApolloClient from 'apollo-client'; -import React from 'react'; +import { ReactElement } from 'react'; import { ChromeBreadcrumb } from 'src/core/public'; import { UMBadge } from '../badge'; import { UptimeAppProps } from '../uptime_app'; @@ -19,9 +17,7 @@ export type UMUpdateBreadcrumbs = (breadcrumbs: ChromeBreadcrumb[]) => void; export type UMUpdateBadge = (badge: UMBadge) => void; -export type UMGraphQLClient = ApolloClient; // | OtherClientType - -export type BootstrapUptimeApp = (props: UptimeAppProps) => React.ReactElement; +export type BootstrapUptimeApp = (props: UptimeAppProps) => ReactElement; export interface UMFrameworkAdapter { render(element: any): void; diff --git a/x-pack/legacy/plugins/uptime/public/pages/overview.tsx b/x-pack/legacy/plugins/uptime/public/pages/overview.tsx index 5550facaf42e9..5b51a208a4c37 100644 --- a/x-pack/legacy/plugins/uptime/public/pages/overview.tsx +++ b/x-pack/legacy/plugins/uptime/public/pages/overview.tsx @@ -5,20 +5,15 @@ */ import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; -import React, { useContext, useEffect, useState } from 'react'; +import React, { useEffect } from 'react'; import styled from 'styled-components'; import { i18n } from '@kbn/i18n'; -import { - MonitorList, - OverviewPageParsingErrorCallout, - StatusPanel, -} from '../components/functional'; +import { OverviewPageParsingErrorCallout, StatusPanel } from '../components/functional'; import { useUptimeTelemetry, UptimePage, useGetUrlParams } from '../hooks'; import { stringifyUrlParams } from '../lib/helper/stringify_url_params'; import { useTrackPageview } from '../../../../../plugins/observability/public'; import { DataPublicPluginSetup, IIndexPattern } from '../../../../../../src/plugins/data/public'; -import { UptimeThemeContext } from '../contexts'; -import { EmptyState, FilterGroup, KueryBar } from '../components/connected'; +import { EmptyState, FilterGroup, KueryBar, MonitorList } from '../components/connected'; import { useUpdateKueryString } from '../hooks'; import { PageHeader } from './page_header'; import { useBreadcrumbs } from '../hooks/use_breadcrumbs'; @@ -40,34 +35,9 @@ const EuiFlexItemStyled = styled(EuiFlexItem)` } `; -// TODO: these values belong deeper down in the monitor -// list pagination control, but are here temporarily until we -// are done removing GraphQL -const DEFAULT_PAGE_SIZE = 10; -const LOCAL_STORAGE_KEY = 'xpack.uptime.monitorList.pageSize'; -const getMonitorListPageSizeValue = () => { - const value = parseInt(localStorage.getItem(LOCAL_STORAGE_KEY) ?? '', 10); - if (isNaN(value)) { - return DEFAULT_PAGE_SIZE; - } - return value; -}; - export const OverviewPageComponent = ({ autocomplete, indexPattern, setEsKueryFilters }: Props) => { - const { colors } = useContext(UptimeThemeContext); - // TODO: this is temporary until we migrate the monitor list to our Redux implementation - const [monitorListPageSize, setMonitorListPageSize] = useState( - getMonitorListPageSizeValue() - ); const { absoluteDateRangeStart, absoluteDateRangeEnd, ...params } = useGetUrlParams(); - const { - dateRangeStart, - dateRangeEnd, - pagination, - statusFilter, - search, - filters: urlFilters, - } = params; + const { search, filters: urlFilters } = params; useUptimeTelemetry(UptimePage.Overview); @@ -80,13 +50,6 @@ export const OverviewPageComponent = ({ autocomplete, indexPattern, setEsKueryFi setEsKueryFilters(esFilters ?? ''); }, [esFilters, setEsKueryFilters]); - const sharedProps = { - dateRangeStart, - dateRangeEnd, - statusFilter, - filters: esFilters, - }; - const linkParameters = stringifyUrlParams(params, true); const heading = i18n.translate('xpack.uptime.overviewPage.headerText', { @@ -117,20 +80,7 @@ export const OverviewPageComponent = ({ autocomplete, indexPattern, setEsKueryFi - + ); diff --git a/x-pack/legacy/plugins/uptime/public/queries/monitor_states_query.ts b/x-pack/legacy/plugins/uptime/public/queries/monitor_states_query.ts deleted file mode 100644 index 676e638c239de..0000000000000 --- a/x-pack/legacy/plugins/uptime/public/queries/monitor_states_query.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import gql from 'graphql-tag'; - -export const monitorStatesQueryString = ` -query MonitorStates($dateRangeStart: String!, $dateRangeEnd: String!, $pagination: String, $filters: String, $statusFilter: String, $pageSize: Int) { - monitorStates: getMonitorStates( - dateRangeStart: $dateRangeStart - dateRangeEnd: $dateRangeEnd - pagination: $pagination - filters: $filters - statusFilter: $statusFilter - pageSize: $pageSize - ) { - prevPagePagination - nextPagePagination - totalSummaryCount - summaries { - monitor_id - histogram { - count - points { - timestamp - up - down - } - } - state { - agent { - id - } - checks { - agent { - id - } - container { - id - } - kubernetes { - pod { - uid - } - } - monitor { - ip - name - status - } - observer { - geo { - name - location { - lat - lon - } - } - } - timestamp - } - geo { - name - location { - lat - lon - } - } - observer { - geo { - name - location { - lat - lon - } - } - } - monitor { - id - name - status - type - } - summary { - up - down - geo { - name - location { - lat - lon - } - } - } - url { - full - domain - } - timestamp - } - } - } -} -`; - -export const monitorStatesQuery = gql` - ${monitorStatesQueryString} -`; diff --git a/x-pack/legacy/plugins/uptime/public/state/actions/index.ts b/x-pack/legacy/plugins/uptime/public/state/actions/index.ts index 4563e6bfc4f0e..0dc6baa0b2e50 100644 --- a/x-pack/legacy/plugins/uptime/public/state/actions/index.ts +++ b/x-pack/legacy/plugins/uptime/public/state/actions/index.ts @@ -7,6 +7,7 @@ export * from './overview_filters'; export * from './snapshot'; export * from './ui'; +export * from './monitor_list'; export * from './monitor_status'; export * from './index_patternts'; export * from './ping'; diff --git a/x-pack/legacy/plugins/uptime/public/state/actions/monitor_list.ts b/x-pack/legacy/plugins/uptime/public/state/actions/monitor_list.ts new file mode 100644 index 0000000000000..ee2267a9058af --- /dev/null +++ b/x-pack/legacy/plugins/uptime/public/state/actions/monitor_list.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { createAction } from 'redux-actions'; +import { FetchMonitorStatesQueryArgs, MonitorSummaryResult } from '../../../common/runtime_types'; + +export const getMonitorList = createAction('GET_MONITOR_LIST'); +export const getMonitorListSuccess = createAction('GET_MONITOR_LIST_SUCCESS'); +export const getMonitorListFailure = createAction('GET_MONITOR_LIST_FAIL'); diff --git a/x-pack/legacy/plugins/uptime/public/state/actions/monitor_status.ts b/x-pack/legacy/plugins/uptime/public/state/actions/monitor_status.ts index e8c862e209739..3d480e66c9e0b 100644 --- a/x-pack/legacy/plugins/uptime/public/state/actions/monitor_status.ts +++ b/x-pack/legacy/plugins/uptime/public/state/actions/monitor_status.ts @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + import { createAction } from 'redux-actions'; import { QueryParams } from './types'; import { Ping } from '../../../common/runtime_types'; diff --git a/x-pack/legacy/plugins/uptime/public/state/api/index.ts b/x-pack/legacy/plugins/uptime/public/state/api/index.ts index 793762c0f4a10..a50afb3f866de 100644 --- a/x-pack/legacy/plugins/uptime/public/state/api/index.ts +++ b/x-pack/legacy/plugins/uptime/public/state/api/index.ts @@ -5,6 +5,7 @@ */ export * from './monitor'; +export * from './monitor_list'; export * from './overview_filters'; export * from './snapshot'; export * from './monitor_status'; diff --git a/x-pack/legacy/plugins/uptime/public/state/api/monitor_list.ts b/x-pack/legacy/plugins/uptime/public/state/api/monitor_list.ts new file mode 100644 index 0000000000000..084bcb4bd2a91 --- /dev/null +++ b/x-pack/legacy/plugins/uptime/public/state/api/monitor_list.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { API_URLS } from '../../../common/constants'; +import { apiService } from './utils'; +import { + FetchMonitorStatesQueryArgs, + MonitorSummaryResult, + MonitorSummaryResultType, +} from '../../../common/runtime_types'; + +export const fetchMonitorList = async ( + params: FetchMonitorStatesQueryArgs +): Promise => { + return await apiService.get(API_URLS.MONITOR_LIST, params, MonitorSummaryResultType); +}; diff --git a/x-pack/legacy/plugins/uptime/public/state/effects/index.ts b/x-pack/legacy/plugins/uptime/public/state/effects/index.ts index 8df11312b6455..739179c5bbeae 100644 --- a/x-pack/legacy/plugins/uptime/public/state/effects/index.ts +++ b/x-pack/legacy/plugins/uptime/public/state/effects/index.ts @@ -8,6 +8,7 @@ import { fork } from 'redux-saga/effects'; import { fetchMonitorDetailsEffect } from './monitor'; import { fetchOverviewFiltersEffect } from './overview_filters'; import { fetchSnapshotCountEffect } from './snapshot'; +import { fetchMonitorListEffect } from './monitor_list'; import { fetchMonitorStatusEffect } from './monitor_status'; import { fetchDynamicSettingsEffect, setDynamicSettingsEffect } from './dynamic_settings'; import { fetchIndexPatternEffect } from './index_pattern'; @@ -20,6 +21,7 @@ export function* rootEffect() { yield fork(fetchMonitorDetailsEffect); yield fork(fetchSnapshotCountEffect); yield fork(fetchOverviewFiltersEffect); + yield fork(fetchMonitorListEffect); yield fork(fetchMonitorStatusEffect); yield fork(fetchDynamicSettingsEffect); yield fork(setDynamicSettingsEffect); diff --git a/x-pack/legacy/plugins/uptime/public/state/effects/monitor_list.ts b/x-pack/legacy/plugins/uptime/public/state/effects/monitor_list.ts new file mode 100644 index 0000000000000..b607641ecd7d0 --- /dev/null +++ b/x-pack/legacy/plugins/uptime/public/state/effects/monitor_list.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { takeLatest } from 'redux-saga/effects'; +import { getMonitorList, getMonitorListSuccess, getMonitorListFailure } from '../actions'; +import { fetchMonitorList } from '../api'; +import { fetchEffectFactory } from './fetch_effect'; + +export function* fetchMonitorListEffect() { + yield takeLatest( + getMonitorList, + fetchEffectFactory(fetchMonitorList, getMonitorListSuccess, getMonitorListFailure) + ); +} diff --git a/x-pack/legacy/plugins/uptime/public/state/reducers/index.ts b/x-pack/legacy/plugins/uptime/public/state/reducers/index.ts index 0a3ff35df0599..294bde2f277ec 100644 --- a/x-pack/legacy/plugins/uptime/public/state/reducers/index.ts +++ b/x-pack/legacy/plugins/uptime/public/state/reducers/index.ts @@ -10,6 +10,7 @@ import { overviewFiltersReducer } from './overview_filters'; import { snapshotReducer } from './snapshot'; import { uiReducer } from './ui'; import { monitorStatusReducer } from './monitor_status'; +import { monitorListReducer } from './monitor_list'; import { dynamicSettingsReducer } from './dynamic_settings'; import { indexPatternReducer } from './index_pattern'; import { pingReducer } from './ping'; @@ -23,6 +24,7 @@ export const rootReducer = combineReducers({ overviewFilters: overviewFiltersReducer, snapshot: snapshotReducer, ui: uiReducer, + monitorList: monitorListReducer, monitorStatus: monitorStatusReducer, dynamicSettings: dynamicSettingsReducer, indexPattern: indexPatternReducer, diff --git a/x-pack/legacy/plugins/uptime/public/state/reducers/monitor_duration.ts b/x-pack/legacy/plugins/uptime/public/state/reducers/monitor_duration.ts index 0e1771c393e50..ec6b374c1057c 100644 --- a/x-pack/legacy/plugins/uptime/public/state/reducers/monitor_duration.ts +++ b/x-pack/legacy/plugins/uptime/public/state/reducers/monitor_duration.ts @@ -24,9 +24,9 @@ const initialState: MonitorDuration = { errors: [], }; -type PayLoad = MonitorDurationResult & Error; +type Payload = MonitorDurationResult & Error; -export const monitorDurationReducer = handleActions( +export const monitorDurationReducer = handleActions( { [String(getMonitorDurationAction)]: (state: MonitorDuration) => ({ ...state, diff --git a/x-pack/legacy/plugins/uptime/public/state/reducers/monitor_list.ts b/x-pack/legacy/plugins/uptime/public/state/reducers/monitor_list.ts new file mode 100644 index 0000000000000..cf895aebeb755 --- /dev/null +++ b/x-pack/legacy/plugins/uptime/public/state/reducers/monitor_list.ts @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { handleActions, Action } from 'redux-actions'; +import { getMonitorList, getMonitorListSuccess, getMonitorListFailure } from '../actions'; +import { MonitorSummaryResult } from '../../../common/runtime_types'; + +export interface MonitorList { + list: MonitorSummaryResult; + error?: Error; + loading: boolean; +} + +export const initialState: MonitorList = { + list: { + nextPagePagination: null, + prevPagePagination: null, + summaries: [], + totalSummaryCount: 0, + }, + loading: false, +}; + +type Payload = MonitorSummaryResult & Error; + +export const monitorListReducer = handleActions( + { + [String(getMonitorList)]: (state: MonitorList) => ({ + ...state, + loading: true, + }), + [String(getMonitorListSuccess)]: ( + state: MonitorList, + action: Action + ) => ({ + ...state, + loading: false, + error: undefined, + list: { ...action.payload }, + }), + [String(getMonitorListFailure)]: (state: MonitorList, action: Action) => ({ + ...state, + error: action.payload, + loading: false, + }), + }, + initialState +); diff --git a/x-pack/legacy/plugins/uptime/public/state/selectors/__tests__/index.test.ts b/x-pack/legacy/plugins/uptime/public/state/selectors/__tests__/index.test.ts index 77902f347f6f9..2b7c04178e9b4 100644 --- a/x-pack/legacy/plugins/uptime/public/state/selectors/__tests__/index.test.ts +++ b/x-pack/legacy/plugins/uptime/public/state/selectors/__tests__/index.test.ts @@ -71,6 +71,15 @@ describe('state selectors', () => { loading: false, errors: [], }, + monitorList: { + list: { + prevPagePagination: null, + nextPagePagination: null, + summaries: [], + totalSummaryCount: 0, + }, + loading: false, + }, ml: { mlJob: { data: null, diff --git a/x-pack/legacy/plugins/uptime/public/state/selectors/index.ts b/x-pack/legacy/plugins/uptime/public/state/selectors/index.ts index 37695e4274306..dc5df3f93804d 100644 --- a/x-pack/legacy/plugins/uptime/public/state/selectors/index.ts +++ b/x-pack/legacy/plugins/uptime/public/state/selectors/index.ts @@ -92,3 +92,8 @@ export const selectMonitorStatusAlert = ({ indexPattern, overviewFilters, ui }: export const indexStatusSelector = ({ indexStatus }: AppState) => { return indexStatus.indexStatus; }; + +export const monitorListSelector = ({ monitorList, ui: { lastRefresh } }: AppState) => ({ + monitorList, + lastRefresh, +}); diff --git a/x-pack/legacy/plugins/uptime/public/uptime_app.tsx b/x-pack/legacy/plugins/uptime/public/uptime_app.tsx index 5400cf8e1ec16..5d33bf7e86758 100644 --- a/x-pack/legacy/plugins/uptime/public/uptime_app.tsx +++ b/x-pack/legacy/plugins/uptime/public/uptime_app.tsx @@ -7,13 +7,12 @@ import { EuiPage, EuiErrorBoundary } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useEffect } from 'react'; -import { ApolloProvider } from 'react-apollo'; import { Provider as ReduxProvider } from 'react-redux'; import { BrowserRouter as Router } from 'react-router-dom'; import { I18nStart, ChromeBreadcrumb, CoreStart } from 'src/core/public'; import { PluginsSetup } from 'ui/new_platform/new_platform'; import { KibanaContextProvider } from '../../../../../src/plugins/kibana_react/public'; -import { UMGraphQLClient, UMUpdateBadge } from './lib/lib'; +import { UMUpdateBadge } from './lib/lib'; import { UptimeRefreshContextProvider, UptimeSettingsContextProvider, @@ -39,7 +38,6 @@ export interface UptimeAppColors { export interface UptimeAppProps { basePath: string; canSave: boolean; - client: UMGraphQLClient; core: CoreStart; darkMode: boolean; i18n: I18nStart; @@ -59,7 +57,6 @@ const Application = (props: UptimeAppProps) => { const { basePath, canSave, - client, core, darkMode, i18n: i18nCore, @@ -97,25 +94,23 @@ const Application = (props: UptimeAppProps) => { - - - - - - -
- - -
-
-
-
-
-
-
+ + + + + +
+ + +
+
+
+
+
+
diff --git a/x-pack/legacy/plugins/uptime/scripts/gql_gen.json b/x-pack/legacy/plugins/uptime/scripts/gql_gen.json deleted file mode 100644 index 87b8233dd1eeb..0000000000000 --- a/x-pack/legacy/plugins/uptime/scripts/gql_gen.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "flattenTypes": true, - "generatorConfig": {}, - "primitives": { - "String": "string", - "Int": "number", - "Float": "number", - "Boolean": "boolean", - "ID": "string" - } -} diff --git a/x-pack/legacy/plugins/uptime/scripts/infer_graphql_types.js b/x-pack/legacy/plugins/uptime/scripts/infer_graphql_types.js deleted file mode 100644 index 2499e15bf4e23..0000000000000 --- a/x-pack/legacy/plugins/uptime/scripts/infer_graphql_types.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -require('../../../../../src/setup_node_env'); - -const { resolve } = require('path'); -// eslint-disable-next-line import/no-extraneous-dependencies, import/no-unresolved -const { generate } = require('graphql-code-generator'); - -const CONFIG_PATH = resolve(__dirname, 'gql_gen.json'); -const OUTPUT_INTROSPECTION_PATH = resolve('common', 'graphql', 'introspection.json'); -const OUTPUT_TYPES_PATH = resolve('common', 'graphql', 'types.ts'); -const SCHEMA_PATH = resolve(__dirname, 'graphql_schemas.ts'); - -async function main() { - await generate( - { - args: [], - config: CONFIG_PATH, - out: OUTPUT_INTROSPECTION_PATH, - overwrite: true, - schema: SCHEMA_PATH, - template: 'graphql-codegen-introspection-template', - }, - true - ); - await generate( - { - args: [], - config: CONFIG_PATH, - out: OUTPUT_TYPES_PATH, - overwrite: true, - schema: SCHEMA_PATH, - template: 'graphql-codegen-typescript-template', - }, - true - ); -} - -if (require.main === module) { - main(); -} diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 387795aa129a9..7f5bd0eda809b 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -16262,7 +16262,6 @@ "xpack.uptime.emptyStateError.notAuthorized": "アップタイムデータの表示が承認されていません。システム管理者にお問い合わせください。", "xpack.uptime.emptyStateError.notFoundPage": "ページが見つかりません", "xpack.uptime.emptyStateError.title": "エラー", - "xpack.uptime.errorMessage": "エラー: {message}", "xpack.uptime.featureCatalogueDescription": "エンドポイントヘルスチェックとアップタイム監視を行います。", "xpack.uptime.featureRegistry.uptimeFeatureName": "アップタイム", "xpack.uptime.filterBar.ariaLabel": "概要ページのインプットフィルター基準", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 7a213d6e1901b..6fc2e1f146086 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -16267,7 +16267,6 @@ "xpack.uptime.emptyStateError.notAuthorized": "您无权查看 Uptime 数据,请联系系统管理员。", "xpack.uptime.emptyStateError.notFoundPage": "未找到页面", "xpack.uptime.emptyStateError.title": "错误", - "xpack.uptime.errorMessage": "错误:{message}", "xpack.uptime.featureCatalogueDescription": "执行终端节点运行状况检查和运行时间监测。", "xpack.uptime.featureRegistry.uptimeFeatureName": "运行时间", "xpack.uptime.filterBar.ariaLabel": "概览页面的输入筛选条件", diff --git a/x-pack/plugins/uptime/server/graphql/constants.ts b/x-pack/plugins/uptime/server/graphql/constants.ts deleted file mode 100644 index aba58f5c6c4a5..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/constants.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -export const DEFAULT_GRAPHQL_PATH = '/api/uptime/graphql'; diff --git a/x-pack/plugins/uptime/server/graphql/index.ts b/x-pack/plugins/uptime/server/graphql/index.ts deleted file mode 100644 index a88afd7ac769c..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { createMonitorStatesResolvers, monitorStatesSchema } from './monitor_states'; -import { pingsSchema } from './pings'; -import { CreateUMGraphQLResolvers } from './types'; -import { unsignedIntegerResolverFunctions, unsignedIntegerSchema } from './unsigned_int_scalar'; - -export { DEFAULT_GRAPHQL_PATH } from './constants'; -export const resolvers: CreateUMGraphQLResolvers[] = [ - createMonitorStatesResolvers, - unsignedIntegerResolverFunctions, -]; -export const typeDefs: any[] = [pingsSchema, unsignedIntegerSchema, monitorStatesSchema]; diff --git a/x-pack/plugins/uptime/server/graphql/monitor_states/index.ts b/x-pack/plugins/uptime/server/graphql/monitor_states/index.ts deleted file mode 100644 index fb0893dbc4dbf..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/monitor_states/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -export { createMonitorStatesResolvers } from './resolvers'; -export { monitorStatesSchema } from './schema.gql'; diff --git a/x-pack/plugins/uptime/server/graphql/monitor_states/resolvers.ts b/x-pack/plugins/uptime/server/graphql/monitor_states/resolvers.ts deleted file mode 100644 index 479c06234ca66..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/monitor_states/resolvers.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { CreateUMGraphQLResolvers, UMContext } from '../types'; -import { UMServerLibs } from '../../lib/lib'; -import { UMResolver } from '../../../../../legacy/plugins/uptime/common/graphql/resolver_types'; -import { - GetMonitorStatesQueryArgs, - MonitorSummaryResult, -} from '../../../../../legacy/plugins/uptime/common/graphql/types'; -import { CONTEXT_DEFAULTS } from '../../../../../legacy/plugins/uptime/common/constants'; -import { savedObjectsAdapter } from '../../lib/saved_objects'; - -export type UMGetMonitorStatesResolver = UMResolver< - MonitorSummaryResult | Promise, - any, - GetMonitorStatesQueryArgs, - UMContext ->; - -export const createMonitorStatesResolvers: CreateUMGraphQLResolvers = ( - libs: UMServerLibs -): { - Query: { - getMonitorStates: UMGetMonitorStatesResolver; - }; -} => { - return { - Query: { - async getMonitorStates( - _resolver, - { dateRangeStart, dateRangeEnd, filters, pagination, statusFilter, pageSize }, - { APICaller, savedObjectsClient } - ): Promise { - const dynamicSettings = await savedObjectsAdapter.getUptimeDynamicSettings( - savedObjectsClient - ); - - const decodedPagination = pagination - ? JSON.parse(decodeURIComponent(pagination)) - : CONTEXT_DEFAULTS.CURSOR_PAGINATION; - const [ - indexStatus, - { summaries, nextPagePagination, prevPagePagination }, - ] = await Promise.all([ - libs.requests.getIndexStatus({ callES: APICaller, dynamicSettings }), - libs.requests.getMonitorStates({ - callES: APICaller, - dynamicSettings, - dateRangeStart, - dateRangeEnd, - pagination: decodedPagination, - pageSize, - filters, - // this is added to make typescript happy, - // this sort of reassignment used to be further downstream but I've moved it here - // because this code is going to be decomissioned soon - statusFilter: statusFilter || undefined, - }), - ]); - - const totalSummaryCount = indexStatus?.docCount ?? 0; - - return { - summaries, - nextPagePagination, - prevPagePagination, - totalSummaryCount, - }; - }, - }, - }; -}; diff --git a/x-pack/plugins/uptime/server/graphql/monitor_states/schema.gql.ts b/x-pack/plugins/uptime/server/graphql/monitor_states/schema.gql.ts deleted file mode 100644 index 040ad99ac0c64..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/monitor_states/schema.gql.ts +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import gql from 'graphql-tag'; - -export const monitorStatesSchema = gql` - "Represents a monitor's statuses for a period of time." - type SummaryHistogramPoint { - "The time at which these data were collected." - timestamp: UnsignedInteger! - "The number of _up_ documents." - up: Int! - "The number of _down_ documents." - down: Int! - } - - "Monitor status data over time." - type SummaryHistogram { - "The number of documents used to assemble the histogram." - count: Int! - "The individual histogram data points." - points: [SummaryHistogramPoint!]! - } - - type Agent { - id: String! - } - - type Check { - agent: Agent - container: StateContainer - kubernetes: StateKubernetes - monitor: CheckMonitor! - observer: CheckObserver - timestamp: String! - } - - type StateContainer { - id: String - } - - type StateKubernetes { - pod: StatePod - } - - type StatePod { - uid: String - } - - type CheckMonitor { - ip: String - name: String - status: String! - } - - type Location { - lat: Float - lon: Float - } - - type CheckGeo { - name: String - location: Location - } - - type CheckObserver { - geo: CheckGeo - } - - type StateGeo { - name: [String] - location: Location - } - - type StateObserver { - geo: StateGeo - } - - type MonitorState { - status: String - name: String - id: String - type: String - } - - type Summary { - up: Int - down: Int - geo: CheckGeo - } - - type MonitorSummaryUrl { - domain: String - fragment: String - full: String - original: String - password: String - path: String - port: Int - query: String - scheme: String - username: String - } - - type StateUrl { - domain: String - full: String - path: String - port: Int - scheme: String - } - - "Contains monitor transmission encryption information." - type StateTLS { - "The date and time after which the certificate is invalid." - certificate_not_valid_after: String - certificate_not_valid_before: String - certificates: String - rtt: RTT - } - - "Unifies the subsequent data for an uptime monitor." - type State { - "The agent processing the monitor." - agent: Agent - "There is a check object for each instance of the monitoring agent." - checks: [Check!] - geo: StateGeo - observer: StateObserver - monitor: MonitorState - summary: Summary! - timestamp: UnsignedInteger! - "Transport encryption information." - tls: [StateTLS] - url: StateUrl - } - - "Represents the current state and associated data for an Uptime monitor." - type MonitorSummary { - "The ID assigned by the config or generated by the user." - monitor_id: String! - "The state of the monitor and its associated details." - state: State! - histogram: SummaryHistogram - } - - "The primary object returned for monitor states." - type MonitorSummaryResult { - "Used to go to the next page of results" - prevPagePagination: String - "Used to go to the previous page of results" - nextPagePagination: String - "The objects representing the state of a series of heartbeat monitors." - summaries: [MonitorSummary!] - "The number of summaries." - totalSummaryCount: Int! - } - - enum CursorDirection { - AFTER - BEFORE - } - - enum SortOrder { - ASC - DESC - } - - type Query { - "Fetches the current state of Uptime monitors for the given parameters." - getMonitorStates( - dateRangeStart: String! - dateRangeEnd: String! - pagination: String - filters: String - statusFilter: String - pageSize: Int - ): MonitorSummaryResult - } -`; diff --git a/x-pack/plugins/uptime/server/graphql/pings/index.ts b/x-pack/plugins/uptime/server/graphql/pings/index.ts deleted file mode 100644 index 100ce29c398ec..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/pings/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -export { pingsSchema } from './schema.gql'; diff --git a/x-pack/plugins/uptime/server/graphql/pings/schema.gql.ts b/x-pack/plugins/uptime/server/graphql/pings/schema.gql.ts deleted file mode 100644 index 179bca53db161..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/pings/schema.gql.ts +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import gql from 'graphql-tag'; - -export const pingsSchema = gql` - type PingResults { - "Total number of matching pings" - total: UnsignedInteger! - "Unique list of all locations the query matched" - locations: [String!]! - "List of pings " - pings: [Ping!]! - } - - type ContainerImage { - name: String - tag: String - } - - type Container { - id: String - image: ContainerImage - name: String - runtime: String - } - - type DocCount { - count: UnsignedInteger! - } - - "The monitor's status for a ping" - type Duration { - us: UnsignedInteger - } - - "An agent for recording a beat" - type Beat { - hostname: String - name: String - timezone: String - type: String - } - - type Docker { - id: String - image: String - name: String - } - - type ECS { - version: String - } - - type Error { - code: Int - message: String - type: String - } - - type OS { - family: String - kernel: String - platform: String - version: String - name: String - build: String - } - - "Geolocation data added via processors to enrich events." - type Geo { - "Name of the city in which the agent is running." - city_name: String - "The name of the continent on which the agent is running." - continent_name: String - "ISO designation for the agent's country." - country_iso_code: String - "The name of the agent's country." - country_name: String - "The lat/long of the agent." - location: String - "A name for the host's location, e.g. 'us-east-1' or 'LAX'." - name: String - "ISO designation of the agent's region." - region_iso_code: String - "Name of the region hosting the agent." - region_name: String - } - - type Host { - architecture: String - id: String - hostname: String - ip: String - mac: String - name: String - os: OS - } - - type HttpRTT { - content: Duration - response_header: Duration - total: Duration - validate: Duration - validate_body: Duration - write_request: Duration - } - - type HTTPBody { - "Size of HTTP response body in bytes" - bytes: UnsignedInteger - "Hash of the HTTP response body" - hash: String - "Response body of the HTTP Response. May be truncated based on client settings." - content: String - "Byte length of the content string, taking into account multibyte chars." - content_bytes: UnsignedInteger - } - - type HTTPResponse { - status_code: UnsignedInteger - body: HTTPBody - } - - type HTTP { - response: HTTPResponse - rtt: HttpRTT - url: String - } - - type ICMP { - requests: Int - rtt: Int - } - - type KubernetesContainer { - image: String - name: String - } - - type KubernetesNode { - name: String - } - - type KubernetesPod { - name: String - uid: String - } - - type Kubernetes { - container: KubernetesContainer - namespace: String - node: KubernetesNode - pod: KubernetesPod - } - - type MetaCloud { - availability_zone: String - instance_id: String - instance_name: String - machine_type: String - project_id: String - provider: String - region: String - } - - type Meta { - cloud: MetaCloud - } - - type Monitor { - duration: Duration - host: String - "The id of the monitor" - id: String - "The IP pinged by the monitor" - ip: String - "The name of the protocol being monitored" - name: String - "The protocol scheme of the monitored host" - scheme: String - "The status of the monitored host" - status: String - "The type of host being monitored" - type: String - check_group: String - } - - "Metadata added by a proccessor, which is specified in its configuration." - type Observer { - "Geolocation data for the agent." - geo: Geo - } - - type Resolve { - host: String - ip: String - rtt: Duration - } - - type RTT { - connect: Duration - handshake: Duration - validate: Duration - } - - type Socks5 { - rtt: RTT - } - - type TCP { - port: Int - rtt: RTT - } - - "Contains monitor transmission encryption information." - type PingTLS { - "The date and time after which the certificate is invalid." - certificate_not_valid_after: String - certificate_not_valid_before: String - certificates: String - rtt: RTT - } - - type URL { - full: String - scheme: String - domain: String - port: Int - path: String - query: String - } - - "A request sent from a monitor to a host" - type Ping { - "unique ID for this ping" - id: String! - "The timestamp of the ping's creation" - timestamp: String! - "The agent that recorded the ping" - beat: Beat - container: Container - docker: Docker - ecs: ECS - error: Error - host: Host - http: HTTP - icmp: ICMP - kubernetes: Kubernetes - meta: Meta - monitor: Monitor - observer: Observer - resolve: Resolve - socks5: Socks5 - summary: Summary - tags: String - tcp: TCP - tls: PingTLS - url: URL - } -`; diff --git a/x-pack/plugins/uptime/server/graphql/types.ts b/x-pack/plugins/uptime/server/graphql/types.ts deleted file mode 100644 index 5f0a6749eb599..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/types.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { RequestHandlerContext, CallAPIOptions, SavedObjectsClient } from 'src/core/server'; -import { UMServerLibs } from '../lib/lib'; - -export type UMContext = RequestHandlerContext & { - APICaller: ( - endpoint: string, - clientParams?: Record, - options?: CallAPIOptions | undefined - ) => Promise; - savedObjectsClient: SavedObjectsClient; -}; - -export interface UMGraphQLResolver { - Query?: any; -} - -export type CreateUMGraphQLResolvers = (libs: UMServerLibs) => any; diff --git a/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/__tests__/parse_literal.test.ts b/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/__tests__/parse_literal.test.ts deleted file mode 100644 index 7c357abcf8e1d..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/__tests__/parse_literal.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { parseLiteral } from '../resolvers'; - -describe('parseLiteral', () => { - it('parses string literal of type IntValue', () => { - const result = parseLiteral({ - kind: 'IntValue', - value: '1562605032000', - }); - expect(result).toBe(1562605032000); - }); - - it('parses string literal of type FloatValue', () => { - const result = parseLiteral({ - kind: 'FloatValue', - value: '1562605032000.0', - }); - expect(result).toBe(1562605032000); - }); - - it('parses string literal of type String', () => { - const result = parseLiteral({ - kind: 'StringValue', - value: '1562605032000', - }); - expect(result).toBe(1562605032000); - }); - - it('returns `null` for unsupported types', () => { - expect( - parseLiteral({ - kind: 'EnumValue', - value: 'false', - }) - ).toBeNull(); - }); -}); diff --git a/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/__tests__/parse_value.test.ts b/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/__tests__/parse_value.test.ts deleted file mode 100644 index cb8958918c6dc..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/__tests__/parse_value.test.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { parseValue } from '../resolvers'; - -describe('parseValue', () => { - it(`parses a number value and returns it if its > 0`, () => { - const result = parseValue('1562605032000'); - expect(result).toBe(1562605032000); - }); - - it(`parses a number and returns null if its value is < 0`, () => { - const result = parseValue('-1562605032000'); - expect(result).toBeNull(); - }); -}); diff --git a/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/__tests__/serialize.test.ts b/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/__tests__/serialize.test.ts deleted file mode 100644 index 2271d12ee7e13..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/__tests__/serialize.test.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { serialize } from '../resolvers'; - -describe('serialize', () => { - it('serializes date strings correctly', () => { - const result = serialize('2019-07-08T16:59:09.796Z'); - expect(result).toBe(1562605149796); - }); - - it('serializes timestamp strings correctly', () => { - const result = serialize('1562605032000'); - expect(result).toBe(1562605032000); - }); - - it('serializes non-date and non-numeric values to NaN', () => { - const result = serialize('foo'); - expect(result).toBeNaN(); - }); -}); diff --git a/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/index.ts b/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/index.ts deleted file mode 100644 index a8819f543a851..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -export { unsignedIntegerResolverFunctions } from './resolvers'; -export { unsignedIntegerSchema } from './schema.gql'; diff --git a/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/resolvers.ts b/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/resolvers.ts deleted file mode 100644 index 9b8fe145e7ff5..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/resolvers.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { GraphQLScalarType, Kind, ValueNode } from 'graphql'; -import { UMServerLibs } from '../../lib/lib'; -import { CreateUMGraphQLResolvers } from '../types'; - -export const serialize = (value: any): number => { - // `parseInt` will yield `2019` for a value such as "2019-07-08T16:59:09.796Z" - if (isNaN(Number(value))) { - return Date.parse(value); - } - return parseInt(value, 10); -}; - -export const parseValue = (value: any) => { - const parsed = parseInt(value, 10); - if (parsed < 0) { - return null; - } - return parsed; -}; - -export const parseLiteral = (ast: ValueNode) => { - switch (ast.kind) { - case Kind.INT: - case Kind.FLOAT: - case Kind.STRING: - return parseInt(ast.value, 10); - } - return null; -}; - -const unsignedIntegerScalar = new GraphQLScalarType({ - name: 'UnsignedInteger', - description: 'Represents an unsigned 32-bit integer', - serialize, - parseValue, - parseLiteral, -}); - -/** - * This scalar resolver will parse an integer string of > 32 bits and return a value of type `number`. - * This assumes that the code is running in an environment that supports big ints. - */ -export const unsignedIntegerResolverFunctions: CreateUMGraphQLResolvers = (libs: UMServerLibs) => ({ - UnsignedInteger: unsignedIntegerScalar, -}); diff --git a/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/schema.gql.ts b/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/schema.gql.ts deleted file mode 100644 index 6af2c8bc8827f..0000000000000 --- a/x-pack/plugins/uptime/server/graphql/unsigned_int_scalar/schema.gql.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import gql from 'graphql-tag'; - -export const unsignedIntegerSchema = gql` - scalar UnsignedInteger -`; diff --git a/x-pack/plugins/uptime/server/lib/adapters/framework/adapter_types.ts b/x-pack/plugins/uptime/server/lib/adapters/framework/adapter_types.ts index 47fe5f2af4263..98c6be5aa3c8e 100644 --- a/x-pack/plugins/uptime/server/lib/adapters/framework/adapter_types.ts +++ b/x-pack/plugins/uptime/server/lib/adapters/framework/adapter_types.ts @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import { GraphQLSchema } from 'graphql'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/server'; import { IRouter, @@ -44,5 +43,4 @@ export interface UptimeCorePlugins { export interface UMBackendFrameworkAdapter { registerRoute(route: UMKibanaRoute): void; - registerGraphQLEndpoint(routePath: string, schema: GraphQLSchema): void; } diff --git a/x-pack/plugins/uptime/server/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/plugins/uptime/server/lib/adapters/framework/kibana_framework_adapter.ts index 1f92c8212b393..0176471aec1be 100644 --- a/x-pack/plugins/uptime/server/lib/adapters/framework/kibana_framework_adapter.ts +++ b/x-pack/plugins/uptime/server/lib/adapters/framework/kibana_framework_adapter.ts @@ -4,9 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import { GraphQLSchema } from 'graphql'; -import { schema as kbnSchema } from '@kbn/config-schema'; -import { runHttpQuery } from 'apollo-server-core'; import { UptimeCoreSetup } from './adapter_types'; import { UMBackendFrameworkAdapter } from './adapter_types'; import { UMKibanaRoute } from '../../../rest_api'; @@ -33,71 +30,4 @@ export class UMKibanaBackendFrameworkAdapter implements UMBackendFrameworkAdapte throw new Error(`Handler for method ${method} is not defined`); } } - - public registerGraphQLEndpoint(routePath: string, schema: GraphQLSchema): void { - this.server.route.post( - { - path: routePath, - validate: { - body: kbnSchema.object({ - operationName: kbnSchema.nullable(kbnSchema.string()), - query: kbnSchema.string(), - variables: kbnSchema.recordOf(kbnSchema.string(), kbnSchema.any()), - }), - }, - options: { - tags: ['access:uptime-read'], - }, - }, - async (context, request, resp): Promise => { - const { - core: { - elasticsearch: { - dataClient: { callAsCurrentUser }, - }, - }, - } = context; - const options = { - graphQLOptions: (_req: any) => { - return { - context: { - ...context, - APICaller: callAsCurrentUser, - savedObjectsClient: context.core.savedObjects.client, - }, - schema, - }; - }, - path: routePath, - route: { - tags: ['access:uptime-read'], - }, - }; - try { - const query = request.body as Record; - - const graphQLResponse = await runHttpQuery([request], { - method: 'POST', - options: options.graphQLOptions, - query, - }); - - return resp.ok({ - body: graphQLResponse, - headers: { - 'content-type': 'application/json', - }, - }); - } catch (error) { - if (error.isGraphQLError === true) { - return resp.internalError({ - body: { message: error.message }, - headers: { 'content-type': 'application/json' }, - }); - } - return resp.internalError(); - } - } - ); - } } diff --git a/x-pack/plugins/uptime/server/lib/requests/get_monitor_details.ts b/x-pack/plugins/uptime/server/lib/requests/get_monitor_details.ts index 8393370e1516b..4ce7176b57b19 100644 --- a/x-pack/plugins/uptime/server/lib/requests/get_monitor_details.ts +++ b/x-pack/plugins/uptime/server/lib/requests/get_monitor_details.ts @@ -68,11 +68,11 @@ export const getMonitorDetails: UMElasticsearchQueryFn< const data = result.hits.hits[0]?._source; const monitorError: MonitorError | undefined = data?.error; - const errorTimeStamp: string | undefined = data?.['@timestamp']; + const errorTimestamp: string | undefined = data?.['@timestamp']; return { monitorId, error: monitorError, - timestamp: errorTimeStamp, + timestamp: errorTimestamp, }; }; diff --git a/x-pack/plugins/uptime/server/lib/requests/get_monitor_states.ts b/x-pack/plugins/uptime/server/lib/requests/get_monitor_states.ts index d7842d1a0b4aa..4b40943a85705 100644 --- a/x-pack/plugins/uptime/server/lib/requests/get_monitor_states.ts +++ b/x-pack/plugins/uptime/server/lib/requests/get_monitor_states.ts @@ -8,10 +8,11 @@ import { CONTEXT_DEFAULTS } from '../../../../../legacy/plugins/uptime/common/co import { fetchPage } from './search'; import { UMElasticsearchQueryFn } from '../adapters'; import { - MonitorSummary, SortOrder, CursorDirection, -} from '../../../../../legacy/plugins/uptime/common/graphql/types'; + MonitorSummary, +} from '../../../../../legacy/plugins/uptime/common/runtime_types'; + import { QueryContext } from './search'; export interface CursorPagination { diff --git a/x-pack/plugins/uptime/server/lib/requests/search/__tests__/fetch_page.test.ts b/x-pack/plugins/uptime/server/lib/requests/search/__tests__/fetch_page.test.ts index f542773f32796..2a8f681ab3453 100644 --- a/x-pack/plugins/uptime/server/lib/requests/search/__tests__/fetch_page.test.ts +++ b/x-pack/plugins/uptime/server/lib/requests/search/__tests__/fetch_page.test.ts @@ -12,7 +12,7 @@ import { MonitorGroupsPage, } from '../fetch_page'; import { QueryContext } from '../query_context'; -import { MonitorSummary } from '../../../../../../../legacy/plugins/uptime/common/graphql/types'; +import { MonitorSummary } from '../../../../../../../legacy/plugins/uptime/common/runtime_types'; import { nextPagination, prevPagination, simpleQueryContext } from './test_helpers'; const simpleFixture: MonitorGroups[] = [ @@ -53,12 +53,16 @@ const simpleFetcher = (monitorGroups: MonitorGroups[]): MonitorGroupsFetcher => }; const simpleEnricher = (monitorGroups: MonitorGroups[]): MonitorEnricher => { - return async (queryContext: QueryContext, checkGroups: string[]): Promise => { + return async (_queryContext: QueryContext, checkGroups: string[]): Promise => { return checkGroups.map(cg => { const monitorGroup = monitorGroups.find(mg => mg.groups.some(g => g.checkGroup === cg))!; return { monitor_id: monitorGroup.id, - state: { summary: {}, timestamp: new Date(Date.parse('1999-12-31')).toISOString() }, + state: { + summary: {}, + timestamp: new Date(Date.parse('1999-12-31')).valueOf().toString(), + url: {}, + }, }; }); }; @@ -71,16 +75,37 @@ describe('fetching a page', () => { simpleFetcher(simpleFixture), simpleEnricher(simpleFixture) ); - expect(res).toEqual({ - items: [ - { - monitor_id: 'foo', - state: { summary: {}, timestamp: '1999-12-31T00:00:00.000Z' }, + expect(res).toMatchInlineSnapshot(` + Object { + "items": Array [ + Object { + "monitor_id": "foo", + "state": Object { + "summary": Object {}, + "timestamp": "946598400000", + "url": Object {}, + }, + }, + Object { + "monitor_id": "bar", + "state": Object { + "summary": Object {}, + "timestamp": "946598400000", + "url": Object {}, + }, + }, + ], + "nextPagePagination": Object { + "cursorDirection": "AFTER", + "cursorKey": "bar", + "sortOrder": "ASC", }, - { monitor_id: 'bar', state: { summary: {}, timestamp: '1999-12-31T00:00:00.000Z' } }, - ], - nextPagePagination: { cursorDirection: 'AFTER', sortOrder: 'ASC', cursorKey: 'bar' }, - prevPagePagination: { cursorDirection: 'BEFORE', sortOrder: 'ASC', cursorKey: 'foo' }, - }); + "prevPagePagination": Object { + "cursorDirection": "BEFORE", + "cursorKey": "foo", + "sortOrder": "ASC", + }, + } + `); }); }); diff --git a/x-pack/plugins/uptime/server/lib/requests/search/__tests__/query_context.test.ts b/x-pack/plugins/uptime/server/lib/requests/search/__tests__/query_context.test.ts index e6cd2fe1ae0b7..4d674c87ddb41 100644 --- a/x-pack/plugins/uptime/server/lib/requests/search/__tests__/query_context.test.ts +++ b/x-pack/plugins/uptime/server/lib/requests/search/__tests__/query_context.test.ts @@ -9,7 +9,7 @@ import { CursorPagination } from '../types'; import { CursorDirection, SortOrder, -} from '../../../../../../../legacy/plugins/uptime/common/graphql/types'; +} from '../../../../../../../legacy/plugins/uptime/common/runtime_types'; describe('QueryContext', () => { // 10 minute range diff --git a/x-pack/plugins/uptime/server/lib/requests/search/__tests__/test_helpers.ts b/x-pack/plugins/uptime/server/lib/requests/search/__tests__/test_helpers.ts index d1212daf5304f..47034c2130116 100644 --- a/x-pack/plugins/uptime/server/lib/requests/search/__tests__/test_helpers.ts +++ b/x-pack/plugins/uptime/server/lib/requests/search/__tests__/test_helpers.ts @@ -8,7 +8,7 @@ import { CursorPagination } from '../types'; import { CursorDirection, SortOrder, -} from '../../../../../../../legacy/plugins/uptime/common/graphql/types'; +} from '../../../../../../../legacy/plugins/uptime/common/runtime_types'; import { QueryContext } from '../query_context'; export const prevPagination = (key: any): CursorPagination => { diff --git a/x-pack/plugins/uptime/server/lib/requests/search/enrich_monitor_groups.ts b/x-pack/plugins/uptime/server/lib/requests/search/enrich_monitor_groups.ts index 1798550875276..4739c804d24e7 100644 --- a/x-pack/plugins/uptime/server/lib/requests/search/enrich_monitor_groups.ts +++ b/x-pack/plugins/uptime/server/lib/requests/search/enrich_monitor_groups.ts @@ -8,12 +8,12 @@ import { get, sortBy } from 'lodash'; import { QueryContext } from './query_context'; import { QUERY, STATES } from '../../../../../../legacy/plugins/uptime/common/constants'; import { - MonitorSummary, - SummaryHistogram, Check, + Histogram, + MonitorSummary, CursorDirection, SortOrder, -} from '../../../../../../legacy/plugins/uptime/common/graphql/types'; +} from '../../../../../../legacy/plugins/uptime/common/runtime_types'; import { MonitorEnricher } from './fetch_page'; export const enrichMonitorGroups: MonitorEnricher = async ( @@ -250,11 +250,8 @@ export const enrichMonitorGroups: MonitorEnricher = async ( const summaries: MonitorSummary[] = monitorBuckets.map((monitor: any) => { const monitorId = get(monitor, 'key.monitor_id'); monitorIds.push(monitorId); - let state = get(monitor, 'state.value'); - state = { - ...state, - timestamp: state['@timestamp'], - }; + const state: any = monitor.state?.value; + state.timestamp = state['@timestamp']; const { checks } = state; if (checks) { state.checks = sortBy(checks, checksSortBy); @@ -289,7 +286,7 @@ export const enrichMonitorGroups: MonitorEnricher = async ( const getHistogramForMonitors = async ( queryContext: QueryContext, monitorIds: string[] -): Promise<{ [key: string]: SummaryHistogram }> => { +): Promise<{ [key: string]: Histogram }> => { const params = { index: queryContext.heartbeatIndices, body: { diff --git a/x-pack/plugins/uptime/server/lib/requests/search/fetch_page.ts b/x-pack/plugins/uptime/server/lib/requests/search/fetch_page.ts index 62144dacbd377..84167840d5d9b 100644 --- a/x-pack/plugins/uptime/server/lib/requests/search/fetch_page.ts +++ b/x-pack/plugins/uptime/server/lib/requests/search/fetch_page.ts @@ -12,7 +12,7 @@ import { CursorDirection, MonitorSummary, SortOrder, -} from '../../../../../../legacy/plugins/uptime/common/graphql/types'; +} from '../../../../../../legacy/plugins/uptime/common/runtime_types'; import { enrichMonitorGroups } from './enrich_monitor_groups'; import { MonitorGroupIterator } from './monitor_group_iterator'; diff --git a/x-pack/plugins/uptime/server/lib/requests/search/find_potential_matches.ts b/x-pack/plugins/uptime/server/lib/requests/search/find_potential_matches.ts index 424c097853ad3..3449febfa5b05 100644 --- a/x-pack/plugins/uptime/server/lib/requests/search/find_potential_matches.ts +++ b/x-pack/plugins/uptime/server/lib/requests/search/find_potential_matches.ts @@ -5,7 +5,7 @@ */ import { get, set } from 'lodash'; -import { CursorDirection } from '../../../../../../legacy/plugins/uptime/common/graphql/types'; +import { CursorDirection } from '../../../../../../legacy/plugins/uptime/common/runtime_types'; import { QueryContext } from './query_context'; // This is the first phase of the query. In it, we find the most recent check groups that matched the given query. diff --git a/x-pack/plugins/uptime/server/lib/requests/search/monitor_group_iterator.ts b/x-pack/plugins/uptime/server/lib/requests/search/monitor_group_iterator.ts index 267551907c5e8..31d9166eb1e73 100644 --- a/x-pack/plugins/uptime/server/lib/requests/search/monitor_group_iterator.ts +++ b/x-pack/plugins/uptime/server/lib/requests/search/monitor_group_iterator.ts @@ -6,7 +6,7 @@ import { QueryContext } from './query_context'; import { fetchChunk } from './fetch_chunk'; -import { CursorDirection } from '../../../../../../legacy/plugins/uptime/common/graphql/types'; +import { CursorDirection } from '../../../../../../legacy/plugins/uptime/common/runtime_types'; import { MonitorGroups } from './fetch_page'; import { CursorPagination } from './types'; diff --git a/x-pack/plugins/uptime/server/lib/requests/search/refine_potential_matches.ts b/x-pack/plugins/uptime/server/lib/requests/search/refine_potential_matches.ts index 218eb2f121a81..43fc54fb25808 100644 --- a/x-pack/plugins/uptime/server/lib/requests/search/refine_potential_matches.ts +++ b/x-pack/plugins/uptime/server/lib/requests/search/refine_potential_matches.ts @@ -5,7 +5,7 @@ */ import { QueryContext } from './query_context'; -import { CursorDirection } from '../../../../../../legacy/plugins/uptime/common/graphql/types'; +import { CursorDirection } from '../../../../../../legacy/plugins/uptime/common/runtime_types'; import { MonitorGroups, MonitorLocCheckGroup } from './fetch_page'; /** diff --git a/x-pack/plugins/uptime/server/lib/requests/search/types.ts b/x-pack/plugins/uptime/server/lib/requests/search/types.ts index 42c98ace6e8f5..2ec52d400b597 100644 --- a/x-pack/plugins/uptime/server/lib/requests/search/types.ts +++ b/x-pack/plugins/uptime/server/lib/requests/search/types.ts @@ -7,7 +7,7 @@ import { CursorDirection, SortOrder, -} from '../../../../../../legacy/plugins/uptime/common/graphql/types'; +} from '../../../../../../legacy/plugins/uptime/common/runtime_types'; export interface CursorPagination { cursorKey?: any; diff --git a/x-pack/plugins/uptime/server/rest_api/index.ts b/x-pack/plugins/uptime/server/rest_api/index.ts index c0412e588fa93..ae1e499dcc26c 100644 --- a/x-pack/plugins/uptime/server/rest_api/index.ts +++ b/x-pack/plugins/uptime/server/rest_api/index.ts @@ -12,6 +12,7 @@ import { createGetSnapshotCount } from './snapshot'; import { UMRestApiRouteFactory } from './types'; import { createGetMonitorDetailsRoute, + createMonitorListRoute, createGetMonitorLocationsRoute, createGetStatusBarRoute, } from './monitors'; @@ -30,6 +31,7 @@ export const restApiRoutes: UMRestApiRouteFactory[] = [ createPostDynamicSettingsRoute, createGetMonitorDetailsRoute, createGetMonitorLocationsRoute, + createMonitorListRoute, createGetStatusBarRoute, createGetSnapshotCount, createLogPageViewRoute, diff --git a/x-pack/plugins/uptime/server/rest_api/monitors/index.ts b/x-pack/plugins/uptime/server/rest_api/monitors/index.ts index 51b39037049b5..256f885d550ed 100644 --- a/x-pack/plugins/uptime/server/rest_api/monitors/index.ts +++ b/x-pack/plugins/uptime/server/rest_api/monitors/index.ts @@ -5,5 +5,6 @@ */ export { createGetMonitorDetailsRoute } from './monitors_details'; +export { createMonitorListRoute } from './monitor_list'; export { createGetMonitorLocationsRoute } from './monitor_locations'; export { createGetStatusBarRoute } from './monitor_status'; diff --git a/x-pack/plugins/uptime/server/rest_api/monitors/monitor_list.ts b/x-pack/plugins/uptime/server/rest_api/monitors/monitor_list.ts new file mode 100644 index 0000000000000..5cb4e8a6241b7 --- /dev/null +++ b/x-pack/plugins/uptime/server/rest_api/monitors/monitor_list.ts @@ -0,0 +1,69 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { schema } from '@kbn/config-schema'; +import { UMRestApiRouteFactory } from '../types'; +import { CONTEXT_DEFAULTS } from '../../../../../legacy/plugins/uptime/common/constants'; +import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants/rest_api'; + +export const createMonitorListRoute: UMRestApiRouteFactory = libs => ({ + method: 'GET', + path: API_URLS.MONITOR_LIST, + validate: { + query: schema.object({ + dateRangeStart: schema.string(), + dateRangeEnd: schema.string(), + filters: schema.maybe(schema.string()), + pagination: schema.maybe(schema.string()), + statusFilter: schema.maybe(schema.string()), + pageSize: schema.number(), + }), + }, + options: { + tags: ['access:uptime-read'], + }, + handler: async ({ callES, dynamicSettings }, _context, request, response): Promise => { + const { + dateRangeStart, + dateRangeEnd, + filters, + pagination, + statusFilter, + pageSize, + } = request.query; + + const decodedPagination = pagination + ? JSON.parse(decodeURIComponent(pagination)) + : CONTEXT_DEFAULTS.CURSOR_PAGINATION; + const [indexStatus, { summaries, nextPagePagination, prevPagePagination }] = await Promise.all([ + libs.requests.getIndexStatus({ callES, dynamicSettings }), + libs.requests.getMonitorStates({ + callES, + dynamicSettings, + dateRangeStart, + dateRangeEnd, + pagination: decodedPagination, + pageSize, + filters, + // this is added to make typescript happy, + // this sort of reassignment used to be further downstream but I've moved it here + // because this code is going to be decomissioned soon + statusFilter: statusFilter || undefined, + }), + ]); + + const totalSummaryCount = indexStatus?.docCount ?? 0; + + return response.ok({ + body: { + summaries, + nextPagePagination, + prevPagePagination, + totalSummaryCount, + }, + }); + }, +}); diff --git a/x-pack/plugins/uptime/server/uptime_server.ts b/x-pack/plugins/uptime/server/uptime_server.ts index d4b38b8ad27a0..cc6fe85b80cb2 100644 --- a/x-pack/plugins/uptime/server/uptime_server.ts +++ b/x-pack/plugins/uptime/server/uptime_server.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import { makeExecutableSchema } from 'graphql-tools'; -import { DEFAULT_GRAPHQL_PATH, resolvers, typeDefs } from './graphql'; import { UMServerLibs } from './lib/lib'; import { createRouteWithAuth, restApiRoutes, uptimeRouteWrapper } from './rest_api'; import { UptimeCoreSetup, UptimeCorePlugins } from './lib/adapters'; @@ -23,10 +21,4 @@ export const initUptimeServer = ( uptimeAlertTypeFactories.forEach(alertTypeFactory => plugins.alerting.registerType(alertTypeFactory(server, libs)) ); - - const graphQLSchema = makeExecutableSchema({ - resolvers: resolvers.map(createResolversFn => createResolversFn(libs)), - typeDefs, - }); - libs.framework.registerGraphQLEndpoint(DEFAULT_GRAPHQL_PATH, graphQLSchema); }; diff --git a/x-pack/test/api_integration/apis/uptime/feature_controls.ts b/x-pack/test/api_integration/apis/uptime/feature_controls.ts index 8b82735fc38b0..6d125807e169d 100644 --- a/x-pack/test/api_integration/apis/uptime/feature_controls.ts +++ b/x-pack/test/api_integration/apis/uptime/feature_controls.ts @@ -26,17 +26,6 @@ export default function featureControlsTests({ getService }: FtrProviderContext) expect(result.response).to.have.property('statusCode', 200); }; - const executeRESTAPIQuery = async (username: string, password: string, spaceId?: string) => { - const basePath = spaceId ? `/s/${spaceId}` : ''; - - return await supertest - .get(basePath + API_URLS.INDEX_STATUS) - .auth(username, password) - .set('kbn-xsrf', 'foo') - .then((response: any) => ({ error: undefined, response })) - .catch((error: any) => ({ error, response: undefined })); - }; - const executePingsRequest = async (username: string, password: string, spaceId?: string) => { const basePath = spaceId ? `/s/${spaceId}` : ''; @@ -72,9 +61,6 @@ export default function featureControlsTests({ getService }: FtrProviderContext) full_name: 'a kibana user', }); - const graphQLResult = await executeRESTAPIQuery(username, password); - expect404(graphQLResult); - const pingsResult = await executePingsRequest(username, password); expect404(pingsResult); } finally { @@ -111,9 +97,6 @@ export default function featureControlsTests({ getService }: FtrProviderContext) full_name: 'a kibana user', }); - const graphQLResult = await executeRESTAPIQuery(username, password); - expectResponse(graphQLResult); - const pingsResult = await executePingsRequest(username, password); expectResponse(pingsResult); } finally { @@ -153,9 +136,6 @@ export default function featureControlsTests({ getService }: FtrProviderContext) full_name: 'a kibana user', }); - const graphQLResult = await executeRESTAPIQuery(username, password); - expect404(graphQLResult); - const pingsResult = await executePingsRequest(username, password); expect404(pingsResult); } finally { @@ -222,17 +202,11 @@ export default function featureControlsTests({ getService }: FtrProviderContext) }); it('user_1 can access APIs in space_1', async () => { - const graphQLResult = await executeRESTAPIQuery(username, password, space1Id); - expectResponse(graphQLResult); - const pingsResult = await executePingsRequest(username, password, space1Id); expectResponse(pingsResult); }); it(`user_1 can't access APIs in space_2`, async () => { - const graphQLResult = await executeRESTAPIQuery(username, password); - expect404(graphQLResult); - const pingsResult = await executePingsRequest(username, password); expect404(pingsResult); }); diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states.json deleted file mode 100644 index a748225dda7cf..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": null, - "nextPagePagination": "{\"cursorDirection\":\"AFTER\",\"sortOrder\":\"ASC\",\"cursorKey\":{\"monitor_id\":\"0009-up\"}}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0000-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0001-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0002-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0003-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0004-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0005-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0006-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0007-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0008-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0009-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_id_filtered.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_id_filtered.json deleted file mode 100644 index 44644be5a0724..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_id_filtered.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": null, - "nextPagePagination": null, - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0002-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_1.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_1.json deleted file mode 100644 index a748225dda7cf..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_1.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": null, - "nextPagePagination": "{\"cursorDirection\":\"AFTER\",\"sortOrder\":\"ASC\",\"cursorKey\":{\"monitor_id\":\"0009-up\"}}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0000-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0001-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0002-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0003-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0004-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0005-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0006-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0007-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0008-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0009-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_10.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_10.json deleted file mode 100644 index fbd0776fade62..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_10.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0090-intermittent\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": null, - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0090-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234374" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234374 - } - }, - { - "monitor_id": "0091-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234374" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234374 - } - }, - { - "monitor_id": "0092-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234375" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234375 - } - }, - { - "monitor_id": "0093-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234375" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234375 - } - }, - { - "monitor_id": "0094-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234375" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234375 - } - }, - { - "monitor_id": "0095-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234375" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234375 - } - }, - { - "monitor_id": "0096-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234376" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234376 - } - }, - { - "monitor_id": "0097-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234405" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234405 - } - }, - { - "monitor_id": "0098-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234406" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234406 - } - }, - { - "monitor_id": "0099-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234406" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234406 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_10_previous.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_10_previous.json deleted file mode 100644 index e630e227f473b..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_10_previous.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0080-down\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0089-up\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"AFTER\"}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0080-down", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=400x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0081-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0082-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0083-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0084-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0085-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0086-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0087-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0088-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0089-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_2.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_2.json deleted file mode 100644 index 26b4b1a195567..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_2.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0010-down\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorDirection\":\"AFTER\",\"sortOrder\":\"ASC\",\"cursorKey\":{\"monitor_id\":\"0019-up\"}}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0010-down", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=400x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0011-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0012-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0013-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0014-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0015-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0016-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0017-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0018-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0019-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_2_previous.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_2_previous.json deleted file mode 100644 index 0b93e66f50246..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_2_previous.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": null, - "nextPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0009-up\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"AFTER\"}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0000-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0001-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0002-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0003-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0004-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0005-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0006-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0007-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0008-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0009-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_3.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_3.json deleted file mode 100644 index 7b47742f8859a..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_3.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0020-down\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorDirection\":\"AFTER\",\"sortOrder\":\"ASC\",\"cursorKey\":{\"monitor_id\":\"0029-up\"}}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0020-down", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=400x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0021-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0022-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0023-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0024-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0025-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0026-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0027-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0028-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0029-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_3_previous.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_3_previous.json deleted file mode 100644 index 0d5a76059d004..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_3_previous.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0010-down\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0019-up\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"AFTER\"}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0010-down", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=400x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0011-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0012-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0013-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0014-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0015-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0016-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0017-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0018-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0019-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_4.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_4.json deleted file mode 100644 index 4caff800ac96e..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_4.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0030-intermittent\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorDirection\":\"AFTER\",\"sortOrder\":\"ASC\",\"cursorKey\":{\"monitor_id\":\"0039-up\"}}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0030-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0031-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234374" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234374 - } - }, - { - "monitor_id": "0032-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234375" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234375 - } - }, - { - "monitor_id": "0033-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0034-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0035-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0036-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0037-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0038-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0039-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_4_previous.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_4_previous.json deleted file mode 100644 index 02bd149b50247..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_4_previous.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0020-down\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0029-up\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"AFTER\"}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0020-down", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=400x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0021-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0022-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0023-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0024-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0025-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0026-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0027-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0028-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0029-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_5.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_5.json deleted file mode 100644 index 11e880f1ec329..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_5.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0040-down\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorDirection\":\"AFTER\",\"sortOrder\":\"ASC\",\"cursorKey\":{\"monitor_id\":\"0049-up\"}}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0040-down", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=400x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0041-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0042-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0043-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0044-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0045-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0046-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234374" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234374 - } - }, - { - "monitor_id": "0047-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234390" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234390 - } - }, - { - "monitor_id": "0048-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234386" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234386 - } - }, - { - "monitor_id": "0049-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234405" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234405 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_5_previous.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_5_previous.json deleted file mode 100644 index 26cfa7c7162e8..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_5_previous.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0030-intermittent\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0039-up\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"AFTER\"}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0030-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0031-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234374" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234374 - } - }, - { - "monitor_id": "0032-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234375" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234375 - } - }, - { - "monitor_id": "0033-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0034-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0035-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0036-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0037-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0038-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0039-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_6.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_6.json deleted file mode 100644 index 8f4b5d4c52e71..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_6.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0050-down\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorDirection\":\"AFTER\",\"sortOrder\":\"ASC\",\"cursorKey\":{\"monitor_id\":\"0059-up\"}}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0050-down", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234386" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=400x1", - "domain": "localhost" - }, - "timestamp": 1568173234386 - } - }, - { - "monitor_id": "0051-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0052-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0053-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0054-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0055-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0056-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0057-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0058-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0059-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_6_previous.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_6_previous.json deleted file mode 100644 index 50f8f61b13d68..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_6_previous.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0040-down\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0049-up\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"AFTER\"}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0040-down", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=400x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0041-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0042-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0043-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0044-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0045-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0046-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234374" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234374 - } - }, - { - "monitor_id": "0047-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234390" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234390 - } - }, - { - "monitor_id": "0048-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234386" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234386 - } - }, - { - "monitor_id": "0049-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234405" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234405 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_7.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_7.json deleted file mode 100644 index 18ab2c6fdf336..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_7.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0060-intermittent\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorDirection\":\"AFTER\",\"sortOrder\":\"ASC\",\"cursorKey\":{\"monitor_id\":\"0069-up\"}}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0060-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0061-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0062-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0063-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0064-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0065-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0066-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234374" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234374 - } - }, - { - "monitor_id": "0067-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234374" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234374 - } - }, - { - "monitor_id": "0068-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234374" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234374 - } - }, - { - "monitor_id": "0069-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234375" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234375 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_7_previous.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_7_previous.json deleted file mode 100644 index 825d6365e3a9d..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_7_previous.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0050-down\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0059-up\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"AFTER\"}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0050-down", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234386" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=400x1", - "domain": "localhost" - }, - "timestamp": 1568173234386 - } - }, - { - "monitor_id": "0051-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0052-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0053-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0054-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0055-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0056-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0057-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0058-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0059-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_8.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_8.json deleted file mode 100644 index abb9bcdd804ed..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_8.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0070-down\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorDirection\":\"AFTER\",\"sortOrder\":\"ASC\",\"cursorKey\":{\"monitor_id\":\"0079-up\"}}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0070-down", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234375" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=400x1", - "domain": "localhost" - }, - "timestamp": 1568173234375 - } - }, - { - "monitor_id": "0071-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234375" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234375 - } - }, - { - "monitor_id": "0072-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234376" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234376 - } - }, - { - "monitor_id": "0073-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234406" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234406 - } - }, - { - "monitor_id": "0074-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234410" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234410 - } - }, - { - "monitor_id": "0075-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234406" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234406 - } - }, - { - "monitor_id": "0076-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234387" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234387 - } - }, - { - "monitor_id": "0077-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234389" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234389 - } - }, - { - "monitor_id": "0078-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0079-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_8_previous.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_8_previous.json deleted file mode 100644 index 46a5f195e6a82..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_8_previous.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0060-intermittent\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0069-up\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"AFTER\"}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0060-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0061-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0062-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0063-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0064-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0065-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0066-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234374" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234374 - } - }, - { - "monitor_id": "0067-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234374" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234374 - } - }, - { - "monitor_id": "0068-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234374" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234374 - } - }, - { - "monitor_id": "0069-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234375" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234375 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_9.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_9.json deleted file mode 100644 index 035baf0ab5b5e..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_9.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0080-down\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorDirection\":\"AFTER\",\"sortOrder\":\"ASC\",\"cursorKey\":{\"monitor_id\":\"0089-up\"}}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0080-down", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=400x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0081-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0082-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234372" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234372 - } - }, - { - "monitor_id": "0083-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0084-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0085-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0086-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0087-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0088-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - }, - { - "monitor_id": "0089-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234373" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234373 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_9_previous.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_9_previous.json deleted file mode 100644 index a6d274056eec6..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_states_page_9_previous.json +++ /dev/null @@ -1,1609 +0,0 @@ -{ - "monitorStates": { - "prevPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0070-down\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"BEFORE\"}", - "nextPagePagination": "{\"cursorKey\":{\"monitor_id\":\"0079-up\"},\"sortOrder\":\"ASC\",\"cursorDirection\":\"AFTER\"}", - "totalSummaryCount": 2000, - "summaries": [ - { - "monitor_id": "0070-down", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172694000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172724000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172754000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172784000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172874000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172904000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172934000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172964000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173054000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173084000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173174000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173204000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173234000, - "up": 0, - "down": 1 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "down" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234375" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "down", - "type": null - }, - "summary": { - "up": 0, - "down": 1, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=400x1", - "domain": "localhost" - }, - "timestamp": 1568173234375 - } - }, - { - "monitor_id": "0071-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234375" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234375 - } - }, - { - "monitor_id": "0072-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234376" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234376 - } - }, - { - "monitor_id": "0073-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234406" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234406 - } - }, - { - "monitor_id": "0074-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234410" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234410 - } - }, - { - "monitor_id": "0075-intermittent", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 0, - "down": 1 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234406" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x5,500x1", - "domain": "localhost" - }, - "timestamp": 1568173234406 - } - }, - { - "monitor_id": "0076-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234387" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234387 - } - }, - { - "monitor_id": "0077-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234389" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234389 - } - }, - { - "monitor_id": "0078-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - }, - { - "monitor_id": "0079-up", - "histogram": { - "count": 20, - "points": [ - { - "timestamp": 1568172664000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172694000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172724000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172754000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172784000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172814000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172844000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172874000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172904000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172934000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172964000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568172994000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173024000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173054000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173084000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173114000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173144000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173174000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173204000, - "up": 1, - "down": 0 - }, - { - "timestamp": 1568173234000, - "up": 1, - "down": 0 - } - ] - }, - "state": { - "agent": null, - "checks": [ - { - "agent": { - "id": "04e1d082-65bc-4929-8d65-d0768a2621c4" - }, - "container": null, - "kubernetes": null, - "monitor": { - "ip": "127.0.0.1", - "name": "", - "status": "up" - }, - "observer": { - "geo": { - "name": "mpls", - "location": { - "lat": 37.926867976784706, - "lon": -78.02490200847387 - } - } - }, - "timestamp": "1568173234371" - } - ], - "geo": null, - "observer": { - "geo": { - "name": [ - "mpls" - ], - "location": null - } - }, - "monitor": { - "id": null, - "name": null, - "status": "up", - "type": null - }, - "summary": { - "up": 1, - "down": 0, - "geo": null - }, - "url": { - "full": "http://localhost:5678/pattern?r=200x1", - "domain": "localhost" - }, - "timestamp": 1568173234371 - } - } - ] - } -} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/uptime/graphql/index.ts b/x-pack/test/api_integration/apis/uptime/graphql/index.ts deleted file mode 100644 index 862cce47f257a..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { FtrProviderContext } from '../../../ftr_provider_context'; - -export default function({ loadTestFile }: FtrProviderContext) { - describe('graphql', () => { - // each of these test files imports a GQL query from - // the uptime app and runs it against the live HTTP server, - // verifying the pre-loaded documents are returned in a way that - // matches the snapshots contained in './fixtures' - loadTestFile(require.resolve('./monitor_states')); - }); -} diff --git a/x-pack/test/api_integration/apis/uptime/graphql/monitor_states.ts b/x-pack/test/api_integration/apis/uptime/graphql/monitor_states.ts deleted file mode 100644 index 216560583249c..0000000000000 --- a/x-pack/test/api_integration/apis/uptime/graphql/monitor_states.ts +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import expect from '@kbn/expect'; -import { expectFixtureEql } from './helpers/expect_fixture_eql'; -import { FtrProviderContext } from '../../../ftr_provider_context'; -import { makeChecksWithStatus } from './helpers/make_checks'; -import { monitorStatesQueryString } from '../../../../../legacy/plugins/uptime/public/queries/monitor_states_query'; -import { MonitorSummary } from '../../../../../legacy/plugins/uptime/common/graphql/types'; - -export default function({ getService }: FtrProviderContext) { - const supertest = getService('supertest'); - let dateRangeStart: string; - let dateRangeEnd: string; - - const getMonitorStates = async (variables: { [key: string]: any } = {}) => { - const query = { - operationName: 'MonitorStates', - query: monitorStatesQueryString, - variables: { - dateRangeStart, - dateRangeEnd, - pageSize: 10, - ...variables, - }, - }; - - const { - body: { data }, - } = await supertest - .post('/api/uptime/graphql') - .set('kbn-xsrf', 'foo') - .send({ ...query }); - - return data; - }; - - describe('monitor states', async () => { - describe('with real world data', () => { - before('load heartbeat data', () => getService('esArchiver').load('uptime/full_heartbeat')); - after('unload heartbeat index', () => - getService('esArchiver').unload('uptime/full_heartbeat') - ); - - before('set start/end', () => { - dateRangeStart = '2019-09-11T03:31:04.380Z'; - dateRangeEnd = '2019-09-11T03:40:34.410Z'; - }); - - it('will fetch monitor state data for the given filters and range', async () => { - const data: any = await getMonitorStates({ - statusFilter: 'up', - filters: - '{"bool":{"must":[{"match":{"monitor.id":{"query":"0002-up","operator":"and"}}}]}}', - }); - // await new Promise(r => setTimeout(r, 90000)); - expectFixtureEql(data, 'monitor_states_id_filtered'); - }); - - it('will fetch monitor state data for the given date range', async () => { - expectFixtureEql(await getMonitorStates(), 'monitor_states'); - }); - - it('can navigate forward and backward using pagination', async () => { - const expectedResultsCount = 100; - const expectedPageCount = expectedResultsCount / 10; - - let pagination: string | null = null; - for (let page = 1; page <= expectedPageCount; page++) { - const data: any = await getMonitorStates({ pagination }); - pagination = data.monitorStates.nextPagePagination; - expectFixtureEql(data, `monitor_states_page_${page}`); - - // Test to see if the previous page pagination works on every page (other than the first) - if (page > 1) { - const prevData = await getMonitorStates({ - pagination: data.monitorStates.prevPagePagination, - }); - expectFixtureEql(prevData, `monitor_states_page_${page}_previous`); - } - } - }); - }); - - describe('monitor state scoping', async () => { - const numIps = 4; // Must be > 2 for IP uniqueness checks - - before('load heartbeat data', () => getService('esArchiver').load('uptime/blank')); - after('unload heartbeat index', () => getService('esArchiver').unload('uptime/blank')); - - describe('query document scoping with mismatched check statuses', async () => { - let checks: any[] = []; - let nonSummaryIp: string | null = null; - const testMonitorId = 'scope-test-id'; - const makeApiParams = (monitorId: string, filterClauses: any[] = []): any => { - return { - filters: JSON.stringify({ - bool: { - filter: [{ match: { 'monitor.id': monitorId } }, ...filterClauses], - }, - }), - }; - }; - - before(async () => { - const es = getService('legacyEs'); - dateRangeStart = new Date().toISOString(); - checks = await makeChecksWithStatus(es, testMonitorId, 1, numIps, 1, {}, 'up', d => { - // turn an all up status into having at least one down - if (d.summary) { - d.monitor.status = 'down'; - d.summary.up--; - d.summary.down++; - } - return d; - }); - - dateRangeEnd = new Date().toISOString(); - nonSummaryIp = checks[0][0].monitor.ip; - }); - - it('should return all IPs', async () => { - const res = await getMonitorStates(makeApiParams(testMonitorId)); - - const uniqueIps = new Set(); - res.monitorStates.summaries[0].state.checks.forEach((c: any) => - uniqueIps.add(c.monitor.ip) - ); - - expect(uniqueIps.size).to.eql(4); - }); - - it('should match non summary documents without a status filter', async () => { - const params = makeApiParams(testMonitorId, [{ match: { 'monitor.ip': nonSummaryIp } }]); - - const nonSummaryRes = await getMonitorStates(params); - expect(nonSummaryRes.monitorStates.summaries.length).to.eql(1); - }); - - it('should not match non summary documents if the check status does not match the document status', async () => { - const params = makeApiParams(testMonitorId, [{ match: { 'monitor.ip': nonSummaryIp } }]); - params.statusFilter = 'down'; - - const nonSummaryRes = await getMonitorStates(params); - expect(nonSummaryRes.monitorStates.summaries.length).to.eql(0); - }); - - it('should not non match non summary documents if the check status does not match', async () => { - const params = makeApiParams(testMonitorId, [{ match: { 'monitor.ip': nonSummaryIp } }]); - params.statusFilter = 'up'; - - const nonSummaryRes = await getMonitorStates(params); - expect(nonSummaryRes.monitorStates.summaries.length).to.eql(0); - }); - - describe('matching outside of the date range', async () => { - before('set date range to future', () => { - const futureDate = new Date(); - - // Set dateRangeStart to one day from now - futureDate.setDate(futureDate.getDate() + 1); - dateRangeStart = futureDate.toISOString(); - - // Set dateRangeStart to two days from now - futureDate.setDate(futureDate.getDate() + 1); - dateRangeEnd = futureDate.toISOString(); - }); - - it('should not match any documents', async () => { - const params = makeApiParams(testMonitorId); - params.statusFilter = 'up'; - - const nonSummaryRes = await getMonitorStates(params); - expect(nonSummaryRes.monitorStates.summaries.length).to.eql(0); - }); - }); - }); - }); - - describe(' test status filter', async () => { - const upMonitorId = 'up-test-id'; - const downMonitorId = 'down-test-id'; - const mixMonitorId = 'mix-test-id'; - before('generate three monitors with up, down, mix state', async () => { - await getService('esArchiver').load('uptime/blank'); - - const es = getService('legacyEs'); - - const observer = { - geo: { - name: 'US-East', - location: '40.7128, -74.0060', - }, - }; - - // Generating three monitors each with two geo locations, - // One in a down state , - // One in an up state, - // One in a mix state - - dateRangeStart = new Date().toISOString(); - - await makeChecksWithStatus(es, upMonitorId, 1, 4, 1, {}, 'up'); - await makeChecksWithStatus(es, upMonitorId, 1, 4, 1, { observer }, 'up'); - - await makeChecksWithStatus(es, downMonitorId, 1, 4, 1, {}, 'down'); - await makeChecksWithStatus(es, downMonitorId, 1, 4, 1, { observer }, 'down'); - - await makeChecksWithStatus(es, mixMonitorId, 1, 4, 1, {}, 'up'); - await makeChecksWithStatus(es, mixMonitorId, 1, 4, 1, { observer }, 'down'); - - dateRangeEnd = new Date().toISOString(); - }); - - after('unload heartbeat index', () => getService('esArchiver').unload('uptime/blank')); - - it('should return all monitor when no status filter', async () => { - const { monitorStates } = await getMonitorStates({}); - expect(monitorStates.summaries.length).to.eql(3); - // Summaries are by default sorted by monitor names - expect( - monitorStates.summaries.map((summary: MonitorSummary) => summary.monitor_id) - ).to.eql([downMonitorId, mixMonitorId, upMonitorId]); - }); - - it('should return a monitor with mix state if check status filter is down', async () => { - const { monitorStates } = await getMonitorStates({ statusFilter: 'down' }); - expect(monitorStates.summaries.length).to.eql(2); - monitorStates.summaries.forEach((summary: MonitorSummary) => { - expect(summary.monitor_id).to.not.eql(upMonitorId); - }); - }); - - it('should not return a monitor with mix state if check status filter is up', async () => { - const { monitorStates } = await getMonitorStates({ statusFilter: 'up' }); - - expect(monitorStates.summaries.length).to.eql(1); - expect(monitorStates.summaries[0].monitor_id).to.eql(upMonitorId); - }); - }); - }); -} diff --git a/x-pack/test/api_integration/apis/uptime/index.ts b/x-pack/test/api_integration/apis/uptime/index.ts index 8def64b71a110..13af60196f00d 100644 --- a/x-pack/test/api_integration/apis/uptime/index.ts +++ b/x-pack/test/api_integration/apis/uptime/index.ts @@ -20,7 +20,6 @@ export default function({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./feature_controls')); loadTestFile(require.resolve('./get_all_pings')); - loadTestFile(require.resolve('./graphql')); loadTestFile(require.resolve('./rest')); }); } diff --git a/x-pack/test/api_integration/apis/uptime/rest/doc_count.ts b/x-pack/test/api_integration/apis/uptime/rest/doc_count.ts index 3f42511dd165c..5258426cf193c 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/doc_count.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/doc_count.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ import { FtrProviderContext } from '../../../ftr_provider_context'; -import { expectFixtureEql } from '../graphql/helpers/expect_fixture_eql'; +import { expectFixtureEql } from './helper/expect_fixture_eql'; import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants'; export default function({ getService }: FtrProviderContext) { diff --git a/x-pack/test/api_integration/apis/uptime/rest/filters.ts b/x-pack/test/api_integration/apis/uptime/rest/filters.ts index 6cec6143a6d7c..35bf32a1d404d 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/filters.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/filters.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { expectFixtureEql } from '../graphql/helpers/expect_fixture_eql'; +import { expectFixtureEql } from './helper/expect_fixture_eql'; import { FtrProviderContext } from '../../../ftr_provider_context'; const getApiPath = (dateRangeStart: string, dateRangeEnd: string, filters?: string) => diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/filters.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/filters.json similarity index 100% rename from x-pack/test/api_integration/apis/uptime/graphql/fixtures/filters.json rename to x-pack/test/api_integration/apis/uptime/rest/fixtures/filters.json diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_status.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/monitor_status.json similarity index 100% rename from x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_status.json rename to x-pack/test/api_integration/apis/uptime/rest/fixtures/monitor_status.json diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_status_all.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/monitor_status_all.json similarity index 100% rename from x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitor_status_all.json rename to x-pack/test/api_integration/apis/uptime/rest/fixtures/monitor_status_all.json diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitors_with_location.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/monitors_with_location.json similarity index 100% rename from x-pack/test/api_integration/apis/uptime/graphql/fixtures/monitors_with_location.json rename to x-pack/test/api_integration/apis/uptime/rest/fixtures/monitors_with_location.json diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/snapshot.json similarity index 100% rename from x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot.json rename to x-pack/test/api_integration/apis/uptime/rest/fixtures/snapshot.json diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_empty.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/snapshot_empty.json similarity index 100% rename from x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_empty.json rename to x-pack/test/api_integration/apis/uptime/rest/fixtures/snapshot_empty.json diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_filtered_by_down.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/snapshot_filtered_by_down.json similarity index 100% rename from x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_filtered_by_down.json rename to x-pack/test/api_integration/apis/uptime/rest/fixtures/snapshot_filtered_by_down.json diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_filtered_by_up.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/snapshot_filtered_by_up.json similarity index 100% rename from x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_filtered_by_up.json rename to x-pack/test/api_integration/apis/uptime/rest/fixtures/snapshot_filtered_by_up.json diff --git a/x-pack/test/api_integration/apis/uptime/graphql/helpers/expect_fixture_eql.ts b/x-pack/test/api_integration/apis/uptime/rest/helper/expect_fixture_eql.ts similarity index 87% rename from x-pack/test/api_integration/apis/uptime/graphql/helpers/expect_fixture_eql.ts rename to x-pack/test/api_integration/apis/uptime/rest/helper/expect_fixture_eql.ts index d5a4f3976e079..abf5ec6f697b0 100644 --- a/x-pack/test/api_integration/apis/uptime/graphql/helpers/expect_fixture_eql.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/helper/expect_fixture_eql.ts @@ -10,7 +10,6 @@ import { join } from 'path'; import { cloneDeep, isEqual } from 'lodash'; const fixturesDir = join(__dirname, '..', 'fixtures'); -const restFixturesDir = join(__dirname, '../../rest/', 'fixtures'); const excludeFieldsFrom = (from: any, excluder?: (d: any) => any): any => { const clone = cloneDeep(from); @@ -24,10 +23,7 @@ export const expectFixtureEql = (data: T, fixtureName: string, excluder?: (d: expect(data).not.to.eql(null); expect(data).not.to.eql(undefined); - let fixturePath = join(fixturesDir, `${fixtureName}.json`); - if (!fs.existsSync(fixturePath)) { - fixturePath = join(restFixturesDir, `${fixtureName}.json`); - } + const fixturePath = join(fixturesDir, `${fixtureName}.json`); excluder = excluder || (d => d); const dataExcluded = excludeFieldsFrom(data, excluder); diff --git a/x-pack/test/api_integration/apis/uptime/graphql/helpers/make_checks.ts b/x-pack/test/api_integration/apis/uptime/rest/helper/make_checks.ts similarity index 100% rename from x-pack/test/api_integration/apis/uptime/graphql/helpers/make_checks.ts rename to x-pack/test/api_integration/apis/uptime/rest/helper/make_checks.ts diff --git a/x-pack/test/api_integration/apis/uptime/rest/index.ts b/x-pack/test/api_integration/apis/uptime/rest/index.ts index 3f8df81856f5c..29755bbddbc86 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/index.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/index.ts @@ -42,6 +42,7 @@ export default function({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./snapshot')); loadTestFile(require.resolve('./dynamic_settings')); + loadTestFile(require.resolve('./monitor_states_generated')); loadTestFile(require.resolve('./telemetry_collectors')); }); describe('with real-world data', () => { @@ -52,6 +53,7 @@ export default function({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./ping_list')); loadTestFile(require.resolve('./monitor_duration')); loadTestFile(require.resolve('./doc_count')); + loadTestFile(require.resolve('./monitor_states_real_data')); }); }); } diff --git a/x-pack/test/api_integration/apis/uptime/rest/monitor_duration.ts b/x-pack/test/api_integration/apis/uptime/rest/monitor_duration.ts index acc50e9b8f3d6..7e93f9cfff8a1 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/monitor_duration.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/monitor_duration.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { expectFixtureEql } from '../graphql/helpers/expect_fixture_eql'; +import { expectFixtureEql } from './helper/expect_fixture_eql'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function({ getService }: FtrProviderContext) { diff --git a/x-pack/test/api_integration/apis/uptime/rest/monitor_latest_status.ts b/x-pack/test/api_integration/apis/uptime/rest/monitor_latest_status.ts index 749b304c87ee3..6547816bb7c16 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/monitor_latest_status.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/monitor_latest_status.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { expectFixtureEql } from '../graphql/helpers/expect_fixture_eql'; +import { expectFixtureEql } from './helper/expect_fixture_eql'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function({ getService }: FtrProviderContext) { diff --git a/x-pack/test/api_integration/apis/uptime/rest/monitor_states_generated.ts b/x-pack/test/api_integration/apis/uptime/rest/monitor_states_generated.ts new file mode 100644 index 0000000000000..3c17370532f91 --- /dev/null +++ b/x-pack/test/api_integration/apis/uptime/rest/monitor_states_generated.ts @@ -0,0 +1,193 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { makeChecksWithStatus } from './helper/make_checks'; +import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants'; +import { MonitorSummary } from '../../../../../legacy/plugins/uptime/common/runtime_types'; + +export default function({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + describe('monitor state scoping', async () => { + const numIps = 4; // Must be > 2 for IP uniqueness checks + + let dateRangeStart: string; + let dateRangeEnd: string; + + const getBaseUrl = (from: string, to: string) => + `${API_URLS.MONITOR_LIST}?dateRangeStart=${from}&dateRangeEnd=${to}&pageSize=10`; + + before('load heartbeat data', () => getService('esArchiver').load('uptime/blank')); + after('unload heartbeat index', () => getService('esArchiver').unload('uptime/blank')); + + describe('query document scoping with mismatched check statuses', async () => { + let checks: any[] = []; + let nonSummaryIp: string | null = null; + const testMonitorId = 'scope-test-id'; + const makeApiParams = (monitorId: string, filterClauses: any[] = []): any => { + return JSON.stringify({ + bool: { + filter: [{ match: { 'monitor.id': monitorId } }, ...filterClauses], + }, + }); + }; + + before(async () => { + const es = getService('legacyEs'); + dateRangeStart = new Date().toISOString(); + checks = await makeChecksWithStatus(es, testMonitorId, 1, numIps, 1, {}, 'up', d => { + // turn an all up status into having at least one down + if (d.summary) { + d.monitor.status = 'down'; + d.summary.up--; + d.summary.down++; + } + return d; + }); + + dateRangeEnd = new Date().toISOString(); + nonSummaryIp = checks[0][0].monitor.ip; + }); + + it('should return all IPs', async () => { + const filters = makeApiParams(testMonitorId); + const url = getBaseUrl(dateRangeStart, dateRangeEnd) + `&filters=${filters}`; + const apiResponse = await supertest.get(url); + const res = apiResponse.body; + + const uniqueIps = new Set(); + res.summaries[0].state.checks.forEach((c: any) => uniqueIps.add(c.monitor.ip)); + + expect(uniqueIps.size).to.eql(4); + }); + + it('should match non summary documents without a status filter', async () => { + const filters = makeApiParams(testMonitorId, [{ match: { 'monitor.ip': nonSummaryIp } }]); + + const url = getBaseUrl(dateRangeStart, dateRangeEnd) + `&filters=${filters}`; + const apiResponse = await supertest.get(url); + const nonSummaryRes = apiResponse.body; + expect(nonSummaryRes.summaries.length).to.eql(1); + }); + + it('should not match non summary documents if the check status does not match the document status', async () => { + const filters = makeApiParams(testMonitorId, [{ match: { 'monitor.ip': nonSummaryIp } }]); + const url = + getBaseUrl(dateRangeStart, dateRangeEnd) + `&filters=${filters}&statusFilter=down`; + + const apiResponse = await supertest.get(url); + const nonSummaryRes = apiResponse.body; + expect(nonSummaryRes.summaries.length).to.eql(0); + }); + + it('should not non match non summary documents if the check status does not match', async () => { + const filters = makeApiParams(testMonitorId, [{ match: { 'monitor.ip': nonSummaryIp } }]); + const url = + getBaseUrl(dateRangeStart, dateRangeEnd) + `&filters=${filters}&statusFilter=up`; + + const apiResponse = await supertest.get(url); + const nonSummaryRes = apiResponse.body; + expect(nonSummaryRes.summaries.length).to.eql(0); + }); + + describe('matching outside of the date range', async () => { + before('set date range to future', () => { + const futureDate = new Date(); + + // Set dateRangeStart to one day from now + futureDate.setDate(futureDate.getDate() + 1); + dateRangeStart = futureDate.toISOString(); + + // Set dateRangeStart to two days from now + futureDate.setDate(futureDate.getDate() + 1); + dateRangeEnd = futureDate.toISOString(); + }); + + it('should not match any documents', async () => { + const filters = makeApiParams(testMonitorId); + const url = + getBaseUrl(dateRangeStart, dateRangeEnd) + `&filters=${filters}&statusFilter=up`; + + const apiResponse = await supertest.get(url); + const nonSummaryRes = apiResponse.body; + expect(nonSummaryRes.summaries.length).to.eql(0); + }); + }); + }); + + describe('test status filter', async () => { + const upMonitorId = 'up-test-id'; + const downMonitorId = 'down-test-id'; + const mixMonitorId = 'mix-test-id'; + before('generate three monitors with up, down, mix state', async () => { + await getService('esArchiver').load('uptime/blank'); + + const es = getService('legacyEs'); + + const observer = { + geo: { + name: 'US-East', + location: '40.7128, -74.0060', + }, + }; + + // Generating three monitors each with two geo locations, + // One in a down state , + // One in an up state, + // One in a mix state + + dateRangeStart = new Date().toISOString(); + + await makeChecksWithStatus(es, upMonitorId, 1, 4, 1, {}, 'up'); + await makeChecksWithStatus(es, upMonitorId, 1, 4, 1, { observer }, 'up'); + + await makeChecksWithStatus(es, downMonitorId, 1, 4, 1, {}, 'down'); + await makeChecksWithStatus(es, downMonitorId, 1, 4, 1, { observer }, 'down'); + + await makeChecksWithStatus(es, mixMonitorId, 1, 4, 1, {}, 'up'); + await makeChecksWithStatus(es, mixMonitorId, 1, 4, 1, { observer }, 'down'); + + dateRangeEnd = new Date().toISOString(); + }); + + after('unload heartbeat index', () => getService('esArchiver').unload('uptime/blank')); + + it('should return all monitor when no status filter', async () => { + const apiResponse = await supertest.get(getBaseUrl(dateRangeStart, dateRangeEnd)); + const { summaries } = apiResponse.body; + expect(summaries.length).to.eql(3); + // Summaries are by default sorted by monitor names + expect(summaries.map((summary: MonitorSummary) => summary.monitor_id)).to.eql([ + downMonitorId, + mixMonitorId, + upMonitorId, + ]); + }); + + it('should return a monitor with mix state if check status filter is down', async () => { + const apiResponse = await supertest.get( + getBaseUrl(dateRangeStart, dateRangeEnd) + '&statusFilter=down' + ); + const { summaries } = apiResponse.body; + expect(summaries.length).to.eql(2); + summaries.forEach((summary: MonitorSummary) => { + expect(summary.monitor_id).to.not.eql(upMonitorId); + }); + }); + + it('should not return a monitor with mix state if check status filter is up', async () => { + const apiResponse = await supertest.get( + getBaseUrl(dateRangeStart, dateRangeEnd) + '&statusFilter=up' + ); + const { summaries } = apiResponse.body; + + expect(summaries.length).to.eql(1); + expect(summaries[0].monitor_id).to.eql(upMonitorId); + }); + }); + }); +} diff --git a/x-pack/test/api_integration/apis/uptime/rest/monitor_states_real_data.ts b/x-pack/test/api_integration/apis/uptime/rest/monitor_states_real_data.ts new file mode 100644 index 0000000000000..f1e37bff405fd --- /dev/null +++ b/x-pack/test/api_integration/apis/uptime/rest/monitor_states_real_data.ts @@ -0,0 +1,525 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import expect from '@kbn/expect'; +import { isRight } from 'fp-ts/lib/Either'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants'; +import { MonitorSummaryResultType } from '../../../../../legacy/plugins/uptime/common/runtime_types'; + +interface ExpectedMonitorStatesPage { + response: any; + statesIds: string[]; + statuses: string[]; + absFrom: number; + absTo: number; + size: number; + totalCount: number; + prevPagination: null | string; + nextPagination: null | string; +} + +type PendingExpectedMonitorStatesPage = Pick< + ExpectedMonitorStatesPage, + 'statesIds' | 'statuses' | 'prevPagination' | 'nextPagination' +>; + +const checkMonitorStatesResponse = ({ + response, + statesIds, + statuses, + absFrom, + absTo, + size, + totalCount, + prevPagination, + nextPagination, +}: ExpectedMonitorStatesPage) => { + const decoded = MonitorSummaryResultType.decode(response); + expect(isRight(decoded)).to.be.ok(); + if (isRight(decoded)) { + const { summaries, prevPagePagination, nextPagePagination, totalSummaryCount } = decoded.right; + expect(summaries).to.have.length(size); + expect(summaries?.map(s => s.monitor_id)).to.eql(statesIds); + expect( + summaries?.map(s => (s.state.summary?.up && !s.state.summary?.down ? 'up' : 'down')) + ).to.eql(statuses); + (summaries ?? []).forEach(s => { + expect(s.state.url.full).to.be.ok(); + expect(s.histogram?.count).to.be(20); + (s.histogram?.points ?? []).forEach(point => { + expect(point.timestamp).to.be.greaterThan(absFrom); + expect(point.timestamp).to.be.lessThan(absTo); + }); + }); + expect(totalSummaryCount).to.be(totalCount); + expect(prevPagePagination).to.be(prevPagination); + expect(nextPagePagination).to.eql(nextPagination); + } +}; + +export default function({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + describe('monitor states endpoint', () => { + const from = '2019-09-11T03:30:04.380Z'; + const to = '2019-09-11T03:40:34.410Z'; + const absFrom = new Date(from).valueOf(); + const absTo = new Date(to).valueOf(); + + it('will fetch monitor state data for the given filters and range', async () => { + const statusFilter = 'up'; + const size = 10; + const filters = + '{"bool":{"must":[{"match":{"monitor.id":{"query":"0002-up","operator":"and"}}}]}}'; + const apiResponse = await supertest.get( + `${API_URLS.MONITOR_LIST}?dateRangeStart=${from}&dateRangeEnd=${to}&statusFilter=${statusFilter}&filters=${filters}&pageSize=${size}` + ); + checkMonitorStatesResponse({ + response: apiResponse.body, + statesIds: ['0002-up'], + statuses: ['up'], + absFrom, + absTo, + size: 1, + totalCount: 2000, + prevPagination: null, + nextPagination: null, + }); + }); + + it('can navigate forward and backward using pagination', async () => { + const expectedResultsCount = 100; + const size = 10; + const expectedPageCount = expectedResultsCount / size; + const expectedNextResults: PendingExpectedMonitorStatesPage[] = [ + { + statesIds: [ + '0000-intermittent', + '0001-up', + '0002-up', + '0003-up', + '0004-up', + '0005-up', + '0006-up', + '0007-up', + '0008-up', + '0009-up', + ], + statuses: ['up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorDirection":"AFTER","sortOrder":"ASC","cursorKey":{"monitor_id":"0009-up"}}', + prevPagination: null, + }, + { + statesIds: [ + '0010-down', + '0011-up', + '0012-up', + '0013-up', + '0014-up', + '0015-intermittent', + '0016-up', + '0017-up', + '0018-up', + '0019-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorDirection":"AFTER","sortOrder":"ASC","cursorKey":{"monitor_id":"0019-up"}}', + prevPagination: + '{"cursorKey":{"monitor_id":"0010-down"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0020-down', + '0021-up', + '0022-up', + '0023-up', + '0024-up', + '0025-up', + '0026-up', + '0027-up', + '0028-up', + '0029-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorDirection":"AFTER","sortOrder":"ASC","cursorKey":{"monitor_id":"0029-up"}}', + prevPagination: + '{"cursorKey":{"monitor_id":"0020-down"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0030-intermittent', + '0031-up', + '0032-up', + '0033-up', + '0034-up', + '0035-up', + '0036-up', + '0037-up', + '0038-up', + '0039-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorDirection":"AFTER","sortOrder":"ASC","cursorKey":{"monitor_id":"0039-up"}}', + prevPagination: + '{"cursorKey":{"monitor_id":"0030-intermittent"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0040-down', + '0041-up', + '0042-up', + '0043-up', + '0044-up', + '0045-intermittent', + '0046-up', + '0047-up', + '0048-up', + '0049-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorDirection":"AFTER","sortOrder":"ASC","cursorKey":{"monitor_id":"0049-up"}}', + prevPagination: + '{"cursorKey":{"monitor_id":"0040-down"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0050-down', + '0051-up', + '0052-up', + '0053-up', + '0054-up', + '0055-up', + '0056-up', + '0057-up', + '0058-up', + '0059-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorDirection":"AFTER","sortOrder":"ASC","cursorKey":{"monitor_id":"0059-up"}}', + prevPagination: + '{"cursorKey":{"monitor_id":"0050-down"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0060-intermittent', + '0061-up', + '0062-up', + '0063-up', + '0064-up', + '0065-up', + '0066-up', + '0067-up', + '0068-up', + '0069-up', + ], + statuses: ['up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorDirection":"AFTER","sortOrder":"ASC","cursorKey":{"monitor_id":"0069-up"}}', + prevPagination: + '{"cursorKey":{"monitor_id":"0060-intermittent"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0070-down', + '0071-up', + '0072-up', + '0073-up', + '0074-up', + '0075-intermittent', + '0076-up', + '0077-up', + '0078-up', + '0079-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorDirection":"AFTER","sortOrder":"ASC","cursorKey":{"monitor_id":"0079-up"}}', + prevPagination: + '{"cursorKey":{"monitor_id":"0070-down"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0080-down', + '0081-up', + '0082-up', + '0083-up', + '0084-up', + '0085-up', + '0086-up', + '0087-up', + '0088-up', + '0089-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorDirection":"AFTER","sortOrder":"ASC","cursorKey":{"monitor_id":"0089-up"}}', + prevPagination: + '{"cursorKey":{"monitor_id":"0080-down"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0090-intermittent', + '0091-up', + '0092-up', + '0093-up', + '0094-up', + '0095-up', + '0096-up', + '0097-up', + '0098-up', + '0099-up', + ], + statuses: ['up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: null, + prevPagination: + '{"cursorKey":{"monitor_id":"0090-intermittent"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + ]; + + const expectedPrevResults: PendingExpectedMonitorStatesPage[] = [ + { + statesIds: [ + '0000-intermittent', + '0001-up', + '0002-up', + '0003-up', + '0004-up', + '0005-up', + '0006-up', + '0007-up', + '0008-up', + '0009-up', + ], + statuses: ['up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorKey":{"monitor_id":"0009-up"},"sortOrder":"ASC","cursorDirection":"AFTER"}', + prevPagination: null, + }, + { + statesIds: [ + '0010-down', + '0011-up', + '0012-up', + '0013-up', + '0014-up', + '0015-intermittent', + '0016-up', + '0017-up', + '0018-up', + '0019-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorKey":{"monitor_id":"0019-up"},"sortOrder":"ASC","cursorDirection":"AFTER"}', + prevPagination: + '{"cursorKey":{"monitor_id":"0010-down"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0020-down', + '0021-up', + '0022-up', + '0023-up', + '0024-up', + '0025-up', + '0026-up', + '0027-up', + '0028-up', + '0029-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorKey":{"monitor_id":"0029-up"},"sortOrder":"ASC","cursorDirection":"AFTER"}', + prevPagination: + '{"cursorKey":{"monitor_id":"0020-down"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0030-intermittent', + '0031-up', + '0032-up', + '0033-up', + '0034-up', + '0035-up', + '0036-up', + '0037-up', + '0038-up', + '0039-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorKey":{"monitor_id":"0039-up"},"sortOrder":"ASC","cursorDirection":"AFTER"}', + prevPagination: + '{"cursorKey":{"monitor_id":"0030-intermittent"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0040-down', + '0041-up', + '0042-up', + '0043-up', + '0044-up', + '0045-intermittent', + '0046-up', + '0047-up', + '0048-up', + '0049-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorKey":{"monitor_id":"0049-up"},"sortOrder":"ASC","cursorDirection":"AFTER"}', + prevPagination: + '{"cursorKey":{"monitor_id":"0040-down"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0050-down', + '0051-up', + '0052-up', + '0053-up', + '0054-up', + '0055-up', + '0056-up', + '0057-up', + '0058-up', + '0059-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorKey":{"monitor_id":"0059-up"},"sortOrder":"ASC","cursorDirection":"AFTER"}', + prevPagination: + '{"cursorKey":{"monitor_id":"0050-down"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0060-intermittent', + '0061-up', + '0062-up', + '0063-up', + '0064-up', + '0065-up', + '0066-up', + '0067-up', + '0068-up', + '0069-up', + ], + statuses: ['up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorKey":{"monitor_id":"0069-up"},"sortOrder":"ASC","cursorDirection":"AFTER"}', + prevPagination: + '{"cursorKey":{"monitor_id":"0060-intermittent"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0070-down', + '0071-up', + '0072-up', + '0073-up', + '0074-up', + '0075-intermittent', + '0076-up', + '0077-up', + '0078-up', + '0079-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorKey":{"monitor_id":"0079-up"},"sortOrder":"ASC","cursorDirection":"AFTER"}', + prevPagination: + '{"cursorKey":{"monitor_id":"0070-down"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + { + statesIds: [ + '0080-down', + '0081-up', + '0082-up', + '0083-up', + '0084-up', + '0085-up', + '0086-up', + '0087-up', + '0088-up', + '0089-up', + ], + statuses: ['down', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + nextPagination: + '{"cursorKey":{"monitor_id":"0089-up"},"sortOrder":"ASC","cursorDirection":"AFTER"}', + prevPagination: + '{"cursorKey":{"monitor_id":"0080-down"},"sortOrder":"ASC","cursorDirection":"BEFORE"}', + }, + ]; + + const totalCount = 2000; + let pagination: string | null = null; + for (let page = 1; page <= expectedPageCount; page++) { + const baseUrl = `${API_URLS.MONITOR_LIST}?dateRangeStart=${from}&dateRangeEnd=${to}&pageSize=${size}`; + const nextUrl: string = baseUrl + `&pagination=${pagination ?? ''}`; + const nextApiResponse = await supertest.get(nextUrl); + const nextData = nextApiResponse.body; + pagination = nextData.nextPagePagination; + checkMonitorStatesResponse({ + response: nextData, + ...expectedNextResults[page - 1], + absFrom, + absTo, + size, + totalCount, + }); + + // Test to see if the previous page pagination works on every page (other than the first) + if (page > 1) { + const prevUrl: string = baseUrl + `&pagination=${nextData.prevPagePagination}`; + const prevApiResponse = await supertest.get(prevUrl); + const prevData = prevApiResponse.body; + checkMonitorStatesResponse({ + response: prevData, + ...expectedPrevResults[page - 2], + absFrom, + absTo, + size, + totalCount, + }); + } + } + }); + + it('will fetch monitor state data for the given date range', async () => { + const LENGTH = 10; + const { body } = await supertest.get( + `${API_URLS.MONITOR_LIST}?dateRangeStart=${from}&dateRangeEnd=${to}&pageSize=${LENGTH}` + ); + checkMonitorStatesResponse({ + response: body, + statesIds: [ + '0000-intermittent', + '0001-up', + '0002-up', + '0003-up', + '0004-up', + '0005-up', + '0006-up', + '0007-up', + '0008-up', + '0009-up', + ], + statuses: ['up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up', 'up'], + absFrom, + absTo, + size: LENGTH, + totalCount: 2000, + prevPagination: null, + nextPagination: + '{"cursorDirection":"AFTER","sortOrder":"ASC","cursorKey":{"monitor_id":"0009-up"}}', + }); + }); + }); +} diff --git a/x-pack/test/api_integration/apis/uptime/rest/ping_histogram.ts b/x-pack/test/api_integration/apis/uptime/rest/ping_histogram.ts index 0982d5fef7cb4..b1afe4c8e0d7d 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/ping_histogram.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/ping_histogram.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { expectFixtureEql } from '../graphql/helpers/expect_fixture_eql'; +import { expectFixtureEql } from './helper/expect_fixture_eql'; import { FtrProviderContext } from '../../../ftr_provider_context'; import { assertCloseTo } from '../../../../../plugins/uptime/server/lib/helper'; diff --git a/x-pack/test/api_integration/apis/uptime/rest/snapshot.ts b/x-pack/test/api_integration/apis/uptime/rest/snapshot.ts index 20fe59d149ae8..9a8951741948e 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/snapshot.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/snapshot.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { expectFixtureEql } from '../graphql/helpers/expect_fixture_eql'; +import { expectFixtureEql } from './helper/expect_fixture_eql'; import { FtrProviderContext } from '../../../ftr_provider_context'; -import { makeChecksWithStatus, getChecksDateRange } from '../graphql/helpers/make_checks'; +import { makeChecksWithStatus, getChecksDateRange } from './helper/make_checks'; export default function({ getService }: FtrProviderContext) { const supertest = getService('supertest'); diff --git a/x-pack/test/api_integration/apis/uptime/rest/telemetry_collectors.ts b/x-pack/test/api_integration/apis/uptime/rest/telemetry_collectors.ts index b2ec96be0f288..017ef02afe5ea 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/telemetry_collectors.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/telemetry_collectors.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants'; -import { makeChecksWithStatus } from '../graphql/helpers/make_checks'; +import { makeChecksWithStatus } from './helper/make_checks'; export default function({ getService }: FtrProviderContext) { const supertest = getService('supertest'); diff --git a/x-pack/test/functional/apps/uptime/locations.ts b/x-pack/test/functional/apps/uptime/locations.ts index bbf50344f3493..e266594e6a762 100644 --- a/x-pack/test/functional/apps/uptime/locations.ts +++ b/x-pack/test/functional/apps/uptime/locations.ts @@ -5,7 +5,7 @@ */ import moment from 'moment'; -import { makeChecksWithStatus } from '../../../api_integration/apis/uptime/graphql/helpers/make_checks'; +import { makeChecksWithStatus } from '../../../api_integration/apis/uptime/rest/helper/make_checks'; import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { diff --git a/x-pack/test/functional/apps/uptime/settings.ts b/x-pack/test/functional/apps/uptime/settings.ts index 3294d928b61b3..e6314d3d30a7a 100644 --- a/x-pack/test/functional/apps/uptime/settings.ts +++ b/x-pack/test/functional/apps/uptime/settings.ts @@ -10,7 +10,7 @@ import { defaultDynamicSettings, DynamicSettings, } from '../../../../legacy/plugins/uptime/common/runtime_types'; -import { makeChecks } from '../../../api_integration/apis/uptime/graphql/helpers/make_checks'; +import { makeChecks } from '../../../api_integration/apis/uptime/rest/helper/make_checks'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const { uptime: uptimePage } = getPageObjects(['uptime']);