Skip to content

Extract druids from Honeybadger alerts

Justin Littman edited this page Jan 9, 2023 · 1 revision

The prescat dashboard reports errors, but doesn't currently allow you to identify the relevant Druids for those errors. However you can use HoneyBadger's export feature to isolate a given set of errors. The first step is to find the error in HoneyBadger, and the click on export which will send a download URL to your email address. The data is in JSONL format (line-oriented-JSON) where each line is a valid JSON object. You can use your favorite scripting language or jq to extract the Druids.

jq -r .message 54415-da6b15c3-ca6a-401e-b198-654f8497620e.jsonl
RuntimeError: Moab version does not exist: /pres-01/sdr2objects/ct/037/py/6297/ct037py6297/v0001
RuntimeError: Moab version does not exist: /pres-01/sdr2objects/ct/016/xw/7233/ct016xw7233/v0001
RuntimeError: Moab version does not exist: /pres-01/sdr2objects/cs/694/fg/3382/cs694fg3382/v0001
RuntimeError: Moab version does not exist: /pres-01/sdr2objects/cs/946/tq/9012/cs946tq9012/v0001
RuntimeError: Moab version does not exist: /pres-01/sdr2objects/cs/914/gs/0092/cs914gs0092/v0001

or if you prefer:

jq -r '.message | split("/")[-2]' 54415-da6b15c3-ca6a-401e-b198-654f8497620e.jsonl
ct037py6297
ct016xw7233
cs694fg3382
cs946tq9012
cs914gs0092
Clone this wiki locally