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 "$@"