Collectors and data formats
REST API collector
the rest api collector can read data points from a rest api endpoint the collector supports reading data points in {{json}} and {{csv}} format the collector supports only the oauth2 authentication basic settings timestamplayout description the timestamp layout is used to correctly interpret the timestamp(s) of the data points read for a measurement a list of available timestamp formats, along with their string representations, can be found here required no if empty the default rfc3339 timestamplayout e g 2006 01 02t15 04 05z07 00 is used for timestamps in unix format, one of the following values can be used unix (time in s), unixmillis (time in ms), unixmicros (time in μs), or unixnanos (time in ns) for other timestamp formats, see the read data from json docid\ rkukkrd4ariwfqk96lqy5 examples warning the collector timestamplayout setting is the default timestamplayout setting for all measurements on the collector it can be overwritten per measurement by setting the timestamplayout setting on the measurement url description the url to the rest api endpoint required no if empty the collector url setting is the default url setting for all measurements on the collector it can be overwritten per measurement by setting the url setting on the measurement queryparameters description a json object to configure default query parameters for all requests this is only used when the method is set to get the query parameters from the collector or the measurements must contain \<starttime> and \<stoptime> as values of a json key if these are not present, the collector will go into an error status required no default {} the queryparameters from the measurement settings are used example { "id" "temperature", "start" "\<starttime>", "stop" "\<stoptime>" } the keywords \<starttime> and \<stoptime> are replaced by the collector by the start time and stop time when sending a request for each request, the start time and stop time are derived from the interval setting warning the collector queryparameters setting is the default queryparameters setting for all measurements on the collector it can be overwritten per measurement by setting the queryparameters setting on the measurement body description a json object to configure the default body for all requests only in use when the method is set to post the body from the collector or the measurements must contain \<starttime> and \<stoptime> as values of a json key if these are not present, the collector will go into an error status required no if empty the body from the measurement settings are used example { "id" "temperature", "start" "\<starttime>", "stop" "\<stoptime>" } warning the collector body setting is the default body setting for all measurements on the collector it can be overwritten per measurement by setting the body setting on the measurement method description the default http(s) request method to be used e g get or post required no default the http(s) method get is used the collector method setting is the default method setting for all measurements on the collector it can be overwritten per measurement by setting the method setting on the measurement interval description the interval (in seconds) at which api requests should be sent use 1 to leave empty required no if empty the interval from the measurement settings is used example 86400 this sends one request each day the collector interval setting is the default interval setting for all measurements on the collector it can be overwritten per measurement by setting the interval setting on the measurement intervaloffset description the default offset in seconds, relative to the 0th second of each minute, at which requests are sent use 1 to leave empty required no if empty the intervaloffset from the measurement settings is used example 1 with one request each day, this sends the request the 1st second after midnight, instead of at midnight itself the collector intervaloffset setting is the default intervaloffset setting for all measurements on the collector it can be overwritten per measurement by setting the intervaloffset setting on the measurement headers description a json object to configure default headers for all requests use {} to leave empty required no example { "authorization" "bearer xxxxxxxx xxxx xxxx xxxx xxxxxxxxxxxx", "referer" "api collector" } the collector headers setting is the default headers setting for all measurements on the collector it can be overwritten per measurement by setting the headers setting on the measurement historian re run settings starttimehistoric to start a historic re run of the data points for all measurements on the collector (in parallel with the realtime run), set the starttimehistoric setting description an optional historic start time the timestamp layout must match the timestamplayout setting required no if empty no historic re run of the data is started and only live data will be processed empty the starttimehistoric when the historic data reading is finished (see the collector logs), to prevent it from being repeated on resuming the collector after a restart or a pause stoptimehistoric the stoptimehistoric is only used if the starttimehistoric is not empty description an optional historic stop time the timestamp layout must match the timestamplayout setting required no if empty the run for processing historic data will go up to now intervalhistoric the intervalhistoric is only used if the starttimehistoric is not empty description an optional interval in seconds that indicates the time difference between the start time and the stop time for each request in a historic re run (requests are executed each second) required no if empty the interval 900 is set (15 minutes) example 86400 this sends a request for a time period of a day (time between start time and stop time of each request in the historic re run) at each second (fixed for historic re run) advanced settings only collector specific advanced settings are listed below readtimeout description the http(s) request timeout in seconds if the collector does not receive a response in this timeframe after the request, the request will be disregarded and an error status is written on the measurements in that request required yes default 5 seconds idletimeout description maximum time (in seconds) an idle keep alive http connection can stay open without any data being sent or received once this time passes, the connection will automatically close required yes default 0 seconds (means no limit) lookbackintervals description the amount of intervals (from the interval setting) to additionally look back before each request required yes default 0 seconds (means only the current interval will be used as time period for each request) example if the interval is set to 900 (15 minutes), and the lookbackintervals is set to 3 then for each request, the start time will be set 45 minutes before the start time determined by interval , while the stop time of the request is kept this results in each request setting a time period of 1 hour the lookbackintervals is typically used when the rest api server does not hold the data points in realtime, but only holds data points that from some time ago e g it does only hold the data points 30 minutes after the fact querytimezone description specifies the time zone used to interpret query timestamps (for example, the start and stop time parameters in a request) before formatting them according to the timestamplayout setting the time zone must be specified using a valid name from the iana time zone database , which you can consult on wikipedia required yes default utc measurement settings for the measurement settings that are identical to the collector settings, see the explanation above for the remanining measurement settings to read data from the rest api responses to read data from a {{json}} payload with the rest api collector, see read data from json docid\ rkukkrd4ariwfqk96lqy5 to read data from a {{csv}} payload with the rest api collector, see read data from csv docid\ qjcpc1w8j8zngta38mpqu