Commit Graph

4 Commits

Author SHA1 Message Date
johncming ac3cedb108 promql: Modify the order of return values. (#5940)
Signed-off-by: johncming <johncming@yahoo.com>
2019-08-24 02:39:15 +01:00
johncming d1b3a6e013 promql: Optimize the writing (#5941)
Signed-off-by: johncming <johncming@yahoo.com>
2019-08-24 02:38:48 +01:00
AllenZMC 04cb37fea8 fix wrong spells in query_logger.go (#5843)
Signed-off-by: czm <zhongming.chang@daocloud.io>
2019-08-07 15:02:53 +01:00
Advait Bhatwadekar 5d401f1e1b Added query logging for prometheus. Issue #1315 (#5794)
* Added query logging for prometheus.
Options added:
1) active.queries.filepath: Filename where queries will be recorded
2) active.queries.filesize: Size of the file where queries will be recorded.

Functionality added:
All active queries are now logged in a file. If prometheus crashes unexpectedly, these queries are also printed out on stdout in the rerun.

Queries are written concurrently to an mmaped file, and removed once they are done. Their positions in the file are reused. They are written in json format. However, due to dynamic nature of application, the json has an extra comma after the last query, and is missing an ending ']'. There may also null bytes in the tail of file.

Signed-off-by: Advait Bhatwadekar <advait123@ymail.com>
2019-07-31 16:12:43 +01:00