alan-turing-institute / data-safe-haven

https://data-safe-haven.readthedocs.io
BSD 3-Clause "New" or "Revised" License
50 stars 14 forks source link

Move log analytics to SRE #1928

Closed jemrobinson closed 2 weeks ago

jemrobinson commented 3 weeks ago

:white_check_mark: Checklist

:vertical_traffic_light: Depends on

n/a

:arrow_heading_up: Summary

:closed_umbrella: Related issues

Closes #1905

:microscope: Tests

Tested on a fresh SHM/SRE deployment

github-actions[bot] commented 3 weeks ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  data_safe_haven/commands
  sre.py
  data_safe_haven/infrastructure/common
  ip_ranges.py
  data_safe_haven/infrastructure/components/composite
  virtual_machine.py 39-43, 96-97, 133-134, 241, 278-292
  data_safe_haven/infrastructure/programs
  declarative_shm.py
  declarative_sre.py 327
  data_safe_haven/infrastructure/programs/shm
  networking.py
  data_safe_haven/infrastructure/programs/sre
  data.py 69
  dns_server.py 287-301
  gitea_server.py
  hedgedoc_server.py
  monitoring.py 32-35, 49-214
  networking.py 65, 80, 162, 849, 1467, 1792, 1857
  user_services.py
  workspaces.py 57-58
  data_safe_haven/types
  enums.py
Project Total  

This report was generated by python-coverage-comment-action

craddm commented 2 weeks ago

From a test deployment, this is mostly working except for the final step - ingesting logs from the DCR to the log workspace using Diagnostic Settings - So the logs aren't currently being ingested.

jemrobinson commented 2 weeks ago

What I found yesterday was that you don't need the diagnostic setting, but you do need to wait for a while (docs suggest 20 minutes).

craddm commented 2 weeks ago

Ok, will check back later. 40 mins so far and not connected.

jemrobinson commented 2 weeks ago

@craddm : I agree, it's still not connected. I've captured this in #1931 as I think it's beyond the scope of this PR. Are you happy with it otherwise?