Searching for time series identifiers and values using the
Performance Co-Pilot (PCP) fast, scalable time series services is
achieved using the pmseries(1) utility, and associated pmproxy(1)
REST API service.
The implementation of these facilities is shared and available for
other programs to use as well. The functionality is provided through
asynchronous APIs, which function in an event-driven fashion where
callbacks are invoked for each set of series identifiers or values
structure being returned. These callbacks must be registered using
pmSeriesSetup(3) before any query API calls are made.
As a general pattern, these interfaces take an opaque (void *
pointer) parameter, arg. This pointer will be passed through
unchanged and is typically used to access a data structure
maintaining state within the calling program.
Depending on the pmseries query string provided, pmSeriesQuery
operates in one of two modes.
Firstly, if no time window specification is provided (square
brackets), then the interface will return only matching series
identifiers and no values. These identifiers are returned via the
on_match callback registered using pmSeriesSetup.
The second mode is where a time window specification is used in the
query string, or when the pmSeriesValues interface is used. This
mode provides values and time stamps for all matching time series
identifiers having data points within the provided time window. In
this case, the results are returned via the on_value callback
registered using pmSeriesSetup.
Further metadata (metric names, labels, units, semantics, type, etc)
about matched time series and their values can be obtained using the
interfaces described on the pmSeriesDescs(3) manual page.
Typically, loading of time series is handled automatically by the
pmproxy daemon, which uses the pmDiscoverSetup(3) series of
interfaces to automatically detect and load logged time series from
pmlogger(1). However, it is also possible to manually load time
series from a PCP archive using the pmSeriesLoad interface. The
provided query string must provide an archive or directory to load
data from using the source.path keyword.
This page is part of the PCP (Performance Co-Pilot) project.
Information about the project can be found at ⟨http://www.pcp.io/⟩.
If you have a bug report for this manual page, send it to
email@example.com. This page was obtained from the project's upstream
Git repository ⟨https://github.com/performancecopilot/pcp.git⟩ on
2020-06-09. (At that time, the date of the most recent commit that
was found in the repository was 2020-06-09.) If you discover any
rendering problems in this HTML version of the page, or you believe
there is a better or more up-to-date source for the page, or you have
corrections or improvements to the information in this COLOPHON
(which is not part of the original manual page), send a mail to
Performance Co-Pilot PCP PMSERIESSETUP(3)