RKemper added a comment.
(For future reference) import logging logging.basicConfig(level=logging.DEBUG) from spicerack import Spicerack spicerack = Spicerack(verbose=True, dry_run=True) def site(host): """Hacky way to get the site in which a host is located.""" if 'eqiad' in str(host): return 'eqiad' if 'codfw' in str(host): return 'codfw' raise ValueError('Site is unknown for {host}.'.format(host=host)) remote = spicerack.remote() prometheus = spicerack.prometheus() remote_host = remote.query('wdqs2008.codfw.wmnet') host = remote_host.hosts[0].split(".")[0] query = "scalar(time() - blazegraph_lastupdated{instance='%s:9193'})" % host result = prometheus.query(query, site(remote_host)) last_updated = int(result[1]) if last_updated > 1200: raise ValueError("Let's wait for updater to catch up, current last_updated of {} is too high.".format(last_updated)) Snippet used to diagnose the above issue without having to actually run the cookbook TASK DETAIL https://phabricator.wikimedia.org/T280108 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: RKemper Cc: RKemper, Gehel, Aklapper, Invadibot, MPhamWMF, maantietaja, Alter-paule, Beast1978, CBogen, Un1tY, Akuckartz, Hook696, Kent7301, joker88john, CucyNoiD, Nandana, Namenlos314, Gaboe420, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, Bsandipan, Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, EBjune, merbst, LawExplorer, Lewizho99, Maathavan, _jensen, rosalieper, Scott_WUaS, Jonas, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs