From ff183beb663cf0d9c18eaa1702cd4b104d2c1716 Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Wed, 3 Feb 2021 09:42:55 -0700 Subject: [PATCH 1/7] Add repair size information to health checker --- setup-scripts/health-checker.py | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/setup-scripts/health-checker.py b/setup-scripts/health-checker.py index 380e3d77..2ed208de 100755 --- a/setup-scripts/health-checker.py +++ b/setup-scripts/health-checker.py @@ -242,7 +242,12 @@ def contains_string(string_to_check, string_to_find): async def check_alerts(): print("\nChecking portal siad alerts...") - # Execute siac alerts and read the response + ################################################################################ + # parse siac + ################################################################################ + + # Alerts + # Execute 'siac alerts' and read the response cmd_string = "docker exec {} siac alerts".format(CONTAINER_NAME) siac_alert_output = os.popen(cmd_string).read().strip() @@ -277,6 +282,23 @@ async def check_alerts(): if contains_string(line, health_of): siafile_alerts.append(line) + # Repair Size + # Execute 'siac renter' and read the response + cmd_string = "docker exec {} siac renter".format(CONTAINER_NAME) + siac_alert_output = os.popen(cmd_string).read().strip() + + # Initialize variables + repair_remaining = '' + + # Pattern strings to search for + repair_str = 'Repair Data Remaining' + + # Split the output by line and check for the repair remaining + for line in siac_alert_output.split("\n"): + # Check for the type of alert + if contains_string(line, repair_str): + repair_remaining = line.split()[1]: + ################################################################################ # create a message ################################################################################ @@ -295,6 +317,9 @@ async def check_alerts(): num_warning_alerts -= num_siafile_alerts message += "{} Warning Alerts found. ".format(num_warning_alerts) message += "{} SiaFiles with bad health found. ".format(num_siafile_alerts) + + # Add repair size + message += "{} of repair remaining. ".format(repair_remaining) # send a message if we force notification, or just once daily (heartbeat) # on 1 AM From 50dff35da8d48823e72c0a304942b76d6e0a2ed7 Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Wed, 3 Feb 2021 10:22:24 -0700 Subject: [PATCH 2/7] Update setup-scripts/health-checker.py Co-authored-by: Marcin S. --- setup-scripts/health-checker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-scripts/health-checker.py b/setup-scripts/health-checker.py index 2ed208de..f849cfb6 100755 --- a/setup-scripts/health-checker.py +++ b/setup-scripts/health-checker.py @@ -285,7 +285,7 @@ async def check_alerts(): # Repair Size # Execute 'siac renter' and read the response cmd_string = "docker exec {} siac renter".format(CONTAINER_NAME) - siac_alert_output = os.popen(cmd_string).read().strip() + siac_renter_output = os.popen(cmd_string).read().strip() # Initialize variables repair_remaining = '' From c752a17058ce2dcc2accba96450529eb755447de Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Wed, 3 Feb 2021 10:30:27 -0700 Subject: [PATCH 3/7] Update setup-scripts/health-checker.py --- setup-scripts/health-checker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-scripts/health-checker.py b/setup-scripts/health-checker.py index f849cfb6..af6202a2 100755 --- a/setup-scripts/health-checker.py +++ b/setup-scripts/health-checker.py @@ -294,7 +294,7 @@ async def check_alerts(): repair_str = 'Repair Data Remaining' # Split the output by line and check for the repair remaining - for line in siac_alert_output.split("\n"): + for line in siac_renter_output.split("\n"): # Check for the type of alert if contains_string(line, repair_str): repair_remaining = line.split()[1]: From 85366d5307565d811bef9eab674f5d08da5dfdad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 10:16:16 +0000 Subject: [PATCH 4/7] Bump gatsby-plugin-react-helmet from 3.9.0 to 3.10.0 in /packages/webapp Bumps [gatsby-plugin-react-helmet](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-react-helmet) from 3.9.0 to 3.10.0. - [Release notes](https://github.com/gatsbyjs/gatsby/releases) - [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-react-helmet/CHANGELOG.md) - [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-react-helmet@3.10.0/packages/gatsby-plugin-react-helmet) Signed-off-by: dependabot[bot] --- packages/webapp/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webapp/package.json b/packages/webapp/package.json index 431da832..a86b2e50 100644 --- a/packages/webapp/package.json +++ b/packages/webapp/package.json @@ -12,7 +12,7 @@ "gatsby-image": "2.10.0", "gatsby-plugin-manifest": "2.11.0", "gatsby-plugin-matomo": "0.9.0", - "gatsby-plugin-react-helmet": "3.9.0", + "gatsby-plugin-react-helmet": "3.10.0", "gatsby-plugin-remove-serviceworker": "1.0.0", "gatsby-plugin-robots-txt": "1.5.5", "gatsby-plugin-sass": "3.1.0", From 0c0344b9d497654cba2546c4e11435c03240da27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 10:22:48 +0000 Subject: [PATCH 5/7] Bump gatsby-image from 2.10.0 to 2.11.0 in /packages/webapp Bumps [gatsby-image](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-image) from 2.10.0 to 2.11.0. - [Release notes](https://github.com/gatsbyjs/gatsby/releases) - [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-image/CHANGELOG.md) - [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-image@2.11.0/packages/gatsby-image) Signed-off-by: dependabot[bot] --- packages/webapp/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webapp/package.json b/packages/webapp/package.json index 431da832..206caa68 100644 --- a/packages/webapp/package.json +++ b/packages/webapp/package.json @@ -9,7 +9,7 @@ "classnames": "2.2.6", "fontsource-metropolis": "4.0.0", "gatsby": "2.31.1", - "gatsby-image": "2.10.0", + "gatsby-image": "2.11.0", "gatsby-plugin-manifest": "2.11.0", "gatsby-plugin-matomo": "0.9.0", "gatsby-plugin-react-helmet": "3.9.0", From 2cdcc8ebee0f31dcdfb9ddd874b912153e5ce8eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 10:28:16 +0000 Subject: [PATCH 6/7] Bump lint-staged from 10.5.3 to 10.5.4 in /packages/webapp Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.5.3 to 10.5.4. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](https://github.com/okonet/lint-staged/compare/v10.5.3...v10.5.4) Signed-off-by: dependabot[bot] --- packages/webapp/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webapp/package.json b/packages/webapp/package.json index 431da832..3500cec4 100644 --- a/packages/webapp/package.json +++ b/packages/webapp/package.json @@ -41,7 +41,7 @@ "eslint-plugin-cypress": "2.11.2", "eslint-plugin-react": "7.22.0", "husky": "4.3.8", - "lint-staged": "10.5.3", + "lint-staged": "10.5.4", "prettier": "2.2.1" }, "keywords": [ From 491e8ae11153251b3688a2c2f32e26522bc04589 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 14:03:38 +0000 Subject: [PATCH 7/7] Bump gatsby from 2.31.1 to 2.32.3 in /packages/webapp Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.31.1 to 2.32.3. - [Release notes](https://github.com/gatsbyjs/gatsby/releases) - [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md) - [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.31.1...gatsby@2.32.3) Signed-off-by: dependabot[bot] --- packages/webapp/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webapp/package.json b/packages/webapp/package.json index c525ea45..e1123922 100644 --- a/packages/webapp/package.json +++ b/packages/webapp/package.json @@ -8,7 +8,7 @@ "bytes": "3.1.0", "classnames": "2.2.6", "fontsource-metropolis": "4.0.0", - "gatsby": "2.31.1", + "gatsby": "2.32.3", "gatsby-image": "2.11.0", "gatsby-plugin-manifest": "2.11.0", "gatsby-plugin-matomo": "0.9.0",