Description
It would be nice to be able to inspect the system quickly and easily, certainly without having to fire up a shell.
Definition of Done
Dependencies
Comments
This could roll into the next project on open telemetry.
It would be useful to have shared error monitoring in SAFEHR rather than done separately for individual projects.
Suggested implementation
Mount the waveform-export and waveform-saved-messages directories read-only into the emap streamlit container. Remember that waveform-export is not a part of Emap and neither directory is guaranteed to have any contents.
Make a new streamlit page that has controls on it for date, hour, variable, maybe bed.
For HL7 monitoring
A query method with caching (careful not to cache current data that is fast changing...) that takes the above parameters and does a query along the lines of:
find waveform-save-messages/${date}*/${bed}/ -name '*.bz' perl -pe 's/\r/\n/g' | grep -Po 'NM\|\d+\|' | sort | uniq -c
(you could use pure python instead)
The purpose is to see at a glance what types of data were coming through at various times. I think a common use case is wanting to know what is coming through right now.
For export pipeline monitoring
Something in a similar spirit to the above but in the waveform-export directory.
To check for errors, you could compare the number of files in original-csv vs pseudonymised vs ftps-logs, or you could scan the snakemake log file.
Description
It would be nice to be able to inspect the system quickly and easily, certainly without having to fire up a shell.
Definition of Done
Dependencies
Comments
This could roll into the next project on open telemetry.
It would be useful to have shared error monitoring in SAFEHR rather than done separately for individual projects.
Suggested implementation
Mount the
waveform-exportandwaveform-saved-messagesdirectories read-only into the emap streamlit container. Remember thatwaveform-exportis not a part of Emap and neither directory is guaranteed to have any contents.Make a new streamlit page that has controls on it for date, hour, variable, maybe bed.
For HL7 monitoring
A query method with caching (careful not to cache current data that is fast changing...) that takes the above parameters and does a query along the lines of:
(you could use pure python instead)
The purpose is to see at a glance what types of data were coming through at various times. I think a common use case is wanting to know what is coming through right now.
For export pipeline monitoring
Something in a similar spirit to the above but in the
waveform-exportdirectory.To check for errors, you could compare the number of files in
original-csvvspseudonymisedvsftps-logs, or you could scan the snakemake log file.