diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-11-06 18:32:35 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-11-06 18:32:35 -0800 |
commit | 175019c96fced3e21d0f60ea1a4a37da6b8872ac (patch) | |
tree | f42fbbe9c8ac06ae9eb06373ab9eec96d2b3a177 /sql/monitoring_queries.md | |
parent | b0b66c20c6ffb9d8acc626068964d7dfd5d3bcdc (diff) | |
parent | 47ca1a273912c8836630b0930b71a4e66fd2c85b (diff) | |
download | sandcrawler-175019c96fced3e21d0f60ea1a4a37da6b8872ac.tar.gz sandcrawler-175019c96fced3e21d0f60ea1a4a37da6b8872ac.zip |
Merge branch 'bnewbold-html-ingest'
Diffstat (limited to 'sql/monitoring_queries.md')
-rw-r--r-- | sql/monitoring_queries.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sql/monitoring_queries.md b/sql/monitoring_queries.md index 1738731..1c872cc 100644 --- a/sql/monitoring_queries.md +++ b/sql/monitoring_queries.md @@ -39,6 +39,32 @@ Broken domains, past 30 days: ORDER BY COUNT DESC LIMIT 25; +Summary of significant domains and status, past 7 days: + + SELECT domain, status, count + FROM ( + SELECT domain, status, COUNT((domain, status)) as count + FROM ( + SELECT + ingest_file_result.ingest_type, + ingest_file_result.status, + substring(ingest_file_result.terminal_url FROM '[^/]+://([^/]*)') AS domain + FROM ingest_file_result + LEFT JOIN ingest_request + ON ingest_file_result.ingest_type = ingest_request.ingest_type + AND ingest_file_result.base_url = ingest_request.base_url + WHERE + ingest_file_result.updated >= NOW() - '7 day'::INTERVAL + AND ingest_request.ingest_type = 'pdf' + AND ingest_request.ingest_request_source = 'fatcat-changelog' + ) t1 + WHERE t1.domain != '' + GROUP BY CUBE (domain, status) + ) t2 + WHERE count > 500 + ORDER BY domain ASC , count DESC; + + Throughput per day, and success, for past 30 days: SELECT ingest_request.ingest_type, |