From 4d99688a4169f9a14759888ff9b0971358bd72dd Mon Sep 17 00:00:00 2001 From: Sean Li Date: Tue, 1 Nov 2022 10:04:18 -0700 Subject: [PATCH] [Metrics] Adding API Connection to Metrics Sidebar (#1211) * Adding API connects Signed-off-by: Sean Li * Addressing constant chagne Signed-off-by: Sean Li Signed-off-by: Sean Li --- .../common/constants/metrics.ts | 6 +- .../public/components/app.tsx | 1 + .../components/metrics/helpers/utils.tsx | 15 +- .../public/components/metrics/index.tsx | 33 +- .../redux/reducers/metrics_fetch_reducers.ts | 4 - .../metrics/redux/slices/metrics_slice.ts | 107 +- .../metrics/redux/slices/mockMetrics.js | 4645 +++++++++-------- .../components/metrics/sidebar/sidebar.tsx | 133 +- .../public/framework/redux/store/index.ts | 2 +- 9 files changed, 2496 insertions(+), 2450 deletions(-) delete mode 100644 dashboards-observability/public/components/metrics/redux/reducers/metrics_fetch_reducers.ts diff --git a/dashboards-observability/common/constants/metrics.ts b/dashboards-observability/common/constants/metrics.ts index 4dc2fa32d..370bd47e1 100644 --- a/dashboards-observability/common/constants/metrics.ts +++ b/dashboards-observability/common/constants/metrics.ts @@ -3,9 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -export const SELECTED_METRICS = 'selectedMetrics'; -export const RECENTLY_CREATED_METRICS = 'unselectedMetrics'; -export const AVAILABLE_METRICS = 'availableMetrics'; +// requests constants +export const PPL_PROMETHEUS_CATALOG_REQUEST = + 'show catalogs | where CONNECTOR_TYPE="PROMETHEUS" | fields CATALOG_NAME'; // redux export const REDUX_SLICE_METRICS = 'metrics'; diff --git a/dashboards-observability/public/components/app.tsx b/dashboards-observability/public/components/app.tsx index 4102663c7..34f9b780b 100644 --- a/dashboards-observability/public/components/app.tsx +++ b/dashboards-observability/public/components/app.tsx @@ -73,6 +73,7 @@ export const App = ({ chrome={chrome} parentBreadcrumb={parentBreadcrumb} renderProps={props} + pplService={pplService} /> ); }} diff --git a/dashboards-observability/public/components/metrics/helpers/utils.tsx b/dashboards-observability/public/components/metrics/helpers/utils.tsx index 313992fd5..11804262d 100644 --- a/dashboards-observability/public/components/metrics/helpers/utils.tsx +++ b/dashboards-observability/public/components/metrics/helpers/utils.tsx @@ -10,7 +10,6 @@ import { DurationRange } from '@elastic/eui/src/components/date_picker/types'; import _ from 'lodash'; import { Moment } from 'moment-timezone'; import React from 'react'; -import { SavedVisualizationType } from 'common/types/custom_panels'; import { CUSTOM_PANELS_API_PREFIX } from '../../../../common/constants/custom_panels'; import { PPL_DATE_FORMAT, PPL_INDEX_REGEX } from '../../../../common/constants/shared'; import PPLService from '../../../services/requests/ppl'; @@ -45,3 +44,17 @@ export const onTimeChange = ( setEnd(end); setRecentlyUsedRanges(recentlyUsedRange.slice(0, 9)); }; + +// PPL Service requestor +export const pplServiceRequestor = (pplService: PPLService, finalQuery: string) => { + return pplService.fetch({ query: finalQuery, format: 'viz' }).catch((error: Error) => { + console.error(error); + }); +}; + +// Observability backend to fetch visualizations/custom metrics +export const getVisualizations = (http: CoreStart['http']) => { + return http.get(`${CUSTOM_PANELS_API_PREFIX}/visualizations/`).catch((err) => { + console.error('Issue in fetching all saved visualizations', err); + }); +}; diff --git a/dashboards-observability/public/components/metrics/index.tsx b/dashboards-observability/public/components/metrics/index.tsx index 43546767e..9287001fe 100644 --- a/dashboards-observability/public/components/metrics/index.tsx +++ b/dashboards-observability/public/components/metrics/index.tsx @@ -2,7 +2,6 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -/* eslint-disable no-console */ import './index.scss'; import { @@ -35,16 +34,17 @@ import { ChromeBreadcrumb, CoreStart } from '../../../../../src/core/public'; import { onTimeChange } from './helpers/utils'; import { Sidebar } from './sidebar/sidebar'; import { EmptyMetricsView } from './view/empty_view'; -import { selectMetrics } from './redux/slices/metrics_slice'; +import PPLService from '../../services/requests/ppl'; interface MetricsProps { http: CoreStart['http']; chrome: CoreStart['chrome']; parentBreadcrumb: ChromeBreadcrumb; renderProps: RouteComponentProps; + pplService: PPLService; } -export const Home = ({ http, chrome, parentBreadcrumb, renderProps }: MetricsProps) => { +export const Home = ({ http, chrome, parentBreadcrumb, renderProps, pplService }: MetricsProps) => { // Date picker constants const [recentlyUsedRanges, setRecentlyUsedRanges] = useState([]); const [start, setStart] = useState('now-30m'); @@ -53,26 +53,6 @@ export const Home = ({ http, chrome, parentBreadcrumb, renderProps }: MetricsPro // Side bar constants const [isSidebarClosed, setIsSidebarClosed] = useState(false); - const metricsList = useSelector(selectMetrics); - - // Using Visualizations for recently created custom metrics for now - const [visualizationsList, setVisualizationsList] = useState([]); - // Fetch Saved Visualizations - const fetchVisualizations = async () => { - let savedVisualizations; - await http - .get(`${CUSTOM_PANELS_API_PREFIX}/visualizations/`) - .then((res) => { - setVisualizationsList(res.visualizations); - }) - .catch((err) => { - console.error('Issue in fetching all saved visualizations', err); - }); - return savedVisualizations; - }; - useEffect(() => { - fetchVisualizations(); - }, []); // Date Picker functions // Empty functions for now @@ -118,12 +98,7 @@ export const Home = ({ http, chrome, parentBreadcrumb, renderProps }: MetricsPro
- {!isSidebarClosed && ( - - )} + {!isSidebarClosed && } { + const { http, pplService } = services; + const customData = await fetchCustomMetrics(http); + const remoteData = await fetchRemoteMetrics(pplService); + + return Promise.all([customData, ...remoteData]).then((datasets) => datasets.flat()); +}); + +const fetchCustomMetrics = async (http: any) => { + const dataSet = await getVisualizations(http); + + const normalizedData = dataSet.visualizations.map((obj: any) => ({ + id: obj.id, + name: obj.name, + catalog: 'CUSTOM_METRICS', + type: obj.type, + })); + return normalizedData; }; -const initialState = { - metrics: { ...initialMetrics }, +const fetchRemoteMetrics = async (pplService: any) => { + const dataSet = []; + const catalogs = await pplServiceRequestor(pplService, PPL_PROMETHEUS_CATALOG_REQUEST); + for (const catalog of catalogs.jsonData) { + const catalogData = await pplServiceRequestor( + pplService, + `source = ${catalog.CATALOG_NAME}.information_schema.tables` + ); + const normalizedData = catalogData.jsonData.map((obj: any) => ({ + id: `${obj.TABLE_CATALOG}.${obj.TABLE_NAME}`, + name: `${obj.TABLE_CATALOG}.${obj.TABLE_NAME}`, + catalog: `${catalog.CATALOG_NAME}`, + type: obj.TABLE_TYPE, + })); + dataSet.push(normalizedData); + } + return dataSet; }; export const metricSlice = createSlice({ name: REDUX_SLICE_METRICS, initialState, reducers: { - init: (state) => { - state.metrics = { - ...initialMetrics, - }; + selectMetric: (state, { payload }) => { + state.selected.push(payload.id); }, - updateMetrics: (state, { payload }) => { - state.metrics = { - ...state.metrics, - ...payload.data, - }; - console.log('updated metrics'); - console.log(state); - }, - reset: (state) => { - state.metrics = { - ...initialMetrics, - }; - }, - remove: (state) => { - delete state.metrics; - }, - sortMetrics: (state, { payload }) => { - forEach(payload.data, (toSort: string) => { - state.metrics[toSort].sort((prev: any, cur: any) => cur[2].localeCompare(prev[2])); - }); - }, - fetchMetrics: (state, { payload }) => { - state = { - ...state, - ...payload.data, - }; + deSelectMetric: (state, { payload }) => { + state.selected = state.selected.filter((id) => id !== payload.id); }, }, - extraReducers: (builder) => {}, + extraReducers: (builder) => { + builder.addCase(loadMetrics.fulfilled, (state, { payload }) => { + state.metrics = payload; + }); + }, }); -export const { init, reset, remove, updateMetrics, sortMetrics } = metricSlice.actions; +export const { deSelectMetric, selectMetric } = metricSlice.actions; + +export const metricsStateSelector = (state) => state.metrics; + +export const availableMetricsSelector = (state) => + state.metrics.metrics.filter((metric) => !state.metrics.selected.includes(metric.id)); -export const selectMetrics = (state) => state.metrics; +export const selectedMetricsSelector = (state) => + state.metrics.metrics.filter((metric) => state.metrics.selected.includes(metric.id)); export default metricSlice.reducer; diff --git a/dashboards-observability/public/components/metrics/redux/slices/mockMetrics.js b/dashboards-observability/public/components/metrics/redux/slices/mockMetrics.js index cfb5f24c0..f95d191b2 100644 --- a/dashboards-observability/public/components/metrics/redux/slices/mockMetrics.js +++ b/dashboards-observability/public/components/metrics/redux/slices/mockMetrics.js @@ -1,2437 +1,2552 @@ - -export const metricNamesTablePPL = { - 'schema': [ - { - 'name': 'TABLE_CAT', - 'type': 'string' - }, - { - 'name': 'TABLE_SCHEM', - 'type': 'string' - }, - { - 'name': 'TABLE_NAME', - 'type': 'string' - }, - { - 'name': 'TABLE_TYPE', - 'type': 'string' - }, - { - 'name': 'REMARKS', - 'type': 'string' - }, - { - 'name': 'TYPE_CAT', - 'type': 'string' - }, - { - 'name': 'TYPE_SCHEM', - 'type': 'string' - }, +export const customMetricsTablePPL = { + jsonData: [ { - 'name': 'TYPE_NAME', - 'type': 'string' + objectId: '5PZrE4QB5_fIyAzrigGg', + lastUpdatedTimeMs: 1666773125792, + createdTimeMs: 1666773125792, + tenant: '', + savedVisualization: { + name: '[Logs] Daily count for error response codes', + description: '', + query: + "source = opensearch_dashboards_sample_data_logs | where response='503' or response='404' | stats count() by span(timestamp,1d)", + type: 'bar', + selected_date_range: { + start: 'now/y', + end: 'now', + text: '', + }, + selected_timestamp: { + name: 'timestamp', + type: 'timestamp', + }, + selected_fields: { + text: '', + tokens: [], + }, + }, }, - { - 'name': 'SELF_REFERENCING_COL_NAME', - 'type': 'string' - }, - { - 'name': 'REF_GENERATION', - 'type': 'string' - } ], - 'datarows': [ - [ - 'catalog', - null, +}; + +export const metricNamesTablePPL = { + data: { + TABLE_CATALOG: [ + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + 'prometheus_1', + ], + TABLE_SCHEMA: [ + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + 'default', + ], + TABLE_NAME: [ + 'prometheus_tsdb_lowest_timestamp_seconds', + 'prometheus_http_requests_total', 'prometheus_tsdb_reloads_total', - 'counter', - 'Number of times the database reloaded block data from disk.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_heap_stacks_bytes', - 'gauge', - 'Memory allocated from the heap that is reserved for stack space, whether or not it is currently in-use.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_wal_page_flushes_total', - 'counter', - 'Total number of page flushes.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_snapshot_replay_error_total', + 'promhttp_metric_handler_requests_in_flight', + 'process_virtual_memory_bytes', 'go_memstats_mspan_sys_bytes', - 'gauge', - 'Number of bytes used for mspan structures obtained from system.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'go_memstats_stack_sys_bytes', - 'gauge', - 'Number of bytes obtained from system for stack allocator.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_target_scrapes_exceeded_body_size_limit_total', + 'prometheus_tsdb_wal_truncations_failed_total', + 'prometheus_engine_query_log_enabled', + 'prometheus_target_scrape_pool_targets', 'prometheus_tsdb_compactions_total', - 'counter', - 'Total number of compactions that were executed for the partition.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_sd_nomad_failures_total', 'prometheus_tsdb_exemplar_max_exemplars', - 'gauge', - 'Total number of exemplars the exemplar storage can store, resizeable.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_exemplar_exemplars_in_storage', - 'gauge', - 'Number of exemplars currently in circular storage.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_engine_query_duration_seconds', - 'summary', - 'Query timings', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_isolation_high_watermark', - 'gauge', - 'The highest TSDB append ID that has been given out.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_engine_queries_concurrent_max', - 'gauge', - 'The max number of concurrent queries.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_remote_storage_exemplars_in_total', - 'counter', - 'Exemplars in to remote storage, compare to exemplars out for queue managers.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_data_replay_duration_seconds', - 'gauge', - 'Time taken to replay the data on disk.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_sd_dns_lookups_total', + 'prometheus_tsdb_out_of_bound_samples_total', 'net_conntrack_dialer_conn_closed_total', - 'counter', - 'Total number of connections closed which originated from the dialer of a given name.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'go_memstats_frees_total', - 'counter', - 'Total number of frees.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_heap_allocs_objects_total', - 'counter', - 'Cumulative count of heap allocations triggered by the application. Note that this does not include tiny objects as defined by /gc/heap/tiny/allocs:objects, only tiny blocks.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_exemplar_out_of_order_exemplars_total', - 'counter', - 'Total number of out of order exemplar ingestion failed attempts.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_wal_writes_failed_total', + 'prometheus_target_metadata_cache_bytes', + 'go_memstats_buck_hash_sys_bytes', + 'prometheus_target_sync_failed_total', 'go_memstats_mallocs_total', - 'counter', - 'Total number of mallocs.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_mmap_chunk_corruptions_total', - 'counter', - 'Total number of memory-mapped chunk corruptions.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_web_federation_errors_total', - 'counter', - 'Total number of errors that occurred while sending federation responses.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_sd_discovered_targets', 'prometheus_sd_file_read_errors_total', - 'counter', - 'The number of File-SD read errors.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_sd_kuma_fetch_duration_seconds', - 'summary', - 'The duration of a Kuma MADS fetch call.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_head_series_created_total', + 'prometheus_tsdb_head_active_appenders', + 'prometheus_tsdb_symbol_table_size_bytes', + 'prometheus_sd_received_updates_total', 'prometheus_tsdb_isolation_low_watermark', - 'gauge', - 'The lowest TSDB append ID that is still referenced.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_compaction_chunk_samples', + 'prometheus_tsdb_head_truncations_total', 'prometheus_http_request_duration_seconds', - 'histogram', - 'Histogram of latencies for HTTP requests.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_compactions_triggered_total', + 'net_conntrack_dialer_conn_established_total', 'process_resident_memory_bytes', - 'gauge', - 'Resident memory size in bytes.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_lowest_timestamp', + 'go_memstats_heap_sys_bytes', 'prometheus_tsdb_checkpoint_creations_failed_total', - 'counter', - 'Total number of checkpoint creations that failed.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_target_scrapes_sample_duplicate_timestamp_total', - 'counter', - 'Total number of samples rejected due to duplicate timestamps but different values.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_treecache_zookeeper_failures_total', - 'counter', - 'The total number of ZooKeeper failures.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_tombstone_cleanup_seconds', 'prometheus_tsdb_compaction_chunk_size_bytes', - 'histogram', - 'Final size of chunks on their first compaction', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_head_gc_duration_seconds', - 'summary', - 'Runtime of garbage collection in the head block.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_heap_objects_objects', - 'gauge', - 'Number of objects, live or unswept, occupying heap memory.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'process_open_fds', - 'gauge', - 'Number of open file descriptors.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_target_metadata_cache_entries', + 'prometheus_treecache_watcher_goroutines', 'process_max_fds', - 'gauge', - 'Maximum number of open file descriptors.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_profiling_buckets_bytes', - 'gauge', - 'Memory that is used by the stack trace hash map used for profiling.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'go_memstats_heap_objects', + 'go_memstats_mcache_inuse_bytes', + 'go_memstats_other_sys_bytes', + 'prometheus_sd_linode_failures_total', + 'prometheus_target_scrape_pool_reloads_total', + 'go_threads', + 'prometheus_tsdb_head_out_of_order_samples_appended_total', 'go_memstats_heap_inuse_bytes', - 'gauge', - 'Number of heap bytes that are in use.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'net_conntrack_dialer_conn_failed_total', - 'counter', - 'Total number of connections failed to dial by the dialer a given name.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'go_memstats_mcache_sys_bytes', - 'gauge', - 'Number of bytes used for mcache structures obtained from system.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_remote_storage_samples_in_total', + 'prometheus_tsdb_exemplar_last_exemplars_timestamp_seconds', + 'prometheus_config_last_reload_successful', 'prometheus_tsdb_head_min_time', - 'gauge', - 'Minimum time bound of the head block. The unit is decided by the library consumer.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'go_memstats_alloc_bytes_total', 'prometheus_tsdb_exemplar_series_with_exemplars_in_storage', - 'gauge', - 'Number of series with exemplars currently in circular storage.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_head_series', 'go_gc_duration_seconds', - 'summary', - 'A summary of the pause duration of garbage collection cycles.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_metadata_mspan_inuse_bytes', - 'gauge', - 'Memory that is occupied by runtime mspan structures that are currently being used.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_sd_kubernetes_events_total', + 'prometheus_target_scrapes_sample_out_of_bounds_total', + 'prometheus_tsdb_storage_blocks_bytes', 'prometheus_build_info', - 'gauge', - 'A metric with a constant 1 value labeled by version, revision, branch, and goversion from which prometheus was built.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_sd_updates_total', + 'prometheus_tsdb_time_retentions_total', 'prometheus_tsdb_compaction_chunk_range_seconds', - 'histogram', - 'Final time range of chunks on their first compaction', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_sd_azure_failures_total', 'prometheus_tsdb_exemplar_exemplars_appended_total', - 'counter', - 'Total number of appended exemplars.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_head_chunks', - 'gauge', - 'Total number of chunks in the head block.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_head_max_time', - 'gauge', - 'Maximum timestamp of the head block. The unit is decided by the library consumer.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_head_series_removed_total', + 'prometheus_tsdb_wal_truncate_duration_seconds', 'prometheus_tsdb_wal_corruptions_total', - 'counter', - 'Total number of WAL corruptions.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'net_conntrack_listener_conn_closed_total', - 'counter', - 'Total number of connections closed that were made to the listener of a given name.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_wal_fsync_duration_seconds', - 'summary', - 'Duration of WAL fsync.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_vertical_compactions_total', 'prometheus_tsdb_wal_segment_current', - 'gauge', - 'WAL segment index that TSDB is currently writing to.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_sched_latencies_seconds', - 'histogram', - 'Distribution of the time goroutines have spent in the scheduler in a runnable state before actually running.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_sd_http_failures_total', + 'prometheus_target_scrapes_exemplar_out_of_order_total', + 'prometheus_tsdb_checkpoint_creations_total', 'net_conntrack_dialer_conn_attempted_total', - 'counter', - 'Total number of connections attempted by the given dialer a given name.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_target_scrape_pool_reloads_failed_total', 'prometheus_tsdb_head_min_time_seconds', - 'gauge', - 'Minimum time bound of the head block.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_notifications_alertmanagers_discovered', 'prometheus_tsdb_blocks_loaded', - 'gauge', - 'Number of currently loaded data blocks', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'go_memstats_last_gc_time_seconds', - 'gauge', - 'Number of seconds since 1970 of last garbage collection.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_notifications_queue_capacity', 'prometheus_notifications_dropped_total', - 'counter', - 'Total number of alerts dropped due to errors when sending to Alertmanager.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_config_last_reload_success_timestamp_seconds', - 'gauge', - 'Timestamp of the last successful configuration reload.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_remote_storage_highest_timestamp_in_seconds', - 'gauge', - 'Highest timestamp that has come into the remote storage via the Appender interface, in seconds since epoch.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_rule_evaluation_duration_seconds', - 'summary', - 'The duration for a rule to execute.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_wal_completed_pages_total', - 'counter', - 'Total number of completed pages.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_compaction_duration_seconds', + 'prometheus_web_federation_warnings_total', + 'process_start_time_seconds', 'promhttp_metric_handler_requests_total', - 'counter', - 'Total number of scrapes by HTTP status code.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'go_memstats_heap_alloc_bytes', 'prometheus_notifications_queue_length', - 'gauge', - 'The number of alert notifications in the queue.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'go_memstats_mspan_inuse_bytes', 'go_memstats_lookups_total', - 'counter', - 'Total number of pointer lookups.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_heap_frees_by_size_bytes_total', - 'histogram', - 'Distribution of freed heap allocations by approximate size. Note that this does not include tiny objects as defined by /gc/heap/tiny/allocs:objects, only tiny blocks.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_checkpoint_deletions_total', - 'counter', - 'Total number of checkpoint deletions attempted.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'go_memstats_alloc_bytes', - 'gauge', - 'Number of bytes allocated and still in use.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_template_text_expansions_total', + 'go_memstats_sys_bytes', 'prometheus_target_scrapes_sample_out_of_order_total', - 'counter', - 'Total number of samples rejected due to not being out of the expected order.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_target_scrape_pools_total', - 'counter', - 'Total number of scrape pool creation attempts.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_head_chunks_removed_total', + 'prometheus_tsdb_compactions_skipped_total', 'prometheus_target_scrape_pool_exceeded_label_limits_total', - 'counter', - 'Total number of times scrape pools hit the label limits, during sync or config reload.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_checkpoint_deletions_failed_total', - 'counter', - 'Total number of checkpoint deletions that failed.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_compactions_failed_total', - 'counter', - 'Total number of compactions that failed for the partition.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_heap_unused_bytes', - 'gauge', - 'Memory that is reserved for heap objects but is not currently used to hold heap objects.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_sd_kuma_fetch_skipped_updates_total', + 'prometheus_target_scrape_pools_failed_total', 'prometheus_sd_file_scan_duration_seconds', - 'summary', - 'The duration of the File-SD scan in seconds.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_clean_start', + 'prometheus_tsdb_wal_truncations_total', 'prometheus_target_scrapes_exceeded_sample_limit_total', - 'counter', - 'Total number of scrapes that hit the sample limit and were rejected.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_target_interval_length_seconds', 'prometheus_target_scrapes_cache_flush_forced_total', - 'counter', - 'How many times a scrape cache was flushed due to getting big while scrapes are failing.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_out_of_order_samples_total', - 'counter', - 'Total number of out of order samples ingestion failed attempts.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_cycles_automatic_gc_cycles_total', - 'counter', - 'Count of completed GC cycles generated by the Go runtime.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_retention_limit_bytes', + 'process_cpu_seconds_total', 'go_memstats_heap_idle_bytes', - 'gauge', - 'Number of heap bytes waiting to be used.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_sd_consul_rpc_failures_total', - 'counter', - 'The number of Consul RPC call failures.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_cycles_forced_gc_cycles_total', - 'counter', - 'Count of completed GC cycles forced by the application.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_target_scrape_pool_sync_total', - 'counter', - 'Total number of syncs that were executed on a scrape pool.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_heap_allocs_bytes_total', - 'counter', - 'Cumulative sum of memory allocated to the heap by the application.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_remote_storage_string_interner_zero_reference_releases_total', - 'counter', - 'The number of times release has been called for strings that are not interned.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_sd_dns_lookup_failures_total', - 'counter', - 'The number of DNS-SD lookup failures.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'go_memstats_gc_sys_bytes', - 'gauge', - 'Number of bytes used for garbage collection system metadata.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_sd_failed_configs', 'go_info', - 'gauge', - 'Information about the Go environment.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_engine_queries', - 'gauge', - 'The current number of queries being executed or waiting.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'go_memstats_stack_inuse_bytes', 'prometheus_sd_consul_rpc_duration_seconds', - 'summary', - 'The duration of a Consul RPC call in seconds.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_size_retentions_total', - 'counter', - 'The number of times that blocks were deleted because the maximum number of bytes was exceeded.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_target_sync_length_seconds', - 'summary', - 'Actual interval to sync the scrape pool.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_heap_released_bytes', - 'gauge', - "Memory that is completely free and has been returned to the underlying system. This metric is the runtime's estimate of free address space that is still mapped into the process, but is not backed by physical memory.", - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_engine_query_log_failures_total', 'prometheus_target_scrape_pool_exceeded_target_limit_total', - 'counter', - 'Total number of times scrape pools hit the target limit, during sync or config reload.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_ready', 'prometheus_tsdb_head_max_time_seconds', - 'gauge', - 'Maximum timestamp of the head block.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'go_goroutines', 'prometheus_api_remote_read_queries', - 'gauge', - 'The current number of remote read queries being executed or waiting.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_rule_group_duration_seconds', - 'summary', - 'The duration of rule group evaluations.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_compaction_populating_block', - 'gauge', - 'Set to 1 when a block is currently being written to the disk.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_metadata_mcache_free_bytes', - 'gauge', - 'Memory that is reserved for runtime mcache structures, but not in-use.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_tsdb_reloads_failures_total', + 'prometheus_tsdb_too_old_samples_total', + 'prometheus_tsdb_head_samples_appended_total', 'go_memstats_heap_released_bytes', - 'gauge', - 'Number of heap bytes released to OS.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_tsdb_head_truncations_failed_total', - 'counter', - 'Total number of head truncations that failed.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'net_conntrack_listener_conn_accepted_total', + 'process_virtual_memory_max_bytes', 'prometheus_template_text_expansion_failures_total', - 'counter', - 'The total number of template text expansion failures.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, + 'prometheus_sd_kuma_fetch_failures_total', 'prometheus_tsdb_head_chunks_created_total', - 'counter', - 'Total number of chunks created in the head', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'go_memstats_next_gc_bytes', - 'gauge', - 'Number of heap bytes when next garbage collection will take place.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, 'prometheus_http_response_size_bytes', - 'histogram', - 'Histogram of response size for HTTP requests.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_metadata_mcache_inuse_bytes', - 'gauge', - 'Memory that is occupied by runtime mcache structures that are currently being used.', - null, - null, - null, - null, - null + 'prometheus_tsdb_head_series_not_found_total', ], - [ - 'catalog', - null, - 'prometheus_tsdb_lowest_timestamp_seconds', + TABLE_TYPE: [ 'gauge', - 'Lowest timestamp value stored in the database.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_http_requests_total', 'counter', - 'Counter of HTTP requests.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_snapshot_replay_error_total', 'counter', - 'Total number snapshot replays that failed.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'promhttp_metric_handler_requests_in_flight', + 'counter', + 'counter', + 'gauge', + 'gauge', 'gauge', - 'Current number of scrapes being served.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'process_virtual_memory_bytes', 'gauge', - 'Virtual memory size in bytes.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_target_scrapes_exceeded_body_size_limit_total', 'counter', - 'Total number of scrapes that hit the body size limit', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_wal_truncations_failed_total', 'counter', - 'Total number of WAL truncations that failed.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_engine_query_log_enabled', 'gauge', - 'State of the query log.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_target_scrape_pool_targets', 'gauge', - 'Current number of targets in this scrape pool.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_sd_dns_lookups_total', 'counter', - 'The number of DNS-SD lookups.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_out_of_bound_samples_total', 'counter', - 'Total number of out of bound samples ingestion failed attempts.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_chunk_write_queue_operations_total', - 'counter', - 'Number of operations on the chunk_write_queue.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_wal_writes_failed_total', + 'gauge', + 'gauge', + 'summary', + 'gauge', + 'gauge', + 'counter', + 'gauge', + 'counter', + 'counter', + 'counter', + 'counter', + 'counter', 'counter', - 'Total number of WAL writes that failed.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_target_metadata_cache_bytes', 'gauge', - 'The number of bytes that are currently used for storing metric metadata in the cache', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memstats_buck_hash_sys_bytes', 'gauge', - 'Number of bytes used by the profiling bucket hash table.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_target_sync_failed_total', 'counter', - 'Total number of target sync failures.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_sd_discovered_targets', + 'counter', + 'counter', + 'counter', 'gauge', - 'Current number of discovered targets.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_head_series_created_total', 'counter', - 'Total number of series created in the head', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_head_active_appenders', + 'summary', + 'counter', 'gauge', - 'Number of currently active appender transactions', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_symbol_table_size_bytes', 'gauge', - 'Size of symbol table in memory for loaded blocks', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_sd_received_updates_total', 'counter', - 'Total number of update events received from the SD providers.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_compaction_chunk_samples', + 'gauge', 'histogram', - 'Final number of samples on their first compaction', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_head_truncations_total', 'counter', - 'Total number of head truncations attempted.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_compactions_triggered_total', + 'histogram', 'counter', - 'Total number of triggered compactions for the partition.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'net_conntrack_dialer_conn_established_total', 'counter', - 'Total number of connections successfully established by the given dialer a given name.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_lowest_timestamp', 'gauge', - 'Lowest timestamp value stored in the database. The unit is decided by the library consumer.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memstats_heap_sys_bytes', 'gauge', - 'Number of heap bytes obtained from system.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_tombstone_cleanup_seconds', + 'gauge', + 'counter', + 'counter', + 'counter', 'histogram', - 'The time taken to recompact blocks to remove tombstones.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_target_metadata_cache_entries', + 'histogram', + 'summary', + 'gauge', 'gauge', - 'Total number of metric metadata entries in the cache', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_treecache_watcher_goroutines', 'gauge', - 'The current number of watcher goroutines.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memstats_heap_objects', 'gauge', - 'Number of allocated objects.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memstats_mcache_inuse_bytes', 'gauge', - 'Number of bytes in use by mcache structures.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memstats_other_sys_bytes', 'gauge', - 'Number of bytes used for other system allocations.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_target_scrape_pool_reloads_total', - 'counter', - 'Total number of scrape pool reloads.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_threads', 'gauge', - 'Number of OS threads created.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_other_bytes', - 'gauge', - 'Memory used by execution trace buffers, structures for debugging the runtime, finalizer and profiler specials, and more.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_remote_storage_samples_in_total', 'counter', - 'Samples in to remote storage, compare to samples out for queue managers.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_exemplar_last_exemplars_timestamp_seconds', + 'counter', 'gauge', - 'The timestamp of the oldest exemplar stored in circular storage. Useful to check for what timerange the current exemplar buffer limit allows. This usually means the last timestampfor all exemplars for a typical setup. This is not true though if one of the series timestamp is in future compared to rest series.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_config_last_reload_successful', + 'counter', 'gauge', - 'Whether the last configuration reload attempt was successful.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_heap_allocs_by_size_bytes_total', - 'histogram', - 'Distribution of heap allocations by approximate size. Note that this does not include tiny objects as defined by /gc/heap/tiny/allocs:objects, only tiny blocks.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memstats_alloc_bytes_total', 'counter', - 'Total number of bytes allocated, even if freed.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_head_series', 'gauge', - 'Total number of series in the head block.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_sd_kubernetes_events_total', 'counter', - 'The number of Kubernetes events handled.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_target_scrapes_sample_out_of_bounds_total', + 'gauge', + 'gauge', + 'gauge', 'counter', - 'Total number of samples rejected due to timestamp falling outside of the time bounds.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_storage_blocks_bytes', 'gauge', - 'The number of bytes that are currently used for local storage by all blocks.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_sd_updates_total', + 'gauge', + 'summary', 'counter', - 'Total number of update events sent to the SD consumers.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_time_retentions_total', 'counter', - 'The number of times that blocks were deleted because the maximum time limit was exceeded.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_head_series_removed_total', + 'gauge', + 'gauge', + 'counter', + 'counter', + 'histogram', + 'counter', + 'counter', + 'gauge', + 'gauge', 'counter', - 'Total number of series removed in the head', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_wal_truncate_duration_seconds', 'summary', - 'Duration of WAL truncation.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_heap_frees_objects_total', - 'counter', - 'Cumulative count of heap allocations whose storage was freed by the garbage collector. Note that this does not include tiny objects as defined by /gc/heap/tiny/allocs:objects, only tiny blocks.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_vertical_compactions_total', 'counter', - 'Total number of compactions done on overlapping blocks.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_heap_goal_bytes', - 'gauge', - 'Heap size target for the end of the GC cycle.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_metadata_mspan_free_bytes', - 'gauge', - 'Memory that is reserved for runtime mspan structures, but not in-use.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_target_scrapes_exemplar_out_of_order_total', 'counter', - 'Total number of exemplar rejected due to not being out of the expected order.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_checkpoint_creations_total', + 'summary', + 'counter', + 'gauge', + 'counter', + 'counter', + 'counter', 'counter', - 'Total number of checkpoint creations attempted.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_target_scrape_pool_reloads_failed_total', 'counter', - 'Total number of failed scrape pool reloads.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_notifications_alertmanagers_discovered', 'gauge', - 'The number of alertmanagers discovered and active.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_notifications_queue_capacity', 'gauge', - 'The capacity of the alert notifications queue.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_heap_tiny_allocs_objects_total', - 'counter', - 'Count of small allocations that are packed together into blocks. These allocations are counted separately from other allocations because each individual allocation is not tracked by the runtime, only their block. Each block is already accounted for in allocs-by-size and frees-by-size.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_compaction_duration_seconds', + 'gauge', + 'gauge', + 'gauge', + 'counter', + 'gauge', + 'gauge', + 'summary', + 'counter', 'histogram', - 'Duration of compaction runs', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_web_federation_warnings_total', 'counter', - 'Total number of warnings that occurred while sending federation responses.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'process_start_time_seconds', 'gauge', - 'Start time of the process since unix epoch in seconds.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memstats_heap_alloc_bytes', + 'counter', + 'gauge', 'gauge', - 'Number of heap bytes allocated and still in use.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memstats_mspan_inuse_bytes', 'gauge', - 'Number of bytes in use by mspan structures.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_heap_objects_bytes', - 'gauge', - 'Memory occupied by live objects and dead objects that have not yet been marked free by the garbage collector.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_template_text_expansions_total', 'counter', - 'The total number of template text expansions.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memstats_sys_bytes', + 'counter', 'gauge', - 'Number of bytes obtained from system.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_heap_free_bytes', - 'gauge', - 'Memory that is completely free and eligible to be returned to the underlying system, but has not been. This metric is the runtime\'s estimate of free address space that is backed by physical memory.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_head_chunks_removed_total', 'counter', - 'Total number of chunks removed in the head', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_compactions_skipped_total', + 'gauge', 'counter', - 'Total number of skipped compactions due to disabled auto compaction.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_sd_kuma_fetch_skipped_updates_total', 'counter', - 'The number of Kuma MADS fetch calls that result in no updates to the targets.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_target_scrape_pools_failed_total', 'counter', - 'Total number of scrape pool creations that failed.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memstats_gc_cpu_fraction', - 'gauge', - 'The fraction of this program\'s available CPU time used by the GC since the program started.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_clean_start', + 'counter', + 'counter', + 'counter', + 'counter', + 'counter', + 'counter', + 'summary', 'gauge', - '-1: lockfile is disabled. 0: a lockfile from a previous execution was replaced. 1: lockfile creation was clean', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_wal_truncations_total', 'counter', - 'Total number of WAL truncations attempted.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_target_interval_length_seconds', + 'counter', 'summary', - 'Actual intervals between scrapes.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_retention_limit_bytes', + 'counter', + 'counter', 'gauge', - 'Max number of bytes to be retained in the tsdb blocks, configured 0 means disabled', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_sched_goroutines_goroutines', - 'gauge', - 'Count of live goroutines.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'process_cpu_seconds_total', 'counter', - 'Total user and system CPU time spent in seconds.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_metadata_other_bytes', - 'gauge', - 'Memory that is reserved for or used to hold runtime metadata.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_total_bytes', - 'gauge', - 'All memory mapped by the Go runtime into the current process as read-write. Note that this does not include memory mapped by code called via cgo or via the syscall package. Sum of all metrics in /memory/classes.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_pauses_seconds_total', - 'histogram', - 'Distribution individual GC-related stop-the-world pause latencies.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_cycles_total_gc_cycles_total', - 'counter', - 'Count of all completed GC cycles.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_sd_failed_configs', 'gauge', - 'Current number of service discovery configurations that failed to load.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memstats_stack_inuse_bytes', + 'counter', + 'counter', + 'counter', + 'counter', 'gauge', - 'Number of bytes in use by the stack allocator.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_memory_classes_os_stacks_bytes', - 'gauge', - 'Stack memory allocated by the underlying operating system.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_engine_query_log_failures_total', + 'gauge', + 'gauge', + 'gauge', + 'gauge', + 'summary', + 'counter', + 'summary', + 'counter', 'counter', - 'The number of query log failures.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_goroutines', 'gauge', - 'Number of goroutines that currently exist.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_reloads_failures_total', + 'gauge', + 'gauge', + 'gauge', + 'summary', + 'gauge', 'counter', - 'Number of times the database failed to reloadBlocks block data from disk.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_head_samples_appended_total', 'counter', - 'Total number of appended samples.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'net_conntrack_listener_conn_accepted_total', 'counter', - 'Total number of connections opened to the listener of a given name.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'process_virtual_memory_max_bytes', 'gauge', - 'Maximum amount of virtual memory available in bytes.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'go_gc_heap_frees_bytes_total', - 'counter', - 'Cumulative sum of heap memory freed by the garbage collector.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_sd_kuma_fetch_failures_total', 'counter', - 'The number of Kuma MADS fetch call failures.', - null, - null, - null, - null, - null - ], - [ - 'catalog', - null, - 'prometheus_tsdb_head_series_not_found_total', 'counter', - 'Total number of requests for series that were not found.', - null, - null, - null, - null, - null - ] + 'gauge', + 'counter', + 'counter', + 'counter', + 'gauge', + 'histogram', + 'counter', + ], + UNIT: [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + ], + REMARKS: [ + 'Lowest timestamp value stored in the database.', + 'Counter of HTTP requests.', + 'Number of times the database reloaded block data from disk.', + 'Total number of page flushes.', + 'Total number snapshot replays that failed.', + 'Current number of scrapes being served.', + 'Virtual memory size in bytes.', + 'Number of bytes used for mspan structures obtained from system.', + 'Number of bytes obtained from system for stack allocator.', + 'Total number of scrapes that hit the body size limit', + 'Total number of WAL truncations that failed.', + 'State of the query log.', + 'Current number of targets in this scrape pool.', + 'Total number of compactions that were executed for the partition.', + 'Number of nomad service discovery refresh failures.', + 'Total number of exemplars the exemplar storage can store, resizeable.', + 'Number of exemplars currently in circular storage.', + 'Query timings', + 'The highest TSDB append ID that has been given out.', + 'The max number of concurrent queries.', + 'Exemplars in to remote storage, compare to exemplars out for queue managers.', + 'Time taken to replay the data on disk.', + 'The number of DNS-SD lookups.', + 'Total number of out of bound samples ingestion failed attempts with out of order support disabled.', + 'Total number of connections closed which originated from the dialer of a given name.', + 'Total number of frees.', + 'Total number of out of order exemplar ingestion failed attempts.', + 'Total number of WAL writes that failed.', + 'The number of bytes that are currently used for storing metric metadata in the cache', + 'Number of bytes used by the profiling bucket hash table.', + 'Total number of target sync failures.', + 'Total number of mallocs.', + 'Total number of memory-mapped chunk corruptions.', + 'Total number of errors that occurred while sending federation responses.', + 'Current number of discovered targets.', + 'The number of File-SD read errors.', + 'The duration of a Kuma MADS fetch call.', + 'Total number of series created in the head', + 'Number of currently active appender transactions', + 'Size of symbol table in memory for loaded blocks', + 'Total number of update events received from the SD providers.', + 'The lowest TSDB append ID that is still referenced.', + 'Final number of samples on their first compaction', + 'Total number of head truncations attempted.', + 'Histogram of latencies for HTTP requests.', + 'Total number of triggered compactions for the partition.', + 'Total number of connections successfully established by the given dialer a given name.', + 'Resident memory size in bytes.', + 'Lowest timestamp value stored in the database. The unit is decided by the library consumer.', + 'Number of heap bytes obtained from system.', + 'Total number of checkpoint creations that failed.', + 'Total number of samples rejected due to duplicate timestamps but different values.', + 'The total number of ZooKeeper failures.', + 'The time taken to recompact blocks to remove tombstones.', + 'Final size of chunks on their first compaction', + 'Runtime of garbage collection in the head block.', + 'Number of open file descriptors.', + 'Total number of metric metadata entries in the cache', + 'The current number of watcher goroutines.', + 'Maximum number of open file descriptors.', + 'Number of allocated objects.', + 'Number of bytes in use by mcache structures.', + 'Number of bytes used for other system allocations.', + 'Number of Linode service discovery refresh failures.', + 'Total number of scrape pool reloads.', + 'Number of OS threads created.', + 'Total number of appended out of order samples.', + 'Number of heap bytes that are in use.', + 'Total number of connections failed to dial by the dialer a given name.', + 'Number of bytes used for mcache structures obtained from system.', + 'Samples in to remote storage, compare to samples out for queue managers.', + 'The timestamp of the oldest exemplar stored in circular storage. Useful to check for what timerange the current exemplar buffer limit allows. This usually means the last timestampfor all exemplars for a typical setup. This is not true though if one of the series timestamp is in future compared to rest series.', + 'Whether the last configuration reload attempt was successful.', + 'Minimum time bound of the head block. The unit is decided by the library consumer.', + 'Total number of bytes allocated, even if freed.', + 'Number of series with exemplars currently in circular storage.', + 'Total number of series in the head block.', + 'A summary of the pause duration of garbage collection cycles.', + 'The number of Kubernetes events handled.', + 'Total number of samples rejected due to timestamp falling outside of the time bounds.', + 'The number of bytes that are currently used for local storage by all blocks.', + "A metric with a constant '1' value labeled by version, revision, branch, and goversion from which prometheus was built.", + 'Total number of update events sent to the SD consumers.', + 'The number of times that blocks were deleted because the maximum time limit was exceeded.', + 'Final time range of chunks on their first compaction', + 'Number of Azure service discovery refresh failures.', + 'Total number of appended exemplars.', + 'Total number of chunks in the head block.', + 'Maximum timestamp of the head block. The unit is decided by the library consumer.', + 'Total number of series removed in the head', + 'Duration of WAL truncation.', + 'Total number of WAL corruptions.', + 'Total number of connections closed that were made to the listener of a given name.', + 'Duration of WAL fsync.', + 'Total number of compactions done on overlapping blocks.', + 'WAL segment index that TSDB is currently writing to.', + 'Number of HTTP service discovery refresh failures.', + 'Total number of exemplar rejected due to not being out of the expected order.', + 'Total number of checkpoint creations attempted.', + 'Total number of connections attempted by the given dialer a given name.', + 'Total number of failed scrape pool reloads.', + 'Minimum time bound of the head block.', + 'The number of alertmanagers discovered and active.', + 'Number of currently loaded data blocks', + 'Number of seconds since 1970 of last garbage collection.', + 'The capacity of the alert notifications queue.', + 'Total number of alerts dropped due to errors when sending to Alertmanager.', + 'Timestamp of the last successful configuration reload.', + 'Highest timestamp that has come into the remote storage via the Appender interface, in seconds since epoch.', + 'The duration for a rule to execute.', + 'Total number of completed pages.', + 'Duration of compaction runs', + 'Total number of warnings that occurred while sending federation responses.', + 'Start time of the process since unix epoch in seconds.', + 'Total number of scrapes by HTTP status code.', + 'Number of heap bytes allocated and still in use.', + 'The number of alert notifications in the queue.', + 'Number of bytes in use by mspan structures.', + 'Total number of pointer lookups.', + 'Total number of checkpoint deletions attempted.', + 'Number of bytes allocated and still in use.', + 'The total number of template text expansions.', + 'Number of bytes obtained from system.', + 'Total number of samples rejected due to not being out of the expected order.', + 'Total number of scrape pool creation attempts.', + 'Total number of chunks removed in the head', + 'Total number of skipped compactions due to disabled auto compaction.', + 'Total number of times scrape pools hit the label limits, during sync or config reload.', + 'Total number of checkpoint deletions that failed.', + 'Total number of compactions that failed for the partition.', + 'The number of Kuma MADS fetch calls that result in no updates to the targets.', + 'Total number of scrape pool creations that failed.', + 'The duration of the File-SD scan in seconds.', + '-1: lockfile is disabled. 0: a lockfile from a previous execution was replaced. 1: lockfile creation was clean', + 'Total number of WAL truncations attempted.', + 'Total number of scrapes that hit the sample limit and were rejected.', + 'Actual intervals between scrapes.', + 'How many times a scrape cache was flushed due to getting big while scrapes are failing.', + 'Total number of out of order samples ingestion failed attempts due to out of order being disabled.', + 'Max number of bytes to be retained in the tsdb blocks, configured 0 means disabled', + 'Total user and system CPU time spent in seconds.', + 'Number of heap bytes waiting to be used.', + 'The number of Consul RPC call failures.', + 'Total number of syncs that were executed on a scrape pool.', + 'The number of times release has been called for strings that are not interned.', + 'The number of DNS-SD lookup failures.', + 'Number of bytes used for garbage collection system metadata.', + 'Current number of service discovery configurations that failed to load.', + 'Information about the Go environment.', + 'The current number of queries being executed or waiting.', + 'Number of bytes in use by the stack allocator.', + 'The duration of a Consul RPC call in seconds.', + 'The number of times that blocks were deleted because the maximum number of bytes was exceeded.', + 'Actual interval to sync the scrape pool.', + 'The number of query log failures.', + 'Total number of times scrape pools hit the target limit, during sync or config reload.', + 'Whether Prometheus startup was fully completed and the server is ready for normal operation.', + 'Maximum timestamp of the head block.', + 'Number of goroutines that currently exist.', + 'The current number of remote read queries being executed or waiting.', + 'The duration of rule group evaluations.', + 'Set to 1 when a block is currently being written to the disk.', + 'Number of times the database failed to reloadBlocks block data from disk.', + 'Total number of out of order samples ingestion failed attempts with out of support enabled, but sample outside of time window.', + 'Total number of appended samples.', + 'Number of heap bytes released to OS.', + 'Total number of head truncations that failed.', + 'Total number of connections opened to the listener of a given name.', + 'Maximum amount of virtual memory available in bytes.', + 'The total number of template text expansion failures.', + 'The number of Kuma MADS fetch call failures.', + 'Total number of chunks created in the head', + 'Number of heap bytes when next garbage collection will take place.', + 'Histogram of response size for HTTP requests.', + 'Total number of requests for series that were not found.', + ], + }, + metadata: { + fields: [ + { + name: 'TABLE_CATALOG', + type: 'keyword', + }, + { + name: 'TABLE_SCHEMA', + type: 'keyword', + }, + { + name: 'TABLE_NAME', + type: 'keyword', + }, + { + name: 'TABLE_TYPE', + type: 'keyword', + }, + { + name: 'UNIT', + type: 'keyword', + }, + { + name: 'REMARKS', + type: 'keyword', + }, + ], + }, + size: 175, + status: 200, + jsonData: [ + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_lowest_timestamp_seconds', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Lowest timestamp value stored in the database.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_http_requests_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Counter of HTTP requests.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_reloads_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Number of times the database reloaded block data from disk.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_wal_page_flushes_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of page flushes.', + }, + ], +}; + +const otherMetrics = { + jsonData: [ + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_snapshot_replay_error_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number snapshot replays that failed.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'promhttp_metric_handler_requests_in_flight', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Current number of scrapes being served.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'process_virtual_memory_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Virtual memory size in bytes.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_mspan_sys_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of bytes used for mspan structures obtained from system.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_stack_sys_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of bytes obtained from system for stack allocator.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrapes_exceeded_body_size_limit_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of scrapes that hit the body size limit', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_wal_truncations_failed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of WAL truncations that failed.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_engine_query_log_enabled', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'State of the query log.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrape_pool_targets', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Current number of targets in this scrape pool.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_compactions_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of compactions that were executed for the partition.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_nomad_failures_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Number of nomad service discovery refresh failures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_exemplar_max_exemplars', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Total number of exemplars the exemplar storage can store, resizeable.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_exemplar_exemplars_in_storage', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of exemplars currently in circular storage.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_engine_query_duration_seconds', + TABLE_TYPE: 'summary', + UNIT: '', + REMARKS: 'Query timings', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_isolation_high_watermark', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'The highest TSDB append ID that has been given out.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_engine_queries_concurrent_max', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'The max number of concurrent queries.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_remote_storage_exemplars_in_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Exemplars in to remote storage, compare to exemplars out for queue managers.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_data_replay_duration_seconds', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Time taken to replay the data on disk.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_dns_lookups_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'The number of DNS-SD lookups.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_out_of_bound_samples_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: + 'Total number of out of bound samples ingestion failed attempts with out of order support disabled.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'net_conntrack_dialer_conn_closed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: + 'Total number of connections closed which originated from the dialer of a given name.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_frees_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of frees.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_exemplar_out_of_order_exemplars_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of out of order exemplar ingestion failed attempts.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_wal_writes_failed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of WAL writes that failed.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_metadata_cache_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: + 'The number of bytes that are currently used for storing metric metadata in the cache', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_buck_hash_sys_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of bytes used by the profiling bucket hash table.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_sync_failed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of target sync failures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_mallocs_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of mallocs.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_mmap_chunk_corruptions_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of memory-mapped chunk corruptions.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_web_federation_errors_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of errors that occurred while sending federation responses.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_discovered_targets', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Current number of discovered targets.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_file_read_errors_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'The number of File-SD read errors.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_kuma_fetch_duration_seconds', + TABLE_TYPE: 'summary', + UNIT: '', + REMARKS: 'The duration of a Kuma MADS fetch call.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_series_created_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of series created in the head', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_active_appenders', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of currently active appender transactions', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_symbol_table_size_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Size of symbol table in memory for loaded blocks', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_received_updates_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of update events received from the SD providers.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_isolation_low_watermark', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'The lowest TSDB append ID that is still referenced.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_compaction_chunk_samples', + TABLE_TYPE: 'histogram', + UNIT: '', + REMARKS: 'Final number of samples on their first compaction', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_truncations_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of head truncations attempted.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_http_request_duration_seconds', + TABLE_TYPE: 'histogram', + UNIT: '', + REMARKS: 'Histogram of latencies for HTTP requests.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_compactions_triggered_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of triggered compactions for the partition.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'net_conntrack_dialer_conn_established_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: + 'Total number of connections successfully established by the given dialer a given name.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'process_resident_memory_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Resident memory size in bytes.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_lowest_timestamp', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: + 'Lowest timestamp value stored in the database. The unit is decided by the library consumer.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_heap_sys_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of heap bytes obtained from system.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_checkpoint_creations_failed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of checkpoint creations that failed.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrapes_sample_duplicate_timestamp_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of samples rejected due to duplicate timestamps but different values.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_treecache_zookeeper_failures_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'The total number of ZooKeeper failures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_tombstone_cleanup_seconds', + TABLE_TYPE: 'histogram', + UNIT: '', + REMARKS: 'The time taken to recompact blocks to remove tombstones.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_compaction_chunk_size_bytes', + TABLE_TYPE: 'histogram', + UNIT: '', + REMARKS: 'Final size of chunks on their first compaction', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_gc_duration_seconds', + TABLE_TYPE: 'summary', + UNIT: '', + REMARKS: 'Runtime of garbage collection in the head block.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'process_open_fds', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of open file descriptors.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_metadata_cache_entries', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Total number of metric metadata entries in the cache', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_treecache_watcher_goroutines', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'The current number of watcher goroutines.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'process_max_fds', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Maximum number of open file descriptors.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_heap_objects', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of allocated objects.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_mcache_inuse_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of bytes in use by mcache structures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_other_sys_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of bytes used for other system allocations.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_linode_failures_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Number of Linode service discovery refresh failures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrape_pool_reloads_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of scrape pool reloads.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_threads', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of OS threads created.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_out_of_order_samples_appended_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of appended out of order samples.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_heap_inuse_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of heap bytes that are in use.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'net_conntrack_dialer_conn_failed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of connections failed to dial by the dialer a given name.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_mcache_sys_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of bytes used for mcache structures obtained from system.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_remote_storage_samples_in_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Samples in to remote storage, compare to samples out for queue managers.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_exemplar_last_exemplars_timestamp_seconds', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: + 'The timestamp of the oldest exemplar stored in circular storage. Useful to check for what timerange the current exemplar buffer limit allows. This usually means the last timestampfor all exemplars for a typical setup. This is not true though if one of the series timestamp is in future compared to rest series.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_config_last_reload_successful', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Whether the last configuration reload attempt was successful.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_min_time', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Minimum time bound of the head block. The unit is decided by the library consumer.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_alloc_bytes_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of bytes allocated, even if freed.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_exemplar_series_with_exemplars_in_storage', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of series with exemplars currently in circular storage.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_series', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Total number of series in the head block.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_gc_duration_seconds', + TABLE_TYPE: 'summary', + UNIT: '', + REMARKS: 'A summary of the pause duration of garbage collection cycles.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_kubernetes_events_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'The number of Kubernetes events handled.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrapes_sample_out_of_bounds_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: + 'Total number of samples rejected due to timestamp falling outside of the time bounds.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_storage_blocks_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'The number of bytes that are currently used for local storage by all blocks.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_build_info', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: + "A metric with a constant '1' value labeled by version, revision, branch, and goversion from which prometheus was built.", + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_updates_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of update events sent to the SD consumers.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_time_retentions_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: + 'The number of times that blocks were deleted because the maximum time limit was exceeded.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_compaction_chunk_range_seconds', + TABLE_TYPE: 'histogram', + UNIT: '', + REMARKS: 'Final time range of chunks on their first compaction', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_azure_failures_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Number of Azure service discovery refresh failures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_exemplar_exemplars_appended_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of appended exemplars.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_chunks', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Total number of chunks in the head block.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_max_time', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Maximum timestamp of the head block. The unit is decided by the library consumer.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_series_removed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of series removed in the head', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_wal_truncate_duration_seconds', + TABLE_TYPE: 'summary', + UNIT: '', + REMARKS: 'Duration of WAL truncation.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_wal_corruptions_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of WAL corruptions.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'net_conntrack_listener_conn_closed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of connections closed that were made to the listener of a given name.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_wal_fsync_duration_seconds', + TABLE_TYPE: 'summary', + UNIT: '', + REMARKS: 'Duration of WAL fsync.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_vertical_compactions_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of compactions done on overlapping blocks.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_wal_segment_current', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'WAL segment index that TSDB is currently writing to.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_http_failures_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Number of HTTP service discovery refresh failures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrapes_exemplar_out_of_order_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of exemplar rejected due to not being out of the expected order.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_checkpoint_creations_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of checkpoint creations attempted.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'net_conntrack_dialer_conn_attempted_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of connections attempted by the given dialer a given name.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrape_pool_reloads_failed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of failed scrape pool reloads.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_min_time_seconds', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Minimum time bound of the head block.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_notifications_alertmanagers_discovered', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'The number of alertmanagers discovered and active.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_blocks_loaded', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of currently loaded data blocks', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_last_gc_time_seconds', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of seconds since 1970 of last garbage collection.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_notifications_queue_capacity', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'The capacity of the alert notifications queue.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_notifications_dropped_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of alerts dropped due to errors when sending to Alertmanager.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_config_last_reload_success_timestamp_seconds', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Timestamp of the last successful configuration reload.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_remote_storage_highest_timestamp_in_seconds', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: + 'Highest timestamp that has come into the remote storage via the Appender interface, in seconds since epoch.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_rule_evaluation_duration_seconds', + TABLE_TYPE: 'summary', + UNIT: '', + REMARKS: 'The duration for a rule to execute.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_wal_completed_pages_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of completed pages.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_compaction_duration_seconds', + TABLE_TYPE: 'histogram', + UNIT: '', + REMARKS: 'Duration of compaction runs', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_web_federation_warnings_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of warnings that occurred while sending federation responses.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'process_start_time_seconds', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Start time of the process since unix epoch in seconds.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'promhttp_metric_handler_requests_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of scrapes by HTTP status code.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_heap_alloc_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of heap bytes allocated and still in use.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_notifications_queue_length', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'The number of alert notifications in the queue.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_mspan_inuse_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of bytes in use by mspan structures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_lookups_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of pointer lookups.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_checkpoint_deletions_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of checkpoint deletions attempted.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_alloc_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of bytes allocated and still in use.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_template_text_expansions_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'The total number of template text expansions.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_sys_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of bytes obtained from system.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrapes_sample_out_of_order_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of samples rejected due to not being out of the expected order.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrape_pools_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of scrape pool creation attempts.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_chunks_removed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of chunks removed in the head', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_compactions_skipped_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of skipped compactions due to disabled auto compaction.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrape_pool_exceeded_label_limits_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: + 'Total number of times scrape pools hit the label limits, during sync or config reload.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_checkpoint_deletions_failed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of checkpoint deletions that failed.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_compactions_failed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of compactions that failed for the partition.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_kuma_fetch_skipped_updates_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'The number of Kuma MADS fetch calls that result in no updates to the targets.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrape_pools_failed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of scrape pool creations that failed.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_file_scan_duration_seconds', + TABLE_TYPE: 'summary', + UNIT: '', + REMARKS: 'The duration of the File-SD scan in seconds.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_clean_start', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: + '-1: lockfile is disabled. 0: a lockfile from a previous execution was replaced. 1: lockfile creation was clean', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_wal_truncations_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of WAL truncations attempted.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrapes_exceeded_sample_limit_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of scrapes that hit the sample limit and were rejected.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_interval_length_seconds', + TABLE_TYPE: 'summary', + UNIT: '', + REMARKS: 'Actual intervals between scrapes.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrapes_cache_flush_forced_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: + 'How many times a scrape cache was flushed due to getting big while scrapes are failing.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_out_of_order_samples_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: + 'Total number of out of order samples ingestion failed attempts due to out of order being disabled.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_retention_limit_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Max number of bytes to be retained in the tsdb blocks, configured 0 means disabled', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'process_cpu_seconds_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total user and system CPU time spent in seconds.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_heap_idle_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of heap bytes waiting to be used.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_consul_rpc_failures_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'The number of Consul RPC call failures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrape_pool_sync_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of syncs that were executed on a scrape pool.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_remote_storage_string_interner_zero_reference_releases_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'The number of times release has been called for strings that are not interned.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_dns_lookup_failures_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'The number of DNS-SD lookup failures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_gc_sys_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of bytes used for garbage collection system metadata.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_failed_configs', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Current number of service discovery configurations that failed to load.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_info', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Information about the Go environment.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_engine_queries', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'The current number of queries being executed or waiting.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_stack_inuse_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of bytes in use by the stack allocator.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_consul_rpc_duration_seconds', + TABLE_TYPE: 'summary', + UNIT: '', + REMARKS: 'The duration of a Consul RPC call in seconds.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_size_retentions_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: + 'The number of times that blocks were deleted because the maximum number of bytes was exceeded.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_sync_length_seconds', + TABLE_TYPE: 'summary', + UNIT: '', + REMARKS: 'Actual interval to sync the scrape pool.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_engine_query_log_failures_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'The number of query log failures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_target_scrape_pool_exceeded_target_limit_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: + 'Total number of times scrape pools hit the target limit, during sync or config reload.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_ready', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: + 'Whether Prometheus startup was fully completed and the server is ready for normal operation.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_max_time_seconds', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Maximum timestamp of the head block.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_goroutines', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of goroutines that currently exist.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_api_remote_read_queries', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'The current number of remote read queries being executed or waiting.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_rule_group_duration_seconds', + TABLE_TYPE: 'summary', + UNIT: '', + REMARKS: 'The duration of rule group evaluations.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_compaction_populating_block', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Set to 1 when a block is currently being written to the disk.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_reloads_failures_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Number of times the database failed to reloadBlocks block data from disk.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_too_old_samples_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: + 'Total number of out of order samples ingestion failed attempts with out of support enabled, but sample outside of time window.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_samples_appended_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of appended samples.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_heap_released_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of heap bytes released to OS.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_truncations_failed_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of head truncations that failed.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'net_conntrack_listener_conn_accepted_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of connections opened to the listener of a given name.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'process_virtual_memory_max_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Maximum amount of virtual memory available in bytes.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_template_text_expansion_failures_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'The total number of template text expansion failures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_sd_kuma_fetch_failures_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'The number of Kuma MADS fetch call failures.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_chunks_created_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of chunks created in the head', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'go_memstats_next_gc_bytes', + TABLE_TYPE: 'gauge', + UNIT: '', + REMARKS: 'Number of heap bytes when next garbage collection will take place.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_http_response_size_bytes', + TABLE_TYPE: 'histogram', + UNIT: '', + REMARKS: 'Histogram of response size for HTTP requests.', + }, + { + TABLE_CATALOG: 'prometheus_1', + TABLE_SCHEMA: 'default', + TABLE_NAME: 'prometheus_tsdb_head_series_not_found_total', + TABLE_TYPE: 'counter', + UNIT: '', + REMARKS: 'Total number of requests for series that were not found.', + }, ], - 'total': 199, - 'size': 199 -} \ No newline at end of file +}; \ No newline at end of file diff --git a/dashboards-observability/public/components/metrics/sidebar/sidebar.tsx b/dashboards-observability/public/components/metrics/sidebar/sidebar.tsx index 8eebfa11f..478d99d88 100644 --- a/dashboards-observability/public/components/metrics/sidebar/sidebar.tsx +++ b/dashboards-observability/public/components/metrics/sidebar/sidebar.tsx @@ -5,73 +5,43 @@ import './sidebar.scss'; -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { cloneDeep } from 'lodash'; import { EuiTitle, EuiSpacer, EuiAccordion, EuiLink } from '@elastic/eui'; import { I18nProvider } from '@osd/i18n/react'; -import { batch, useDispatch } from 'react-redux'; -import { AVAILABLE_METRICS, SELECTED_METRICS } from '../../../../common/constants/metrics'; -import { updateMetrics, sortMetrics, selectMetrics } from '../redux/slices/metrics_slice'; +import { batch, useDispatch, useSelector } from 'react-redux'; +import { + availableMetricsSelector, + deSelectMetric, + selectMetric, + loadMetrics, + selectedMetricsSelector, +} from '../redux/slices/metrics_slice'; +import { CoreStart } from '../../../../../../src/core/public'; +import PPLService from '../../../services/requests/ppl'; interface ISidebarProps { - metricsList: any; - visualizationsList: any; + http: CoreStart['http']; + pplService: PPLService; } export const Sidebar = (props: ISidebarProps) => { + const { http, pplService } = props; const dispatch = useDispatch(); - // Initializing sidebar with dummy data - const { metricsList, visualizationsList } = props; - const metricNames = metricsList.metrics; - const [showFields, setShowFields] = useState(false); - const [searchTerm, setSearchTerm] = useState(''); + const availableMetrics = useSelector(availableMetricsSelector); + const selectedMetrics = useSelector(selectedMetricsSelector); - /** - * Toggle metric names between selected and available sets - * @param metric metric to be toggled - * @param MetricSetToRemove set where this metric needs to be removed from - * @param MetricSetToAdd set where this metric needs to be added to - */ - const toggleMetrics = ( - metric: any, - visualization: boolean, - MetricSetToRemove: string, - MetricSetToAdd: string - ) => { - const nextMetrics = cloneDeep(metricsList); - const thisMetricSet = nextMetrics.metrics[MetricSetToRemove]; - // Dummy data for now, will globalize the filter later - // If statements are to separate visualizations and dummy data from prometheus - let nextMetricSet; - if (visualization) { - nextMetricSet = thisMetricSet.filter((row: any) => row.name !== metric.name); - } else { - nextMetricSet = thisMetricSet.filter((row: any) => row[2] !== metric[2]); - } - nextMetrics.metrics[MetricSetToRemove] = nextMetricSet; - if (!visualization || MetricSetToRemove !== SELECTED_METRICS) { - nextMetrics.metrics[MetricSetToAdd].push(metric); - } + useEffect(() => { batch(() => { - dispatch( - updateMetrics({ - data: { ...nextMetrics.metrics }, - }) - ); - dispatch( - sortMetrics({ - data: [MetricSetToAdd], - }) - ); + dispatch(loadMetrics({ http, pplService })); }); - }; + }, []); - const handleAddMetric = (metric: any, visualization: boolean) => - toggleMetrics(metric, visualization, AVAILABLE_METRICS, SELECTED_METRICS); + const handleAddMetric = (metric: any) => dispatch(selectMetric(metric)); - const handleRemoveMetric = (metric: any, visualization: boolean) => { - toggleMetrics(metric, visualization, SELECTED_METRICS, AVAILABLE_METRICS); + const handleRemoveMetric = (metric: any) => { + dispatch(deSelectMetric(metric)); }; return ( @@ -99,29 +69,11 @@ export const Sidebar = (props: ISidebarProps) => { paddingSize="xs" >
    - {metricNames[SELECTED_METRICS].map((metric: any) => { - let name; - if (metric.name) { - name = metric.name; - } else { - name = metric[2]; - } - return ( -
  • - { - if (metric.name) { - handleRemoveMetric(metric, true); - } else { - handleRemoveMetric(metric, false); - } - }} - > - {name} - -
  • - ); - })} + {selectedMetrics.map((metric: any) => ( +
  • + handleRemoveMetric(metric)}>{metric.name} +
  • + ))}
@@ -136,32 +88,11 @@ export const Sidebar = (props: ISidebarProps) => { paddingSize="xs" >
    - {visualizationsList.map((visualization: any) => { - return ( -
  • - { - handleAddMetric(visualization, true); - }} - > - {visualization.name} - -
  • - ); - })} - {metricNames[AVAILABLE_METRICS].map((metric: any) => { - return ( -
  • - { - handleAddMetric(metric, false); - }} - > - {metric[2]} - -
  • - ); - })} + {availableMetrics.map((metric: any) => ( +
  • + handleAddMetric(metric)}>{metric.name} +
  • + ))}
diff --git a/dashboards-observability/public/framework/redux/store/index.ts b/dashboards-observability/public/framework/redux/store/index.ts index 7efcf287d..3a18cc7a5 100644 --- a/dashboards-observability/public/framework/redux/store/index.ts +++ b/dashboards-observability/public/framework/redux/store/index.ts @@ -8,7 +8,7 @@ import rootReducer from '../reducers'; const store = configureStore({ reducer: rootReducer, - middleware: (getDefaultMiddleware) => getDefaultMiddleware(), + middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false }), devTools: process.env.NODE_ENV !== 'production', enhancers: [], });