From 386c99972018a9e2ff66e0bf25951e7bfb8e53d1 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Thu, 19 Nov 2026 15:26:20 -0500 Subject: [PATCH] deploy(ldap): keep the vd03 cutover helpers (otelgrep, sb-cli) for the QA run --- docs/deploy/2026-11-19-vd03-nam-ldap/otelgrep.py | 13 +++++++++++++ docs/deploy/2026-11-19-vd03-nam-ldap/sb-cli.sh | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 docs/deploy/2026-11-19-vd03-nam-ldap/otelgrep.py create mode 100755 docs/deploy/2026-11-19-vd03-nam-ldap/sb-cli.sh diff --git a/docs/deploy/2026-11-19-vd03-nam-ldap/otelgrep.py b/docs/deploy/2026-11-19-vd03-nam-ldap/otelgrep.py new file mode 100644 index 0000000..29aed29 --- /dev/null +++ b/docs/deploy/2026-11-19-vd03-nam-ldap/otelgrep.py @@ -0,0 +1,13 @@ +# usage: python3 otelgrep.py +import json,sys,re +svcpat=re.compile(sys.argv[2]); pat=re.compile(sys.argv[3],re.I) +for line in open(sys.argv[1]): + try: d=json.loads(line) + except: continue + for rl in d.get('resourceLogs',[]): + svc=next((a['value'].get('stringValue') for a in rl['resource'].get('attributes',[]) if a['key']=='service.name'),'?') + if not svcpat.search(svc): continue + for sl in rl.get('scopeLogs',[]): + for r in sl.get('logRecords',[]): + body=r.get('body',{}).get('stringValue','') + if pat.search(body): print(svc,r.get('timeUnixNano','')[:10],r.get('severityText'),'|',body[:260]) diff --git a/docs/deploy/2026-11-19-vd03-nam-ldap/sb-cli.sh b/docs/deploy/2026-11-19-vd03-nam-ldap/sb-cli.sh new file mode 100755 index 0000000..b835d08 --- /dev/null +++ b/docs/deploy/2026-11-19-vd03-nam-ldap/sb-cli.sh @@ -0,0 +1,4 @@ +#!/bin/zsh +# usage: sb-cli.sh e.g. sb-cli.sh http://wonder-app-vq03.zmr.zimmer.com:8085 --username dohertj2 --password-file --format json instance list +# Needs the CLI built once: dotnet build ~/Desktop/ScadaBridge/src/ZB.MOM.WW.ScadaBridge.CLI -o ~/.cache/sb-cli +url=$1; shift; exec dotnet ~/.cache/sb-cli/scadabridge.dll --url $url "$@"