From 8d10bd0fbaee4e69b9124ad0d7bd68b120a8e62d Mon Sep 17 00:00:00 2001 From: arzoo14 Date: Tue, 20 Oct 2020 12:50:15 +0530 Subject: [PATCH 1/3] REST API added --- .../{AboutThisGuide.rst => AboutPGGuide.rst} | 4 +- .../{AboutThisGuide.rst => AboutUAGGuide.rst} | 4 +- docs/conf.py | 28 +- docs/index.rst | 11 +- docs/specs/index.html | 24 + docs/specs/openapi.yaml | 948 ++++++++++++++++++ requirements.txt | 2 + 7 files changed, 1013 insertions(+), 8 deletions(-) rename docs/PG/{AboutThisGuide.rst => AboutPGGuide.rst} (95%) rename docs/UAG/{AboutThisGuide.rst => AboutUAGGuide.rst} (97%) create mode 100644 docs/specs/index.html create mode 100644 docs/specs/openapi.yaml create mode 100644 requirements.txt diff --git a/docs/PG/AboutThisGuide.rst b/docs/PG/AboutPGGuide.rst similarity index 95% rename from docs/PG/AboutThisGuide.rst rename to docs/PG/AboutPGGuide.rst index 191f175a33..91ae4bfc7d 100644 --- a/docs/PG/AboutThisGuide.rst +++ b/docs/PG/AboutPGGuide.rst @@ -1,4 +1,4 @@ -.. _AboutThisGuide: +.. _AboutPGGuide: About Programmer's Guide ######################### @@ -106,7 +106,7 @@ The following conventions are used throughout this document: * - ALL CAPS - All capital letters denote environment variables, operator names, directives, defined constants, and macros in C programs. * - () - - Parentheses that follow function names surround function arguments or are empty if the function has no arguments; parentheses that follow commands surround man page section numbers. | + - Parentheses that follow function names surround function arguments or are empty if the function has no arguments; parentheses that follow commands surround man page section numbers. Reader Comments diff --git a/docs/UAG/AboutThisGuide.rst b/docs/UAG/AboutUAGGuide.rst similarity index 97% rename from docs/UAG/AboutThisGuide.rst rename to docs/UAG/AboutUAGGuide.rst index d6c2a62453..e175ce67f8 100644 --- a/docs/UAG/AboutThisGuide.rst +++ b/docs/UAG/AboutUAGGuide.rst @@ -1,4 +1,4 @@ -.. _AboutThisGuide: +.. _AboutUAGGuide: About User's and Administrator's Guide ####################################### @@ -110,7 +110,7 @@ The following conventions are used throughout this document: * - ALL CAPS - All capital letters denote environment variables, operator names, directives, defined constants, and macros in C programs. * - () - - Parentheses that follow function names surround function arguments or are empty if the function has no arguments; parentheses that follow commands surround man page section numbers. | + - Parentheses that follow function names surround function arguments or are empty if the function has no arguments; parentheses that follow commands surround man page section numbers. Reader Comments diff --git a/docs/conf.py b/docs/conf.py index 0e05473fbf..3a7501ac4a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,6 +16,8 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) +import os +import pkg_resources # -- Project information ----------------------------------------------------- @@ -38,7 +40,7 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [ 'sphinx.ext.autosectionlabel' +extensions = [ 'sphinx.ext.autosectionlabel','sphinxcontrib.redoc', 'sphinxcontrib.openapi' ] # Add any paths that contain templates here, relative to this directory. @@ -76,6 +78,26 @@ # html_theme = 'sphinx_rtd_theme' +redoc = [ + { + 'name': 'PMWEBAPI', + 'page': 'api/index', + 'spec': 'specs/openapi.yaml', + 'opts': { + 'lazy-rendering': True, + + }, + }, +] + +redoc_uri = 'https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js' + +if not os.environ.get('READTHEDOCS') == 'True': + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + + # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. @@ -171,3 +193,7 @@ # A list of files that should not be packed into the epub file. epub_exclude_files = ['search.html'] + +from docutils.parsers.rst import directives +from sphinx.directives.code import CodeBlock +directives.register_directive('code', CodeBlock) diff --git a/docs/index.rst b/docs/index.rst index f4843fb4f3..448d7731eb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,12 +12,18 @@ abstraction for all of the performance data in a system, and many tools for inte PCP is a feature-rich, mature, extensible, cross-platform toolkit supporting both live and retrospective analysis. The distributed PCP architecture makes it especially useful for those seeking centralized monitoring of distributed processing. +**Table of Contents** + +* :doc:`UAG/AboutUAGGuide` +* :doc:`PG/AboutPGGuide` +* `REST API - PMWEBAPI `__ + .. toctree:: :caption: Guides :hidden: - UAG/AboutThisGuide - PG/AboutThisGuide + UAG/AboutUAGGuide + PG/AboutPGGuide .. toctree:: @@ -45,4 +51,3 @@ makes it especially useful for those seeking centralized monitoring of distribut PG/PMAPI PG/InstrumentingApplications - diff --git a/docs/specs/index.html b/docs/specs/index.html new file mode 100644 index 0000000000..9313b6b655 --- /dev/null +++ b/docs/specs/index.html @@ -0,0 +1,24 @@ + + + + ReDoc + + + + + + + + + + + + + diff --git a/docs/specs/openapi.yaml b/docs/specs/openapi.yaml new file mode 100644 index 0000000000..02968370a8 --- /dev/null +++ b/docs/specs/openapi.yaml @@ -0,0 +1,948 @@ +openapi: 3.0.1 +info: + title: PMWEBAPI + description: | + ## ABOUT PMWEBAPI + ### PMWEBAPI + Introduction to the Performance Metrics Web Application Programming Interface + + ### HTTP SYNOPSIS + * **GET /metrics** + + * **GET /series/...** + + * **GET /search/...** + + * **GET /pmapi/...** + + ### C SYNOPSIS +     **\#include <[pcp/pmwebapi.h](https://github.com/performancecopilot/pcp/blob/master/src/include/pcp/pmwebapi.h)>** + +     ... assorted routines ... + +     cc ... -lpcp_web -lpcp + + ### DESCRIPTION + The PMWEBAPI is a collection of interfaces providing Performance Co-Pilot services for web applications. It consists of APIs for web applications querying and analysing both live and historical performance data, as well as APIs used by web servers. + + The usual HTTP URL-encoded optional parameter rules apply and PMWEBAPI REST requests always follow the convention: + ``` + /api/endpoint ? parameter1 = value1 & parameter2 = value2 + ``` + + Examples in all following sections use the [curl](https://man7.org/linux/man-pages/man1/curl.1.html)(1) command line utility with a local [pmproxy](https://pcp.io/man/man1/pmproxy.1.html)(1) server listening on port 44322 (default port). The [pmjson](https://pcp.io/man/man1/pmjson.1.html)(1) utility is used to neatly format any JSON output, as opposed to the compact (minimal whitespace) form provided by default. The examples in the scalable time series section use historical data recorded by the [pmlogger](https://pcp.io/man/man1/pmlogger.1.html)(1) service, in conjunction with a local [redis-server](https://man7.org/linux/man-pages/man1/redis-server.1.html)(1). + version: "" +servers: +- url: http://localhost:44322/ +tags: +- name: OPEN METRICS + description: | + Exporting of live performance metrics in an Open Metrics compatible format (as described at https://openmetrics.io and popularized by the https://prometheus.io project) is available. +- name: SCALABLE TIME SERIES + description: | + The fast, scalable time series query capabilities provided by the [pmseries](https://pcp.io/man/man1/pmseries.1.html)(1) command are also available through a REST API. These queries provide access to performance data (metric metadata and values) from multiple hosts simultaneously, and in a fashion suited to efficient retrieval by any number of web applications. + + All requests in this group can be accompanied by an optional *client* parameter. The value passed in the request will be sent back in the response - all responses will be in JSON object form in this case, with top level "client" and "result" fields. +- name: FULL TEXT SEARCH + description: | + The full text search capabilities provided by the [pmsearch](https://pcp.io/man/man1/pmsearch.1.html)(1) command are also available through a REST API. These queries provide access to an index over performance metric names, instances, instance domains and help text, suitable for a metric search engine, and in a fashion suited to efficient querying by any number of web applications. + + In order to use this functionality, the optional *RediSearch* module must be loaded in the **redis-server** at the time **pmproxy** is started, such that metrics, instances and help text it discovers can be automatically indexed. +- name: PMAPI HOST SERVICES + description: | + The live performance collection facilities available from [pmcd](https://pcp.io/man/man1/pmcd.1.html)(1) can also be accessed through a REST API. + + All requests are performed on the web server host by default, unless either a *hostspec* or *context* parameter is provided. *hostname* can be used in place of *hostspec*. + + Context identifiers are used as a persistent way to refer to PMAPI contexts across related web requests. These contexts expire after a configurable period of disuse, and are either explicitly allocated using the */pmapi/context* interface, or implicitly allocated using other interfaces. + + The timeout interval is configurable at context creation time, and as such the *polltime* parameter can be used anywhere the *hostspec* is specified. It sets the context timeout in terms of length of inactive time. The unit for the timeout value is seconds and the default is 5. + + To specify a specific existing context in any PMAPI web request, the endpoints can be accessed with either the *context* parameter or enbedded in the endpoint URL itself, such as **/pmapi/[number]/fetch**. +paths: + /metrics: + get: + tags: + - OPEN METRICS + summary: Fetches current values and metadata + description: " `Get metrics` fetches current values and metadata for all metrics, or only metrics\ + \ indicated by a comma-separated list of names. For all numeric metrics with the given NAME prefixes, create an\ + \ Open Metrics (Prometheus) text export format giving their current value\ + \ and related metadata.\n\nThe response has plain text type rather than JSON\ + \ commonly used elsewhere in the REST API. This format can be injested by\ + \ many open source monitoring tools, including Prometheus and [pmdaopenmetrics](https://pcp.io/man/man1/pmdaopenmetrics.1.html)(1).\n\ + \nThe native PCP metric metadata (metric name, type, indom, semantics and\ + \ units) is first output for each metric with **# PCP** prefix. The metadata\ + \ reported is of the form described on [pmTypeStr](https://pcp.io/man/man3/pmtypestr.3.html)(3),\ + \ [pmInDomStr](https://pcp.io/man/man3/pmindomstr.3.html)(3), [pmSemStr](https://pcp.io/man/man3/pmsemstr.3.html)(3)\ + \ and [pmUnitsStr](https://pcp.io/man/man3/pmunitsstr.3.html)(3) respectively.\ + \ If the [pmUnitsStr](https://pcp.io/man/man3/pmunitsstr.3.html)(3) units\ + \ string is empty, then **none** is output. The units metadata string may\ + \ contain spaces and extends to the end of the line.\n\nPCP metric names are\ + \ mapped so that the **.** separators are exchanged with **\\_** (':' in back-compatibility\ + \ mode, where \"# PCP\" is the identifying line suffix). Both metric labels\ + \ and instances are represented as Prometheus labels, with external instance\ + \ names being quoted and the flattened PCP metric hierarchy being presented\ + \ with each value.\n```\n$ curl -s http://localhost:44322/metrics?names=proc.nprocs,kernel.pernode.cpu.intr,filesys.blocksize\n\ + \n# PCP5 proc.nprocs 3.8.99 u32 PM_INDOM_NULL instant none \n# HELP proc_nprocs\ + \ instantaneous number of processes\n# TYPE proc_nprocs gauge\nproc_nprocs\ + \ {hostname=\"app1\"} 7\n\n# PCP5 kernel.pernode.cpu.intr 60.0.66 u64 60.19\ + \ counter millisec\n# HELP kernel_pernode_cpu_intr total interrupt CPU [...]\n\ + # TYPE kernel_pernode_cpu_intr counter\nkernel_pernode_cpu_intr{hostname=\"\ + app1\",instname=\"node0\"} 25603\n\n# PCP5 filesys.blocksize 60.5.9 u32 60.5\ + \ instant byte\n# HELP filesys_blocksize Size of each block on mounted file[...]\n\ + # TYPE filesys_blocksize gauge\nfilesys_blocksize{hostname=\"app1\",instname=\"\ + /dev/sda1\"} 4096\nfilesys_blocksize{hostname=\"app1\",instname=\"/dev/sda2\"\ + } 4096\n\n```\n" + parameters: + - name: names + in: query + description: Comma-separated list of metric names + schema: + type: string + - name: times + in: query + description: Append sample times (milliseconds since epoch) + schema: + type: boolean + /series/query: + get: + tags: + - SCALABLE TIME SERIES + summary: Performs a time series query + description: | + The query is in the format described in [pmseries](https://pcp.io/man/man1/pmseries.1.html)(1) and is passed to the server via either the *expr* parameter (HTTP GET) or via the message body (HTTP POST). + + When querying for time series matches only, no time window options are specified and matching series identifiers are returned in a JSON array. + ``` + $ curl -s http://localhost:44322/series/query?expr=disk.dev.read* | pmjson + ``` + When querying for time series values as well, a time window must be specified as part of the query string. The simplest form is to just request the most recent sample. + ``` + $ curl -s http://localhost:44322/series/query?expr=disk.dev.read*[samples:1] | pmjson + ``` + **References:** [pmSeriesQuery](https://man7.org/linux/man-pages/man3/pmSeriesQuery.3.html)(3) + operationId: get/series/query + parameters: + - name: expr + in: query + description: Query string in pmseries (1) format + schema: + type: string + - name: client + in: query + description: Request identifier sent back with response + schema: + type: string + responses: + 200: + description: successful operation + content: + pmjson: + schema: + anyOf: + - $ref: '#/components/schemas/response1' + - $ref: '#/components/schemas/response2' + + + /series/values: + get: + tags: + - SCALABLE TIME SERIES + summary: Performs values retrievals for one or more time series identifiers + description: | + The JSON response contains the same information as the **pmseries - q /-- query** option using any of the time window parameters described on [pmseries](https://pcp.io/man/man1/pmseries.1.html)(1). If no time window parameters are specified, the single most recent value observed is retrieved. + ``` + $ curl -s http://localhost:44322/series/values?series=605fc77742cd0317597291329561ac4e50c0dd12 | pmjson + ``` + **References:** [pmSeriesValues](https://man7.org/linux/man-pages/man3/pmSeriesValues.3.html)(3) + + operationId: get/series/values + parameters: + - name: series + in: query + description: Comma-separated list of series identifiers + schema: + type: string + - name: client + in: query + description: Request identifier sent back with response + schema: + type: string + - name: samples + in: query + description: Count of samples to return + schema: + type: number + - name: interval + in: query + description: Time between successive samples + schema: + type: string + - name: start + in: query + description: Sample window start time + schema: + type: string + - name: finish + in: query + description: Sample window end time + schema: + type: string + - name: offset + in: query + description: Sample window offset + schema: + type: string + - name: align + in: query + description: Sample time alignment + schema: + type: string + - name: zone + in: query + description: Time window timezone + schema: + type: string + responses: + 200: + description: successful operation + content: + pmjson: + schema: + type: array + example: + - series: 605fc77742cd0317597291329561ac4e50c0dd12 + timestamp: 1.3176330229599592E12 + value: "71660" + items: + type: object + properties: + series: + type: string + timestamp: + type: integer + value: + type: string + /series/descs: + get: + tags: + - SCALABLE TIME SERIES + summary: Performs a descriptor lookup for one or more time series identifiers + description: | + The JSON response contains the same information as the **pmseries - d /-- desc** option. + ``` + $ curl -s http://localhost:44322/series/descs?series=605fc77742cd0317597291329561ac4e50c0dd12 | pmjson + ``` + **References:** [pmSeriesDescs](https://man7.org/linux/man-pages/man3/pmSeriesDescs.3.html)(3) + operationId: get/series/descs + parameters: + - name: series + in: query + description: Comma-separated list of series identifiers + schema: + type: string + - name: client + in: query + description: Request identifier sent back with response + schema: + type: string + responses: + 200: + description: successful operation + content: + pmjson: + schema: + type: object + properties: + series: + type: string + source: + type: integer + pmid: + type: string + indom: + type: string + semantics: + type: integer + type: + type: string + units: + type: string + example: + - series: 605fc77742cd0317597291329561ac4e50c0dd12 + source: f5ca7481da8c038325d15612bb1c6473ce1ef16f + pmid: 60.0.4 + indom: 60.1 + semantics: counter + type: u32 + units: count + /series/labels: + get: + tags: + - SCALABLE TIME SERIES + summary: Performs a label set lookup + description: | + This command operates in one of three modes. + + It can perform a label set lookup for one or more time series identifiers, when given the series parameter. The JSON response for this mode contains the same information as the **pmseries - I /-- labels** option. + ``` + $ curl -s http://localhost:44322/series/labels?series=605fc77742cd0317597291329561ac4e50c0dd12 | pmjson + ``` + It can produce a list of all known label names, in the absense of name , names or series parameters. The JSON responses for this mode contains the same information as the **pmseries - l /-- labels** option. + ``` + $ curl -s http://localhost:44322/series/labels | pmjson + ``` + It can produce a list of all known label values for a given label name or names . The JSON response for this mode contains the same information as the **pmseries - v /-- values** option. + ``` + $ curl -s http://localhost:44322/series/labels?names=hostname,domainname | pmjson + ``` + **References:** [pmSeriesLabels](https://man7.org/linux/man-pages/man3/pmSeriesLabels.3.html)(3), [pmSeriesLabelValues](https://man7.org/linux/man-pages/man3/pmSeriesLabelValues.3.html)(3) + operationId: get/series/labels + parameters: + - name: series + in: query + description: Comma-separated list of series identifiers + schema: + type: string + - name: match + in: query + description: Glob pattern string to match on all labels + schema: + type: string + - name: name + in: query + description: Find all known label values for given name + schema: + type: string + - name: names + in: query + description: Comma-separated list of label names + schema: + type: string + - name: client + in: query + description: Request identifier sent back with response + schema: + type: string + responses: + 200: + description: successful operation + content: + pmjson: + schema: + anyOf: + - $ref: '#/components/schemas/response3' + - $ref: '#/components/schemas/response4' + - $ref: '#/components/schemas/response5' + + /series/metrics: + get: + tags: + - SCALABLE TIME SERIES + summary: Performs a metric name lookup for one or more time series identifiers + description: | + The JSON response contains the same information as the **pmseries - m /-- metrics** option. + ``` + $ curl -s http://localhost:44322/series/metrics?series=605fc77742cd0317597291329561ac4e50c0dd12 | pmjson + ``` + Alternatively, with no *series* argument, this request will return the list of all known metric names. + ``` + $ curl -s http://localhost:44322/series/metrics | pmjson + ``` + **References:** [pmSeriesMetrics](https://man7.org/linux/man-pages/man3/pmSeriesMetrics.3.html)(3) + operationId: get/series/metrics + parameters: + - name: series + in: query + description: Comma-separated list of series identifiers + schema: + type: string + - name: match + in: query + description: Glob pattern string to match on all names + schema: + type: string + - name: client + in: query + description: Request identifier sent back with response + schema: + type: string + responses: + 200: + description: successful operation + content: + pmjson: + schema: + anyOf: + - $ref: '#/components/schemas/response6' + - $ref: '#/components/schemas/response7' + + /series/sources: + get: + tags: + - SCALABLE TIME SERIES + summary: Performs a lookup for one or more time series sources + description: | + It returns an array of all PMAPI context names used to access the time series from that + source.The JSON response contains the same information as the **pmseries - S /-- source** option. + ``` + $ curl -s http://localhost:44322/series/sources?source=2cd6a38f9339f2dd1f0b4775bda89a9e7244def6 | pmjson + ``` + **References:** [pmSeriesSources](https://man7.org/linux/man-pages/man3/pmSeriesSources.3.html)(3) + operationId: get/series/sources + parameters: + - name: series + in: query + description: Comma-separated list of series identifiers + schema: + type: string + - name: match + in: query + description: Glob pattern string to match on all names + schema: + type: string + - name: client + in: query + description: Request identifier sent back with response + schema: + type: string + responses: + 200: + description: successful operation + content: + pmjson: + schema: + type: array + example: + - source: 2cd6a38f9339f2dd1f0b4775bda89a9e7244def6 + context: + - /var/log/pcp/pmlogger/acme + - www.acme.com + items: + type: object + properties: + source: + type: string + context: + type: array + items: + type: string + /series/instances: + get: + tags: + - SCALABLE TIME SERIES + summary: Provides instance identifiers and names for one or more time series + identifiers + description: | + The JSON response contains the same information as the **pmseries - i /-- instance** option. + ``` + $ curl -s http://localhost:44322/series/instances?series=605fc77742cd0317597291329561ac4e50c0dd12 | pmjson + ``` + Alternatively, with no *series* argument, this request will return the list of all known instance names. + ``` + $ curl -s http://localhost:44322/series/instances | pmjson + ``` + **References:** [pmSeriesInstances](https://man7.org/linux/man-pages/man3/pmSeriesInstances.3.html)(3) + operationId: get/series/instances + parameters: + - name: series + in: query + description: Comma-separated list of series identifiers + schema: + type: string + - name: match + in: query + description: Glob pattern string to match on all names + schema: + type: string + - name: client + in: query + description: Request identifier sent back with response + schema: + type: string + responses: + 200: + description: successful operation + content: + pmjson: + schema: + anyOf: + - $ref: '#/components/schemas/response8' + - $ref: '#/components/schemas/response9' + + /series/load: + get: + tags: + - SCALABLE TIME SERIES + summary: Load time series performance data + description: | + It loads time series performance data from the specified source into the + **redis-server** cache. This request is equivalent to the **pmseries - l /-- load** option. + ``` + $ curl -s http://localhost:44322/series/load&expr={source.name:"/var/log/pcp/pmlogger/acme"} + ``` + **References:** [pmSeriesLoad](https://man7.org/linux/man-pages/man3/pmSeriesLoad.3.html)(3) + operationId: get/series/load + parameters: + - name: expr + in: query + description: Source load string in pmseries (1) format + schema: + type: string + - name: client + in: query + description: Request identifier sent back with response + schema: + type: string + responses: + 200: + description: successful operation + content: + pmjson: + schema: + type: object + properties: + success: + type: boolean + example: + success: true + + /search/text: + get: + tags: + - FULL TEXT SEARCH + summary: Performs a text search query + description: | + It performs a text search query across metrics and instance domains - all forms of names and help texts. + + The mandatory search string is further described in [pmsearch](https://pcp.io/man/man1/pmsearch.1.html)(1) and is passed to the server via the *query* parameter (HTTP GET). + ``` + $ curl -s http://localhost:44322/search/text?query=halt | pmjson + ``` + The available search entity *types* are *metric*, *indom* and *instance*. Query parameters *highlight* and *field* take *name*, *oneline* and *helptext*. + + Query parameter *return* takes *name*, *type*, *oneline*, *helptext*, *indom*. There is typically both a name and help text associated with metrics. Contents of these are then matched + against *query*. An instance domain has help text and a numeric identifier, while instances have a name only (which can be searched). + + **Reference:** [pmSearchTextQuery](https://man7.org/linux/man-pages/man3/pmSearchTextQuery.3.html)(3) + operationID: get/search/text + parameters: + - name: query + in: query + description: Query string in pmsearch (1) format + schema: + type: string + - name: highlight + in: query + description: Include matching markup in response fields + schema: + type: fields + - name: offset + in: query + description: Result offset cursor for pagination + schema: + type: number + - name: limit + in: query + description: Maximum results to include in response + schema: + type: number + - name: field + in: query + description: Queried fields (defaults to all) + schema: + type: fields + - name: return + in: query + description: Fields to actually return (defaults to all) + schema: + type: fields + - name: type + in: query + description: Entity types to filter (defaults to all) + schema: + type: types + responses: + 200: + description: successful operation + content: + pmjson: + schema: + type: object + properties: + total: + type: number + offset: + type: number + limit: + type: number + elapsed: + type: number + results: + type: array + items: + type: object + properties: + name: + type: string + type: + type: string + indom: + type: string + oneline: + type: string + helptext: + type: string + + example: + total : 2 + offset: 0 + limit: 10 + elapsed: 0.000504 + results: + - name: kvm.halt_exits + type: metric + indom: 95.0.4 + oneline: Number of guest exits due to halt calls. + helptext: This type of exit is usually seen when a guest is idle. + - name: kvm.halt_wakeup + type: metric + indom: 95.0.6 + oneline: Number of wakeups from a halt. + + /search/suggest: + get: + tags: + - FULL TEXT SEARCH + summary: Provides search query suggestions, that is, metric and instance names + description: | + The mandatory search string is further described in [pmsearch](https://pcp.io/man/man1/pmsearch.1.html)(1) and is passed to the server via the *query* parameter (HTTP GET). + ``` + $ curl -s http://localhost:44322/search/suggest?query=disk&limit=4 | pmjson + ``` + **Reference:** [pmSearchTextSuggest](https://man7.org/linux/man-pages/man3/pmSearchTextSuggest.3.html)(3) + operationID: get/search/suggest + parameters: + - name: query + in: query + description: Search query for search engine + schema: + type: string + - name: limit + in: query + description: Max results to include in response + schema: + type: number + responses: + 200: + description: successful operation + content: + pmjson: + schema: + type: array + items: + type: string + example: + - disk.all.avactive + - disk.all.aveq + - disk.all.blkread + - disk.all.blktotal + + /search/indom: + get: + tags: + - FULL TEXT SEARCH + summary: Provides all entities related to indom + description: | + It provides all entities (instances, metrics) related to indom, including itself, that is passed to the server via the *query* parameter. + + **Reference:** [pmSearchTextInDom](https://man7.org/linux/man-pages/man3/pmSearchTextInDom.3.html)(3) + operationID: get/search/indom + parameters: + - name: query + in: query + description: Search indom for search engine + schema: + type: string + - name: offset + in: query + description: Result offset cursor for pagination + schema: + type: number + - name: limit + in: query + description: M results to include in response + schema: + type: number + + /search/info: + get: + tags: + - FULL TEXT SEARCH + summary: Provides metrics relating to operation + description: | + It provides metrics relating to operation of the search engine, in particular showing document and text record counts. + ``` + $ curl -s http://localhost:44322/search/info | pmjson + ``` + **Reference:** [pmSearchInfo](https://man7.org/linux/man-pages/man3/pmSearchInfo.3.html)(3) + operationID: get/search/info + responses: + 200: + description: successful operation + content: + pmjson: + schema: + type: object + properties: + docs: + type: number + terms: + type: number + records: + type: number + records_per_doc_avg: + type: number + bytes_per_record_avg: + type: number + inverted_sz_mb: + type: number + inverted_cap_mb: + type: number + inverted_cap_ovh: + type: number + skip_index_size_mb: + type: number + score_index_size_mb: + type: number + offsets_per_term_avg: + type: number + offset_bits_per_record_avg: + type: number + example: + docs: 1589 + terms: 3855 + records: 116831 + records_per_doc_avg: 73.52 + bytes_per_record_avg: 6.36 + inverted_sz_mb: 0.71 + inverted_cap_mb: 0.00 + inverted_cap_ovh: 0.00 + skip_index_size_mb: 0.00 + score_index_size_mb: 0.00 + offsets_per_term_avg: 9.41 + offset_bits_per_record_avg: 8.00 + + + + + + + + + + + + + + + + + + + + + + + + +components: + schemas: + response1: + title: Without Time Window + type: array + items: + type: string + example: + - 9d8c7fb51ce160eb82e3669aac74ba675dfa8900 + - ddff1bfe286a3b18cebcbadc1678a68a964fbe9d + - 605fc77742cd0317597291329561ac4e50c0dd12 + + response2: + title: With Time Window + type: array + items: + type: object + properties: + series: + type: string + instance: + type: string + timestamp: + type: integer + value: + type: string + example: + - series: 9d8c7fb51ce160eb82e3669aac74ba675dfa8900 + instance: c3795d8b757506a2901c6b08b489ba56cae7f0d4 + timestamp: 1.5474836462147431E9 + value: 12499 + - series: ddff1bfe286a3b18cebcbadc1678a68a964fbe9d + instance: 6b08b489ba56cae7f0d4c3795d8b757506a2901c + timestamp: 1.5474857017431219E9 + value: 1118623 + - series: 605fc77742cd0317597291329561ac4e50c0dd12 + instance: c3795d8b757506a2901c6b08b489ba56cae7f0d4 + timestamp: 1.5474836462147431E9 + value: 71661 + + response3: + title: With series parameter + type: object + properties: + series: + type: string + labels: + type: object + properties: + agent: + type: string + domainname: + type: string + groupid: + type: number + hostname: + type: string + latitude: + type: number + longitude: + type: number + machineid: + type: string + platform: + type: string + userid: + type: number + example: + - series: 605fc77742cd0317597291329561ac4e50c0dd12 + labels: + agent: linux + domainname: acme.com + groupid: 1000 + hostname: www.acme.com + latitude: -25.28496 + longitude: 152.87886 + machineid: 295b16e3b6074cc8bdbda8bf96f6930a + platform: dev + userid: 1000 + + response4: + title: Without any parameter + type: array + items: + type: string + example: + - agent + - appversion + - domainname + - groupid + - hostname + - jobid + - latitude + - longitude + - machineid + - platform + - userid + + response5: + title: With name/names parameter + type: object + properties: + hostname: + type: array + items: + type: string + domainname: + type: array + items: + type: string + example: + hostname: + - app + - nas + domainname: + - acme.com + + response6: + title: With series parameter + type: array + items: + type: object + properties: + series: + type: string + name: + type: string + example: + - series: 605fc77742cd0317597291329561ac4e50c0dd12 + name: disk.dev.read_bytes + + response7: + title: Without series parameter + type: array + items: + type: string + example: + - disk.dev.read + - disk.dev.read_bytes + - disk.dev.read_merge + - kernel.all.load + - kernel.all.pswitch + + response8: + title: With series parameter + type: array + items: + type: object + properties: + series: + type: string + source: + type: string + instance: + type: string + id: + type: number + name: + type: string + example: + - series: 605fc77742cd0317597291329561ac4e50c0dd12 + source: 97261ac7742cd4e50c0d03175913295d12605fc7 + instance: c3795d8b757506a2901c6b08b489ba56cae7f0d4 + id: 1 + name: sda + - series: 605fc77742cd0317597291329561ac4e50c0dd12 + source: 97261ac7742cd4e50c0d03175913295d12605fc7 + instance: 57506a2901c6b08b489ba56cae7f0d4c3795d8b7 + id: 2 + name: sdb + + response9: + title: Without series parameter + type: array + items: + type: string + example: + - 1 minute + - 5 minute + - 15 minute + - cpu0 + - cpu1 + - cpu2 + - cpu3 + - node0 + - node1 + - sda + - sdb + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000..f377c3df87 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +sphinxcontrib-redoc +sphinxcontrib-openapi \ No newline at end of file From 8f7ab64c60b0c27f3cfc33493d8f189b7cfc7f32 Mon Sep 17 00:00:00 2001 From: Arzoo Date: Tue, 20 Oct 2020 13:24:08 +0530 Subject: [PATCH 2/3] Delete index.html - unnecessary file --- docs/specs/index.html | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 docs/specs/index.html diff --git a/docs/specs/index.html b/docs/specs/index.html deleted file mode 100644 index 9313b6b655..0000000000 --- a/docs/specs/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - ReDoc - - - - - - - - - - - - - From c03cc2a59883d2a2c936d4920b3ecc278f58e1d4 Mon Sep 17 00:00:00 2001 From: arzoo14 Date: Tue, 20 Oct 2020 20:38:49 +0530 Subject: [PATCH 3/3] improvements --- docs/conf.py | 6 +- docs/specs/index.html | 24 ------ docs/specs/openapi.yaml | 173 ++++++++++++++++++---------------------- 3 files changed, 80 insertions(+), 123 deletions(-) delete mode 100644 docs/specs/index.html diff --git a/docs/conf.py b/docs/conf.py index 3a7501ac4a..7cadda1b1a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -192,8 +192,4 @@ # epub_uid = '' # A list of files that should not be packed into the epub file. -epub_exclude_files = ['search.html'] - -from docutils.parsers.rst import directives -from sphinx.directives.code import CodeBlock -directives.register_directive('code', CodeBlock) +epub_exclude_files = ['search.html'] \ No newline at end of file diff --git a/docs/specs/index.html b/docs/specs/index.html deleted file mode 100644 index 9313b6b655..0000000000 --- a/docs/specs/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - ReDoc - - - - - - - - - - - - - diff --git a/docs/specs/openapi.yaml b/docs/specs/openapi.yaml index 02968370a8..30c8d093fc 100644 --- a/docs/specs/openapi.yaml +++ b/docs/specs/openapi.yaml @@ -26,10 +26,9 @@ info: The PMWEBAPI is a collection of interfaces providing Performance Co-Pilot services for web applications. It consists of APIs for web applications querying and analysing both live and historical performance data, as well as APIs used by web servers. The usual HTTP URL-encoded optional parameter rules apply and PMWEBAPI REST requests always follow the convention: - ``` + ```bash /api/endpoint ? parameter1 = value1 & parameter2 = value2 ``` - Examples in all following sections use the [curl](https://man7.org/linux/man-pages/man1/curl.1.html)(1) command line utility with a local [pmproxy](https://pcp.io/man/man1/pmproxy.1.html)(1) server listening on port 44322 (default port). The [pmjson](https://pcp.io/man/man1/pmjson.1.html)(1) utility is used to neatly format any JSON output, as opposed to the compact (minimal whitespace) form provided by default. The examples in the scalable time series section use historical data recorded by the [pmlogger](https://pcp.io/man/man1/pmlogger.1.html)(1) service, in conjunction with a local [redis-server](https://man7.org/linux/man-pages/man1/redis-server.1.html)(1). version: "" servers: @@ -59,41 +58,49 @@ tags: The timeout interval is configurable at context creation time, and as such the *polltime* parameter can be used anywhere the *hostspec* is specified. It sets the context timeout in terms of length of inactive time. The unit for the timeout value is seconds and the default is 5. To specify a specific existing context in any PMAPI web request, the endpoints can be accessed with either the *context* parameter or enbedded in the endpoint URL itself, such as **/pmapi/[number]/fetch**. + paths: /metrics: get: tags: - OPEN METRICS summary: Fetches current values and metadata - description: " `Get metrics` fetches current values and metadata for all metrics, or only metrics\ - \ indicated by a comma-separated list of names. For all numeric metrics with the given NAME prefixes, create an\ - \ Open Metrics (Prometheus) text export format giving their current value\ - \ and related metadata.\n\nThe response has plain text type rather than JSON\ - \ commonly used elsewhere in the REST API. This format can be injested by\ - \ many open source monitoring tools, including Prometheus and [pmdaopenmetrics](https://pcp.io/man/man1/pmdaopenmetrics.1.html)(1).\n\ - \nThe native PCP metric metadata (metric name, type, indom, semantics and\ - \ units) is first output for each metric with **# PCP** prefix. The metadata\ - \ reported is of the form described on [pmTypeStr](https://pcp.io/man/man3/pmtypestr.3.html)(3),\ - \ [pmInDomStr](https://pcp.io/man/man3/pmindomstr.3.html)(3), [pmSemStr](https://pcp.io/man/man3/pmsemstr.3.html)(3)\ - \ and [pmUnitsStr](https://pcp.io/man/man3/pmunitsstr.3.html)(3) respectively.\ - \ If the [pmUnitsStr](https://pcp.io/man/man3/pmunitsstr.3.html)(3) units\ - \ string is empty, then **none** is output. The units metadata string may\ - \ contain spaces and extends to the end of the line.\n\nPCP metric names are\ - \ mapped so that the **.** separators are exchanged with **\\_** (':' in back-compatibility\ - \ mode, where \"# PCP\" is the identifying line suffix). Both metric labels\ - \ and instances are represented as Prometheus labels, with external instance\ - \ names being quoted and the flattened PCP metric hierarchy being presented\ - \ with each value.\n```\n$ curl -s http://localhost:44322/metrics?names=proc.nprocs,kernel.pernode.cpu.intr,filesys.blocksize\n\ - \n# PCP5 proc.nprocs 3.8.99 u32 PM_INDOM_NULL instant none \n# HELP proc_nprocs\ - \ instantaneous number of processes\n# TYPE proc_nprocs gauge\nproc_nprocs\ - \ {hostname=\"app1\"} 7\n\n# PCP5 kernel.pernode.cpu.intr 60.0.66 u64 60.19\ - \ counter millisec\n# HELP kernel_pernode_cpu_intr total interrupt CPU [...]\n\ - # TYPE kernel_pernode_cpu_intr counter\nkernel_pernode_cpu_intr{hostname=\"\ - app1\",instname=\"node0\"} 25603\n\n# PCP5 filesys.blocksize 60.5.9 u32 60.5\ - \ instant byte\n# HELP filesys_blocksize Size of each block on mounted file[...]\n\ - # TYPE filesys_blocksize gauge\nfilesys_blocksize{hostname=\"app1\",instname=\"\ - /dev/sda1\"} 4096\nfilesys_blocksize{hostname=\"app1\",instname=\"/dev/sda2\"\ - } 4096\n\n```\n" + description: | + `Get Metrics` fetches current values and metadata for all metrics, or only metrics indicated by a comma-separated list of *names*. + + For all numeric metrics with the given NAME prefixes, create an Open Metrics (Prometheus) text export format giving their current value and related metadata. + + The response has plain text type rather than JSON commonly used elsewhere in the REST API. This format can be injested by many open source monitoring tools, + including Prometheus and [pmdaopenmetrics](https://pcp.io/man/man1/pmdaopenmetrics.1.html)(1). + + The native PCP metric metadata (metric name, type, indom, semantics and units) is first output for each metric with **\# PCP** prefix. The metadata reported + is of the form described on [pmTypeStr](https://pcp.io/man/man3/pmtypestr.3.html)(3), [pmInDomStr](https://pcp.io/man/man3/pmindomstr.3.html)(3), + [pmSemStr](https://pcp.io/man/man3/pmsemstr.3.html)(3) and [pmUnitsStr](https://pcp.io/man/man3/pmunitsstr.3.html)(3) respectively. If the [pmUnitsStr](https://pcp.io/man/man3/pmunitsstr.3.html)(3) + units string is empty, then **none** is output. The units metadata string may contain spaces and extends to the end of the line. + + PCP metric names are mapped so that the **.** separators are exchanged with **_** (':' in back-compatibility mode, where "# PCP" is the identifying line suffix). + Both metric labels and instances are represented as Prometheus labels, with external instance names being quoted and the flattened PCP metric hierarchy being + presented with each value. + + ```bash + $ curl -s http://localhost:44322/metrics?names=proc.nprocs,kernel.pernode.cpu.intr,filesys.blocksize + + # PCP5 proc.nprocs 3.8.99 u32 PM_INDOM_NULL instant none + # HELP proc_nprocs instantaneous number of processes + # TYPE proc_nprocs gauge + proc_nprocs {hostname="app1"} 7 + + # PCP5 kernel.pernode.cpu.intr 60.0.66 u64 60.19 counter millisec + # HELP kernel_pernode_cpu_intr total interrupt CPU [...] + # TYPE kernel_pernode_cpu_intr counter + kernel_pernode_cpu_intr{hostname="app1",instname="node0"} 25603 + + # PCP5 filesys.blocksize 60.5.9 u32 60.5 instant byte + # HELP filesys_blocksize Size of each block on mounted file[...] + # TYPE filesys_blocksize gauge + filesys_blocksize{hostname="app1",instname="/dev/sda1"} 4096 + filesys_blocksize{hostname="app1",instname="/dev/sda2"} 4096 + ``` parameters: - name: names in: query @@ -105,6 +112,7 @@ paths: description: Append sample times (milliseconds since epoch) schema: type: boolean + /series/query: get: tags: @@ -114,11 +122,11 @@ paths: The query is in the format described in [pmseries](https://pcp.io/man/man1/pmseries.1.html)(1) and is passed to the server via either the *expr* parameter (HTTP GET) or via the message body (HTTP POST). When querying for time series matches only, no time window options are specified and matching series identifiers are returned in a JSON array. - ``` + ```bash $ curl -s http://localhost:44322/series/query?expr=disk.dev.read* | pmjson ``` When querying for time series values as well, a time window must be specified as part of the query string. The simplest form is to just request the most recent sample. - ``` + ```bash $ curl -s http://localhost:44322/series/query?expr=disk.dev.read*[samples:1] | pmjson ``` **References:** [pmSeriesQuery](https://man7.org/linux/man-pages/man3/pmSeriesQuery.3.html)(3) @@ -126,7 +134,7 @@ paths: parameters: - name: expr in: query - description: Query string in pmseries (1) format + description: Query string in [pmseries](https://pcp.io/man/man1/pmseries.1.html)(1) format schema: type: string - name: client @@ -141,10 +149,9 @@ paths: pmjson: schema: anyOf: - - $ref: '#/components/schemas/response1' - - $ref: '#/components/schemas/response2' + - $ref: '#/components/schemas/seriesIDs' + - $ref: '#/components/schemas/seriesValues' - /series/values: get: tags: @@ -152,7 +159,7 @@ paths: summary: Performs values retrievals for one or more time series identifiers description: | The JSON response contains the same information as the **pmseries - q /-- query** option using any of the time window parameters described on [pmseries](https://pcp.io/man/man1/pmseries.1.html)(1). If no time window parameters are specified, the single most recent value observed is retrieved. - ``` + ```bash $ curl -s http://localhost:44322/series/values?series=605fc77742cd0317597291329561ac4e50c0dd12 | pmjson ``` **References:** [pmSeriesValues](https://man7.org/linux/man-pages/man3/pmSeriesValues.3.html)(3) @@ -224,6 +231,7 @@ paths: type: integer value: type: string + /series/descs: get: tags: @@ -231,7 +239,7 @@ paths: summary: Performs a descriptor lookup for one or more time series identifiers description: | The JSON response contains the same information as the **pmseries - d /-- desc** option. - ``` + ```bash $ curl -s http://localhost:44322/series/descs?series=605fc77742cd0317597291329561ac4e50c0dd12 | pmjson ``` **References:** [pmSeriesDescs](https://man7.org/linux/man-pages/man3/pmSeriesDescs.3.html)(3) @@ -277,6 +285,7 @@ paths: semantics: counter type: u32 units: count + /series/labels: get: tags: @@ -286,15 +295,15 @@ paths: This command operates in one of three modes. It can perform a label set lookup for one or more time series identifiers, when given the series parameter. The JSON response for this mode contains the same information as the **pmseries - I /-- labels** option. - ``` + ```bash $ curl -s http://localhost:44322/series/labels?series=605fc77742cd0317597291329561ac4e50c0dd12 | pmjson ``` It can produce a list of all known label names, in the absense of name , names or series parameters. The JSON responses for this mode contains the same information as the **pmseries - l /-- labels** option. - ``` + ```bash $ curl -s http://localhost:44322/series/labels | pmjson ``` It can produce a list of all known label values for a given label name or names . The JSON response for this mode contains the same information as the **pmseries - v /-- values** option. - ``` + ```bash $ curl -s http://localhost:44322/series/labels?names=hostname,domainname | pmjson ``` **References:** [pmSeriesLabels](https://man7.org/linux/man-pages/man3/pmSeriesLabels.3.html)(3), [pmSeriesLabelValues](https://man7.org/linux/man-pages/man3/pmSeriesLabelValues.3.html)(3) @@ -332,9 +341,9 @@ paths: pmjson: schema: anyOf: - - $ref: '#/components/schemas/response3' - - $ref: '#/components/schemas/response4' - - $ref: '#/components/schemas/response5' + - $ref: '#/components/schemas/seriesParam' + - $ref: '#/components/schemas/noParam' + - $ref: '#/components/schemas/namesParam' /series/metrics: get: @@ -343,11 +352,11 @@ paths: summary: Performs a metric name lookup for one or more time series identifiers description: | The JSON response contains the same information as the **pmseries - m /-- metrics** option. - ``` + ```bash $ curl -s http://localhost:44322/series/metrics?series=605fc77742cd0317597291329561ac4e50c0dd12 | pmjson ``` Alternatively, with no *series* argument, this request will return the list of all known metric names. - ``` + ```bash $ curl -s http://localhost:44322/series/metrics | pmjson ``` **References:** [pmSeriesMetrics](https://man7.org/linux/man-pages/man3/pmSeriesMetrics.3.html)(3) @@ -375,8 +384,8 @@ paths: pmjson: schema: anyOf: - - $ref: '#/components/schemas/response6' - - $ref: '#/components/schemas/response7' + - $ref: '#/components/schemas/series_metricName' + - $ref: '#/components/schemas/all_metricNames' /series/sources: get: @@ -386,7 +395,7 @@ paths: description: | It returns an array of all PMAPI context names used to access the time series from that source.The JSON response contains the same information as the **pmseries - S /-- source** option. - ``` + ```bash $ curl -s http://localhost:44322/series/sources?source=2cd6a38f9339f2dd1f0b4775bda89a9e7244def6 | pmjson ``` **References:** [pmSeriesSources](https://man7.org/linux/man-pages/man3/pmSeriesSources.3.html)(3) @@ -428,6 +437,7 @@ paths: type: array items: type: string + /series/instances: get: tags: @@ -436,11 +446,11 @@ paths: identifiers description: | The JSON response contains the same information as the **pmseries - i /-- instance** option. - ``` + ```bash $ curl -s http://localhost:44322/series/instances?series=605fc77742cd0317597291329561ac4e50c0dd12 | pmjson ``` Alternatively, with no *series* argument, this request will return the list of all known instance names. - ``` + ```bash $ curl -s http://localhost:44322/series/instances | pmjson ``` **References:** [pmSeriesInstances](https://man7.org/linux/man-pages/man3/pmSeriesInstances.3.html)(3) @@ -468,8 +478,8 @@ paths: pmjson: schema: anyOf: - - $ref: '#/components/schemas/response8' - - $ref: '#/components/schemas/response9' + - $ref: '#/components/schemas/series_instanceName' + - $ref: '#/components/schemas/all_instanceNames' /series/load: get: @@ -479,7 +489,7 @@ paths: description: | It loads time series performance data from the specified source into the **redis-server** cache. This request is equivalent to the **pmseries - l /-- load** option. - ``` + ```bash $ curl -s http://localhost:44322/series/load&expr={source.name:"/var/log/pcp/pmlogger/acme"} ``` **References:** [pmSeriesLoad](https://man7.org/linux/man-pages/man3/pmSeriesLoad.3.html)(3) @@ -487,7 +497,7 @@ paths: parameters: - name: expr in: query - description: Source load string in pmseries (1) format + description: Source load string in [pmseries](https://pcp.io/man/man1/pmseries.1.html)(1) format schema: type: string - name: client @@ -517,7 +527,7 @@ paths: It performs a text search query across metrics and instance domains - all forms of names and help texts. The mandatory search string is further described in [pmsearch](https://pcp.io/man/man1/pmsearch.1.html)(1) and is passed to the server via the *query* parameter (HTTP GET). - ``` + ```bash $ curl -s http://localhost:44322/search/text?query=halt | pmjson ``` The available search entity *types* are *metric*, *indom* and *instance*. Query parameters *highlight* and *field* take *name*, *oneline* and *helptext*. @@ -530,7 +540,7 @@ paths: parameters: - name: query in: query - description: Query string in pmsearch (1) format + description: Query string in [pmsearch](https://pcp.io/man/man1/pmsearch.1.html)(1) format schema: type: string - name: highlight @@ -594,7 +604,6 @@ paths: type: string helptext: type: string - example: total : 2 offset: 0 @@ -618,7 +627,7 @@ paths: summary: Provides search query suggestions, that is, metric and instance names description: | The mandatory search string is further described in [pmsearch](https://pcp.io/man/man1/pmsearch.1.html)(1) and is passed to the server via the *query* parameter (HTTP GET). - ``` + ```bash $ curl -s http://localhost:44322/search/suggest?query=disk&limit=4 | pmjson ``` **Reference:** [pmSearchTextSuggest](https://man7.org/linux/man-pages/man3/pmSearchTextSuggest.3.html)(3) @@ -683,7 +692,7 @@ paths: summary: Provides metrics relating to operation description: | It provides metrics relating to operation of the search engine, in particular showing document and text record counts. - ``` + ```bash $ curl -s http://localhost:44322/search/info | pmjson ``` **Reference:** [pmSearchInfo](https://man7.org/linux/man-pages/man3/pmSearchInfo.3.html)(3) @@ -734,32 +743,9 @@ paths: offsets_per_term_avg: 9.41 offset_bits_per_record_avg: 8.00 - - - - - - - - - - - - - - - - - - - - - - - components: schemas: - response1: + seriesIDs: title: Without Time Window type: array items: @@ -769,7 +755,7 @@ components: - ddff1bfe286a3b18cebcbadc1678a68a964fbe9d - 605fc77742cd0317597291329561ac4e50c0dd12 - response2: + seriesValues: title: With Time Window type: array items: @@ -797,7 +783,7 @@ components: timestamp: 1.5474836462147431E9 value: 71661 - response3: + seriesParam: title: With series parameter type: object properties: @@ -837,7 +823,7 @@ components: platform: dev userid: 1000 - response4: + noParam: title: Without any parameter type: array items: @@ -855,7 +841,7 @@ components: - platform - userid - response5: + namesParam: title: With name/names parameter type: object properties: @@ -874,7 +860,7 @@ components: domainname: - acme.com - response6: + series_metricName: title: With series parameter type: array items: @@ -888,7 +874,7 @@ components: - series: 605fc77742cd0317597291329561ac4e50c0dd12 name: disk.dev.read_bytes - response7: + all_metricNames: title: Without series parameter type: array items: @@ -900,7 +886,7 @@ components: - kernel.all.load - kernel.all.pswitch - response8: + series_instanceName: title: With series parameter type: array items: @@ -928,7 +914,7 @@ components: id: 2 name: sdb - response9: + all_instanceNames: title: Without series parameter type: array items: @@ -945,4 +931,3 @@ components: - node1 - sda - sdb -