Closed pjhill closed 3 years ago
Just saw this @pjhill.
I've FWD'd you an email w/ the script, more info on what it does, etc...
I just sent Boris the following email:
Holden Hinkle holden.hinkle@oddball.io 10:55 AM (8 minutes ago) to Yu.Ning, Peter
Hi Boris,
I'm working on adapting your DSLogon monitor script to a synthetic monitor for VA.gov (see ticket #24353).
I have your script, but I'm missing the following local modules it requires:
const config = require('./src/config'); const listener = require('./src/page-listener'); const statuspageio = require('./src/statuspage');
Are you able to email them to me?
Thanks, and all the best,
Holden
Repo for the script while I'm converting it - https://github.com/department-of-veterans-affairs/dslogon-monitor-script
Boris emailed me the link to the repo with those missing files - https://github.com/department-of-veterans-affairs/monitor-dslogon
I refactored the script to use synthetics instead of puppeteer - https://github.com/department-of-veterans-affairs/dslogon-monitor-script/blob/master/index.js
Now we need the DSLogon account...
I asked Dror if he might be able to help us get a DSLogon account - https://dsva.slack.com/archives/C01CHAY3ULR/p1626366012314000?thread_ts=1626204805.284200&cid=C01CHAY3ULR
Unfortunately, we can't get an account for DSLogon.
https://dslogon.statuspage.io/ relies on https://api.va.gov/v0/backend_statuses which has a status for DSLogon.
Here's an example:
{"service":"DS Logon","service_id":"dslogon","status":"active","last_incident_timestamp":"2021-07-13T22:25:57.000+00:00"}
Dror:
So they just look at the success rate of people logging in with DSLogon. Let's go ahead and use that approach.
Write canary script to throw error when dslogon status is not active
- https://github.com/department-of-veterans-affairs/dslogon-monitor-script/blob/master/status.js
Unfortunately, I still can't create a canary - https://dsva.slack.com/archives/CBU0KDSB1/p1626378419165800?thread_ts=1625067149.442700&cid=CBU0KDSB1
I was able to create the Canary. It didn't work on the first run and I realized I had to promisify the https request so I did a quick refactor. It works now:
Here's the script - https://github.com/department-of-veterans-affairs/dslogon-monitor-script/blob/master/status.js
I handed this off to Ops - https://github.com/department-of-veterans-affairs/va.gov-team/issues/27520
Ops ticket is still open. Let's monitor that and close this ticket when Ops resolves the PagerDuty integration.
PagerDuty integration is complete.
The original ticket title was "Create Synthetic Monitoring Test for DSLogon Flow".
This ticket was repurposed because we discovered we can't get a DSLogon account.
Issue Description
Original description: Per request from Dror, we would like to add a test to our suite of synthetic monitoring --
New description: Because we can't get a DSLogon account which is required to run Boris' test, Dror asked us to create a canary that monitors the status of DSLogon as reported by this url - https://api.va.gov/v0/backend_statuses
Tasks
Acceptance Criteria
[x] Platform Operations team has been supplied with a functioning test script that uses DSLogon to verify the platform is functioning as intended