Skip to content

Commit

Permalink
Pushing same stats on all environs; rr_logs alert only fires if value…
Browse files Browse the repository at this point in the history
…s exist
  • Loading branch information
GilHoggarth committed Apr 12, 2023
1 parent 68065d9 commit 14ac8f1
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 6 deletions.
66 changes: 64 additions & 2 deletions stat-pusher/beta.stats
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"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",
Expand All @@ -40,6 +40,15 @@
"kind": "json",
"match": "['response','docs','timestamp_dt']"
},
"last_timestamp_crawl_logs_npld": {
"host": "solr8",
"name": "trackdb_last_timestamp",
"label": "npld.crawl-logs",
"desc": "Most recent trackdb timestamp of the NPLD crawl logs.",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=kind_s%3Acrawl-logs%20AND%20job_s:frequent-npld&sort=timestamp_dt%20desc&wt=json",
"kind": "json",
"match": "['response','docs','timestamp_dt']"
},
"numFound_cdx": {
"host": "solr8",
"label": "cdx",
Expand All @@ -55,14 +64,67 @@
"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']"
},
"numFound_rr_logs": {
"host": "solr8",
"label": "logs",
"desc": "Number of reading-room hdfs-sync log files that have been updated in the last 24 hours.",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=file_path_s%3A\\%2Flogs\\%2F*\\%2Fusr\\%2Flocal\\%2Fbin\\%2Fhdfslogsync.log-*%20AND%20timestamp_dt%3ANOW-1DAY%20TO%20NOW",
"kind": "json",
"match": "['response','numFound']"
},
"sql_backup_size_shine": {
"host": "solr8",
"name": "ukwa_database_backup_size_bytes",
"label": "shine",
"desc": "Size of backup of SQL database stored on HDFS.",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=modified_at_dt%3A[NOW-1DAY%20TO%20NOW]%20AND%20file_path_s:\\/2_backups\\/access\\/access_shinedb\\/shine.pgdump-*&sort=refresh_date_dt%20desc&wt=json",
"kind": "json",
"match": "['response','docs', 'file_size_l']"
},
"sql_backup_size_w3act": {
"host": "solr8",
"name": "ukwa_database_backup_size_bytes",
"label": "w3act",
"desc": "Size of backup of SQL database stored on HDFS.",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=modified_at_dt%3A[NOW-1DAY%20TO%20NOW]%20AND%20file_path_s:\\/2_backups\\/w3act\\/prod\\/w3act-dump-*&sort=refresh_date_dt%20desc&wt=json",
"kind": "json",
"match": "['response','docs', 'file_size_l']"
},
"nominet_last_upload_size": {
"host": "solr8",
"name": "ukwa_nominet_file_size_bytes",
"label": "nominet",
"desc": "Size of recent Nominet dump stored on HDFS.",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=modified_at_dt%3A[NOW-1MONTH%20TO%20NOW]%20AND%20file_path_s:\\/1_data\\/nominet\\/ukdata-*&sort=refresh_date_dt%20desc&wt=json",
"kind": "json",
"match": "['response','docs', 'file_size_l']"
},
"nominet_last_upload_timestamp": {
"host": "solr8",
"name": "trackdb_last_timestamp",
"label": "nominet",
"desc": "Timestamp of most recent Nominet dump stored on HDFS.",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=file_path_s:\\/1_data\\/nominet\\/ukdata-*&sort=modified_at_dt%20desc&wt=json",
"kind": "json",
"match": "['response','docs', 'timestamp_dt']"
},
"crawl_log_elasticsearch_updates": {
"host": "logs",
"name": "ukwa_crawl_log_records",
"label": "indexed_1m",
"desc": "Number of crawl log entries in ElasticSearch in the last minute.",
"uri": "http://logs.wa.bl.uk:9200/crawl_log*/_search?pretty=true&q=@timestamp:[now-1m+TO+*]&sort=@timestamp:desc&size=0",
"kind": "json",
"match": "['hits','total', 'value']"
}
},
"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",
"uri": "https://www.webarchive.org.uk/wayback/archive/cdx?url=https%3A%2F%2Fwww.bbc.co.uk%2Fnews&output=json&allowFuzzy=false&sort=reverse&limit=1",
"kind": "json",
"match": "['timestamp']"
}
Expand Down
33 changes: 30 additions & 3 deletions stat-pusher/dev.stats
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"host": "solr8",
"label": "logs",
"desc": "Number of reading-room hdfs-sync log files that have been updated in the last 24 hours.",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=file_path_s%3A\\%2Flogs\\%2F*\\%2Fusr\\%2Flocal\\%2Fbin\\%2Fhdfslogsync.log-*%20AND%20timestamp_dt%3A[NOW-1DAY%20TO%20NOW]",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=file_path_s%3A\\%2Flogs\\%2F*\\%2Fusr\\%2Flocal\\%2Fbin\\%2Fhdfslogsync.log-*%20AND%20timestamp_dt%3ANOW-1DAY%20TO%20NOW",
"kind": "json",
"match": "['response','numFound']"
},
Expand All @@ -78,7 +78,7 @@
"name": "ukwa_database_backup_size_bytes",
"label": "shine",
"desc": "Size of backup of SQL database stored on HDFS.",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=modified_at_dt%3A[NOW-1DAY%20TO%20NOW]%20AND%20file_path_s:\\/2_backups\\/access\\/access_shinedb\\/shine.pgdump*&sort=timestamp_dt%20desc&wt=json",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=modified_at_dt%3A[NOW-1DAY%20TO%20NOW]%20AND%20file_path_s:\\/2_backups\\/access\\/access_shinedb\\/shine.pgdump-*&sort=refresh_date_dt%20desc&wt=json",
"kind": "json",
"match": "['response','docs', 'file_size_l']"
},
Expand All @@ -87,9 +87,36 @@
"name": "ukwa_database_backup_size_bytes",
"label": "w3act",
"desc": "Size of backup of SQL database stored on HDFS.",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=modified_at_dt%3A[NOW-1DAY%20TO%20NOW]%20AND%20file_path_s:\\/2_backups\\/w3act\\/prod\\/w3act-dump-*&sort=timestamp_dt%20desc&wt=json",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=modified_at_dt%3A[NOW-1DAY%20TO%20NOW]%20AND%20file_path_s:\\/2_backups\\/w3act\\/prod\\/w3act-dump-*&sort=refresh_date_dt%20desc&wt=json",
"kind": "json",
"match": "['response','docs', 'file_size_l']"
},
"nominet_last_upload_size": {
"host": "solr8",
"name": "ukwa_nominet_file_size_bytes",
"label": "nominet",
"desc": "Size of recent Nominet dump stored on HDFS.",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=modified_at_dt%3A[NOW-1MONTH%20TO%20NOW]%20AND%20file_path_s:\\/1_data\\/nominet\\/ukdata-*&sort=refresh_date_dt%20desc&wt=json",
"kind": "json",
"match": "['response','docs', 'file_size_l']"
},
"nominet_last_upload_timestamp": {
"host": "solr8",
"name": "trackdb_last_timestamp",
"label": "nominet",
"desc": "Timestamp of most recent Nominet dump stored on HDFS.",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=file_path_s:\\/1_data\\/nominet\\/ukdata-*&sort=modified_at_dt%20desc&wt=json",
"kind": "json",
"match": "['response','docs', 'timestamp_dt']"
},
"crawl_log_elasticsearch_updates": {
"host": "logs",
"name": "ukwa_crawl_log_records",
"label": "indexed_1m",
"desc": "Number of crawl log entries in ElasticSearch in the last minute.",
"uri": "http://logs.wa.bl.uk:9200/crawl_log*/_search?pretty=true&q=@timestamp:[now-1m+TO+*]&sort=@timestamp:desc&size=0",
"kind": "json",
"match": "['hits','total', 'value']"
}
},
"cdx_oa_wayback": {
Expand Down
2 changes: 1 addition & 1 deletion stat-pusher/prod.stats
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"host": "solr8",
"label": "logs",
"desc": "Number of reading-room hdfs-sync log files that have been updated in the last 24 hours.",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=file_path_s%3A\\%2Flogs\\%2F*\\%2Fusr\\%2Flocal\\%2Fbin\\%2Fhdfslogsync.log-*%20AND%20timestamp_dt%3A[NOW-1DAY%20TO%20NOW]",
"uri": "http://solr8.api.wa.bl.uk/solr/tracking/select?q=file_path_s%3A\\%2Flogs\\%2F*\\%2Fusr\\%2Flocal\\%2Fbin\\%2Fhdfslogsync.log-*%20AND%20timestamp_dt%3ANOW-1DAY%20TO%20NOW",
"kind": "json",
"match": "['response','numFound']"
},
Expand Down

0 comments on commit 14ac8f1

Please sign in to comment.