Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add indexing metrics and URL spot checks #18

Merged
merged 6 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions stat-pusher/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Stats Pusher
============

Add new stats metrics to `dev.stats`, then use a pull-request to add them in. They should then be deployed across `beta` and then `prod`.

To test them on the `dev` server, we need a `virtualenv`:

```
$ virtualenv -p python3 venv
```

Then run:

```
$ run_stat_pusher.sh dev
```

Which should grab the stats and push them to the DEV monitor. It relies on `gitlab/ukwa-monitor` to pick up environment variables.
50 changes: 50 additions & 0 deletions stat-pusher/dev.stats
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,56 @@
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=*:*&sort=refresh_date_dt%20desc&wt=json",
"kind": "json",
"match": "['response','docs','refresh_date_dt']"
},
"numFound_missing": {
"host": "solr8",
"label": "missing",
"desc": "Number of records in trackdb collection that appear to be missing as their records no longer refreshed",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=refresh_date_dt%3A%5B*%20TO%20NOW-1DAY%5D&sort=refresh_date_dt%20desc&wt=json",
"kind": "json",
"match": "['response','numFound']"
},
"numFound_warcs": {
"host": "solr8",
"label": "warcs",
"desc": "Number of records in trackdb collection that are marked as WARCs",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=kind_s%3Awarcs&sort=timestamp_dt%20desc&wt=json",
"kind": "json",
"match": "['response','numFound']"
},
"last_timestamp_warcs": {
"host": "solr8",
"label": "warcs",
"desc": "Most recent trackdb timestamp of the WARCs",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=kind_s%3Awarcs&sort=timestamp_dt%20desc&wt=json",
"kind": "json",
"match": "['response','docs','timestamp_dt']"
},
"numFound_cdx": {
"host": "solr8",
"label": "cdx",
"desc": "Number of records in trackdb collection that are marked as cdx-indexed",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=cdx_index_ss%3A%5B*%20TO%20*%5D&sort=timestamp_dt%20desc&wt=json",
"kind": "json",
"match": "['response','numFound']"
},
"last_timestamp_cdx": {
"host": "solr8",
"label": "cdx",
"desc": "Most recent trackdb timestamp that is marked as having been cdx-indexed",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=cdx_index_ss%3A%5B*%20TO%20*%5D&sort=timestamp_dt%20desc&wt=json",
"kind": "json",
"match": "['response','docs','timestamp_dt']"
}
},
"cdx_oa_wayback": {
"last_timestamp": {
"host": "www.webarchive.org.uk",
"label": "cdx",
"desc": "Most recent CDX timestamp of a page that should be crawled every day (bl.uk/robots.txt)",
"uri": "https://www.webarchive.org.uk/wayback/archive/cdx?url=https%3A%2F%2Fwww.bl.uk%2Frobots.txt&output=json&allowFuzzy=false&sort=reverse&limit=1",
"kind": "json",
"match": "['timestamp']"
}
}
}
1 change: 0 additions & 1 deletion stat-pusher/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
prometheus_client
requests
urllib
python_dateutil
datetime