Skip to content

Instantly share code, notes, and snippets.

@jamur2
Last active November 9, 2015 22:13
Show Gist options
  • Save jamur2/89ac077c721af2947fa6 to your computer and use it in GitHub Desktop.
Save jamur2/89ac077c721af2947fa6 to your computer and use it in GitHub Desktop.
MDash eligibility reason alerting
require 'web_smoke_test_tool'
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, phantomjs_options: ['--ignore-ssl-errors=yes'], timeout: 240)
end
Capybara.default_driver = :poltergeist
login = WebSmokeTestTool::SetupEvents::OtfLogin.new(url: 'http://monitoring-dash.va.opower.it')
login.fire
count = 0
danger_count = 0
warning_count = 0
File.open('pipelines.txt') do |file|
file.each_line do |line|
url = line.strip
Capybara.visit(url)
WebSmokeTestTool::SmokeTest.wait_for_network
dangers = Capybara.page.all('.text-danger')
warnings = Capybara.page.all('.text-warning')
puts "#{url}: #{dangers.size} dangers, #{warnings.size} warnings"
count += 1
danger_count += 1 if dangers.size > 0
warning_count += 1 if warnings.size > 0
end
end
puts "#{danger_count}/#{count} pipelines have 'danger' errors"
puts "#{warning_count}/#{count} pipelines have 'warning' errors"
https://monitoring-dash.va.opower.it/pipelines/80e28a0a-1d9a-4254-a093-159e62230b24/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/f2da43d5-fa8f-41a1-a139-3742c48d9548/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/a01ca7cb-1fb0-4e9f-972a-bcf353a42c1b/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/5cb0c830-7587-49a2-b938-cfb15ec2b0f4/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/d412a445-d46f-449a-8c43-9f7f5f412d06/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/cf79ae43-d41d-4cb4-9ee1-255869bcf6b6/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/6c76b77d-4271-467f-b27b-92ba3db84dfc/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/42075729-4e9b-47ea-9169-49d15c8b6115/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/d36da44c-b1c5-46b5-b974-fd82d5f1a5f2/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/59b3fc43-d3da-4ee9-8cd6-a05840826b64/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/684d5c7e-9994-49bc-94af-49e6db7ffd0e/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/f1e7c320-407a-4acf-bd4f-fefd26aa1cff/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/3fce614b-b970-4b3c-87d5-e5eab4dfae13/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/08c69434-46fd-4450-8407-1cceede81d6a/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/83687472-67e3-43a4-8c67-9772e363133c/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/87a30420-4a6e-44a5-8313-125f673e92b5/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/6c2dbadc-fd56-4260-9654-437afbcd37f0/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/d5614a31-c5ed-4d9f-8cde-23d1d1dd70a5/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/fe3cc21d-5714-4e71-9c43-7dd363f5aa43/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/9fd22a30-53db-42db-b5b3-471f0520577d/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/80063ee5-1f1d-4c14-8f45-9043ed6707b0/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/fcfdbb17-2ee3-4977-be58-a4fb5d360997/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/1ae9a2fe-1ef0-40c4-9ad2-0ff0a6a24319/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/041083e7-df0c-42b7-8948-ed29574a961f/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/4c2a08b0-592f-4cdd-8d73-079676f77cd6/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/97b5a62c-4a36-4cb0-a6f9-3ff2679ff9cb/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/317f6604-5811-4c41-a51c-7e6b6ad8bc33/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/90dc24e6-af6a-46c6-bdd0-947cb4f35ae9/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/c04e79f4-0744-4523-be82-468f393a38b2/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/377d5dc3-4ee8-4461-bf7c-dfe37c6c9bd0/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/98fff42e-c7ef-474f-82d5-644f4dabf8a2/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/86cc38ae-8c2d-4555-b350-f7439352770a/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/e5dfec70-fd7b-44ae-b0c4-2fe09df9a53f/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/cef650e3-efc9-417c-8451-d4130eab8b4a/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/eff9f945-5888-4218-a3c0-48c60b05ec35/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/34ba38ec-176e-40a2-b18d-28f99921d593/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/2e1dbfc4-a4c3-454a-8814-ad1006ece861/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/73f8875e-9ae4-4f49-81f0-96f328b745ae/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/4a87df03-370a-43b1-8934-7eba218c0e87/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/b3b826d4-1b27-4327-a9bc-0e6f0c82ea65/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/705d0fee-4bc3-49ce-93af-108cd08e8486/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/3a7823cf-930e-4fb7-b287-39892cd36323/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/aacdd933-bfcc-41c6-b061-587b83906760/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/5e8b0064-7929-4359-b7b1-dceb1f9ac6cd/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/188b53aa-99e1-4689-92b8-7882f28b9a50/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/1e3ba703-da77-4ee4-9ba8-ff18909be764/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/5f4d4628-9490-467c-869c-8ef026bd5470/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/2ec59a45-a5ec-4b6a-b219-f4597c3b93fc/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/fbd61f4b-9694-42e8-b191-5d23b31f86fb/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/f94f43eb-966f-467a-9fc1-da018fb4d1ae/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/05c8e351-2d29-491c-ad94-a1a7e964befc/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/0d3db3f9-00ec-4abf-92f9-f60b0e395ab7/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/47e139c3-d3a7-44f8-b737-76914b16e38c/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/73d1ed02-9b14-4353-9e41-d3dc484f9549/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/2fe5e327-110f-44e0-a73b-526615a356b8/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/6207cdfe-e33b-4b35-8e5f-088c0780a3a4/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/81082914-095d-40e8-b78f-24d8ef4fb5df/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/5608cdab-74ca-40ef-9d58-c66df1136424/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/814813e6-46d5-4365-b580-2ed08b26a352/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/a3edc302-c649-4812-8c5c-6e202fadf6ae/eligibility_summary
https://monitoring-dash.va.opower.it/pipelines/80e28a0a-1d9a-4254-a093-159e62230b24/eligibility_summary: 0 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/f2da43d5-fa8f-41a1-a139-3742c48d9548/eligibility_summary: 0 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/a01ca7cb-1fb0-4e9f-972a-bcf353a42c1b/eligibility_summary: 0 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/5cb0c830-7587-49a2-b938-cfb15ec2b0f4/eligibility_summary: 0 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/d412a445-d46f-449a-8c43-9f7f5f412d06/eligibility_summary: 0 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/cf79ae43-d41d-4cb4-9ee1-255869bcf6b6/eligibility_summary: 0 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/6c76b77d-4271-467f-b27b-92ba3db84dfc/eligibility_summary: 0 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/42075729-4e9b-47ea-9169-49d15c8b6115/eligibility_summary: 0 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/d36da44c-b1c5-46b5-b974-fd82d5f1a5f2/eligibility_summary: 0 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/59b3fc43-d3da-4ee9-8cd6-a05840826b64/eligibility_summary: 0 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/684d5c7e-9994-49bc-94af-49e6db7ffd0e/eligibility_summary: 2 dangers, 2 warnings
https://monitoring-dash.va.opower.it/pipelines/f1e7c320-407a-4acf-bd4f-fefd26aa1cff/eligibility_summary: 3 dangers, 3 warnings
https://monitoring-dash.va.opower.it/pipelines/3fce614b-b970-4b3c-87d5-e5eab4dfae13/eligibility_summary: 9 dangers, 4 warnings
https://monitoring-dash.va.opower.it/pipelines/08c69434-46fd-4450-8407-1cceede81d6a/eligibility_summary: 4 dangers, 3 warnings
https://monitoring-dash.va.opower.it/pipelines/83687472-67e3-43a4-8c67-9772e363133c/eligibility_summary: 3 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/87a30420-4a6e-44a5-8313-125f673e92b5/eligibility_summary: 4 dangers, 2 warnings
https://monitoring-dash.va.opower.it/pipelines/6c2dbadc-fd56-4260-9654-437afbcd37f0/eligibility_summary: 10 dangers, 5 warnings
https://monitoring-dash.va.opower.it/pipelines/d5614a31-c5ed-4d9f-8cde-23d1d1dd70a5/eligibility_summary: 5 dangers, 2 warnings
https://monitoring-dash.va.opower.it/pipelines/fe3cc21d-5714-4e71-9c43-7dd363f5aa43/eligibility_summary: 4 dangers, 3 warnings
https://monitoring-dash.va.opower.it/pipelines/9fd22a30-53db-42db-b5b3-471f0520577d/eligibility_summary: 4 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/80063ee5-1f1d-4c14-8f45-9043ed6707b0/eligibility_summary: 5 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/fcfdbb17-2ee3-4977-be58-a4fb5d360997/eligibility_summary: 9 dangers, 6 warnings
https://monitoring-dash.va.opower.it/pipelines/1ae9a2fe-1ef0-40c4-9ad2-0ff0a6a24319/eligibility_summary: 5 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/041083e7-df0c-42b7-8948-ed29574a961f/eligibility_summary: 3 dangers, 4 warnings
https://monitoring-dash.va.opower.it/pipelines/4c2a08b0-592f-4cdd-8d73-079676f77cd6/eligibility_summary: 4 dangers, 2 warnings
https://monitoring-dash.va.opower.it/pipelines/97b5a62c-4a36-4cb0-a6f9-3ff2679ff9cb/eligibility_summary: 4 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/317f6604-5811-4c41-a51c-7e6b6ad8bc33/eligibility_summary: 8 dangers, 4 warnings
https://monitoring-dash.va.opower.it/pipelines/90dc24e6-af6a-46c6-bdd0-947cb4f35ae9/eligibility_summary: 3 dangers, 2 warnings
https://monitoring-dash.va.opower.it/pipelines/c04e79f4-0744-4523-be82-468f393a38b2/eligibility_summary: 3 dangers, 5 warnings
https://monitoring-dash.va.opower.it/pipelines/377d5dc3-4ee8-4461-bf7c-dfe37c6c9bd0/eligibility_summary: 4 dangers, 2 warnings
https://monitoring-dash.va.opower.it/pipelines/98fff42e-c7ef-474f-82d5-644f4dabf8a2/eligibility_summary: 4 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/86cc38ae-8c2d-4555-b350-f7439352770a/eligibility_summary: 5 dangers, 9 warnings
https://monitoring-dash.va.opower.it/pipelines/e5dfec70-fd7b-44ae-b0c4-2fe09df9a53f/eligibility_summary: 3 dangers, 3 warnings
https://monitoring-dash.va.opower.it/pipelines/cef650e3-efc9-417c-8451-d4130eab8b4a/eligibility_summary: 7 dangers, 3 warnings
https://monitoring-dash.va.opower.it/pipelines/eff9f945-5888-4218-a3c0-48c60b05ec35/eligibility_summary: 2 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/34ba38ec-176e-40a2-b18d-28f99921d593/eligibility_summary: 1 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/2e1dbfc4-a4c3-454a-8814-ad1006ece861/eligibility_summary: 7 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/73f8875e-9ae4-4f49-81f0-96f328b745ae/eligibility_summary: 10 dangers, 3 warnings
https://monitoring-dash.va.opower.it/pipelines/4a87df03-370a-43b1-8934-7eba218c0e87/eligibility_summary: 2 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/b3b826d4-1b27-4327-a9bc-0e6f0c82ea65/eligibility_summary: 1 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/705d0fee-4bc3-49ce-93af-108cd08e8486/eligibility_summary: 1 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/3a7823cf-930e-4fb7-b287-39892cd36323/eligibility_summary: 0 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/aacdd933-bfcc-41c6-b061-587b83906760/eligibility_summary: 1 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/5e8b0064-7929-4359-b7b1-dceb1f9ac6cd/eligibility_summary: 5 dangers, 5 warnings
https://monitoring-dash.va.opower.it/pipelines/188b53aa-99e1-4689-92b8-7882f28b9a50/eligibility_summary: 7 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/1e3ba703-da77-4ee4-9ba8-ff18909be764/eligibility_summary: 2 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/5f4d4628-9490-467c-869c-8ef026bd5470/eligibility_summary: 1 dangers, 10 warnings
https://monitoring-dash.va.opower.it/pipelines/2ec59a45-a5ec-4b6a-b219-f4597c3b93fc/eligibility_summary: 3 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/fbd61f4b-9694-42e8-b191-5d23b31f86fb/eligibility_summary: 2 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/f94f43eb-966f-467a-9fc1-da018fb4d1ae/eligibility_summary: 6 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/05c8e351-2d29-491c-ad94-a1a7e964befc/eligibility_summary: 7 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/0d3db3f9-00ec-4abf-92f9-f60b0e395ab7/eligibility_summary: 5 dangers, 2 warnings
https://monitoring-dash.va.opower.it/pipelines/47e139c3-d3a7-44f8-b737-76914b16e38c/eligibility_summary: 4 dangers, 2 warnings
https://monitoring-dash.va.opower.it/pipelines/73d1ed02-9b14-4353-9e41-d3dc484f9549/eligibility_summary: 5 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/2fe5e327-110f-44e0-a73b-526615a356b8/eligibility_summary: 6 dangers, 3 warnings
https://monitoring-dash.va.opower.it/pipelines/6207cdfe-e33b-4b35-8e5f-088c0780a3a4/eligibility_summary: 8 dangers, 0 warnings
https://monitoring-dash.va.opower.it/pipelines/81082914-095d-40e8-b78f-24d8ef4fb5df/eligibility_summary: 12 dangers, 1 warnings
https://monitoring-dash.va.opower.it/pipelines/5608cdab-74ca-40ef-9d58-c66df1136424/eligibility_summary: 7 dangers, 3 warnings
https://monitoring-dash.va.opower.it/pipelines/814813e6-46d5-4365-b580-2ed08b26a352/eligibility_summary: 2 dangers, 3 warnings
https://monitoring-dash.va.opower.it/pipelines/a3edc302-c649-4812-8c5c-6e202fadf6ae/eligibility_summary: 8 dangers, 3 warnings
49/60 pipelines have 'danger' errors
45/60 pipelines have 'warning' errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment