Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

get all .md reports at once #115

Merged
merged 7 commits into from
Dec 6, 2018
Merged

Conversation

Nastradamus
Copy link
Contributor

No description provided.

@Nastradamus Nastradamus changed the title [WIP] get all .md reports at once get all .md reports at once Dec 5, 2018
check Outdated
if [[ "${KERNEL_NAME}" = "Darwin" ]]; then
err "${OS_NAME}: 'brew install coreutils'"
elif [[ "${KERNEL_NAME}" = "Linux" ]]; then
err "Ubuntu or Debian GNU/${OS_NAME}: 'apt-get install coreutils'"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sudo apt-get ...?

and RHEL/CentOS: 'sudo yum install ...' ?

check Outdated
elif [[ "${KERNEL_NAME}" = "Linux" ]]; then
err "Ubuntu or Debian GNU/${OS_NAME}: 'apt-get install coreutils'"
fi
return 2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 2 here? maybe it's worth to document the meaning of every returned value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's woth it, because error reporting handler will show function name and even the line number of error: easy to understand "what's happening".

@NikolayS
Copy link
Collaborator

NikolayS commented Dec 5, 2018

This looks awesome!

One thing -- it looks like the current code doesn't check jq well:

$ ./check -h db2.XXX --project test -U XXX -e 1
[2018-12-05T11:53:51-0500]
[2018-12-05T11:53:51-0500] ########## Perform checks for host 'db2':
[2018-12-05T11:53:51-0500]
[2018-12-05T11:53:51-0500] ========== Perform check: ==========
[2018-12-05T11:53:51-0500] ./resources/checks/A001_system_info.sh
./resources/checks/A001_system_info.sh: line 78: jq: command not found
[2018-12-05T11:53:55-0500] ========== End of check ===========
[2018-12-05T11:53:55-0500] WARNING: check 'A001' failed with error ^^^
[2018-12-05T11:53:55-0500]
[2018-12-05T11:53:55-0500] ========== Perform check: ==========
[2018-12-05T11:53:55-0500] ./resources/checks/A002_pgversion.sh
[2018-12-05T11:53:55-0500] ========== End of check ===========
[2018-12-05T11:53:55-0500] check 'A002' is finished
./check: line 775: jq: command not found

@Nastradamus
Copy link
Contributor Author

Fixed all commented things.

@Nastradamus Nastradamus merged commit 66d5864 into master Dec 6, 2018
@NikolayS NikolayS deleted the 85-get-all-md-reports-at-once branch December 7, 2018 15:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants