In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
OpenTSDB supports many date and time formats when querying data. The following formats are supported in queries submitted via GUI, CliQuery tool or HTTP API. Each query requires a start time and an optional end time. If no end time is specified, the current time on the system running TSD is used.
opposite
If you do not know the exact timestamp to request, you can submit the elapsed time relative to the time on the TSD running system. Relative time follows the format-ago, where is a numeric value that refers to units of time such as hours, days, etc. For example, if we provide a start time of 1h-ago and leave an end time, our query will return data from 1 hour ago to the current time. Possible time units include:
ms - Millisecondss - Secondsm - Minutesh - Hoursd - Days (24 hours)w - Weeks (7 days)n - Months (30 days)y - Years (365 days)
Note:
Relative time excludes leap seconds, leap years or time zones. They simply count the seconds that have elapsed since the current time.
Absolute Unix time
Inside the store, all data is associated with Unix (or POSIX) style timestamps. Unix time is defined as the number of seconds elapsed since January 1, 1970 00:00:00 UTC time. The timestamp is represented as a positive integer, such as 1364410924, representing ISO 8601:2013-03-27T19:02:04Z. Since calls to store data in OpenTSDB require Unix timestamps, it makes sense to support this format in queries. Therefore, you can provide integers for start or end times in queries.
Queries that use Unix timestamps can support millisecond precision by simply appending three digits. For example, providing a start time of 1364410924000 and an end time of 1364410924250 returns data within a 250 millisecond window. Millisecond timestamps can also provide a period of time separating seconds 1364410924.250 from milliseconds. Any integer with 13 (or 14) characters will be treated as a millisecond timestamp. Any 10 or fewer characters represent seconds. Milliseconds can only be provided with 3-bit precision. If your tool outputs more than 3 digits, you must truncate or round the value.
absolute formatting time
Because it is difficult to calculate Unix time in your head, OpenTSDB also supports human-readable absolute dates and times. Supported formats include:
YYYY/ MM/ DD-HH:MM:SSyyyy/MM/dd HH:mm:ssYYYY/MM/ DD-HH:MMyyyy/MM/dd HH:mmYYYY/MM/DD
Yyyy represents the year as a four-digit number, such as 2013. MM stands for January to December. dd represents day 01 of the month starting with the month. HH stands for departure time 00 to 23 on the 24-hour clock of the day. mm indicates the beginning of minutes 00 to 59 and ss indicates the beginning of seconds 00 to 59. All months, days, hours, minutes and seconds are single digits and must be prefixed with 0, e.g. the 5th day of each month must be 05. When there is no time to provide data, the system assumes midnight on a given date.
Examples include January 23, 2013 -12:50:42 or January 23, 2013. The formatted time is converted from the default time zone of the host running TSD to UTC. HTTP API queries can accept user-supplied time zones to override local time zones.
Note:
When using the CliQuery tool, you must use a format in which the time is separated from the date by a dash. This is because the command line is separated by spaces, so if you put spaces in the timestamp, it will not parse the execution correctly.
time zone
When converting human-readable timestamps, OpenTSDB converts to UTC the time zone configured on the system on which TSD is running. Although many servers are configured to UTC, we recommend that all systems running OpenTSDB use UTC, although local time zones are sometimes used.
Query the HTTP API with a query string to specify tz as a parameter with a time zone identification string in a format appropriate for localization settings for the system running TSD. For example, we can specify tz=America/Los_Angeles to convert our timestamp from Los Angeles local time to UTC.
Alternatively, if you cannot change the system time zone, you can provide an override through the tsd.core.timezone property of the configuration file.
next
OpenTsdb official documentation----query filters
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.