Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"tiup cluster check --format json" does not return valid json result #1719

Closed
jiayang-zheng opened this issue Jan 11, 2022 · 0 comments · Fixed by #1720
Closed

"tiup cluster check --format json" does not return valid json result #1719

jiayang-zheng opened this issue Jan 11, 2022 · 0 comments · Fixed by #1720
Assignees
Labels
type/bug Categorizes issue as related to a bug.

Comments

@jiayang-zheng
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

Run "tiup cluster check" command on the console.

tiup cluster check file_beat.yaml --format json -u root -p

  1. What did you expect to see?
    Get the json about the check result.
    Node Check Result Message

172.16.5.168 os-version Pass OS is CentOS Linux 7 (Core) 7.6.1810
172.16.5.168 cpu-cores Pass number of CPU cores / threads: 8
172.16.5.168 cpu-governor Warn Unable to determine current CPU frequency governor policy
172.16.5.168 swap Fail swap is enabled, please disable it for best performance
172.16.5.168 memory Pass memory size is 16384MB
172.16.5.168 disk Warn mount point /home does not have 'noatime' option set
172.16.5.168 disk Warn mount point /home does not have 'noatime' option set
172.16.5.168 selinux Pass SELinux is disabled
172.16.5.168 thp Pass THP is disabled
172.16.5.168 command Fail numactl not usable, bash: numactl: command not found

  1. What did you see instead?
    Some useless info in json, but without the result.
    {"prefix":" - Checking node 172.16.5.168","suffix":"CheckSys: host=172.16.5.168 type=service"}
    {"prefix":" - Checking node 172.16.5.168","suffix":"CheckSys: host=172.16.5.168 type=package"}
    {"prefix":" - Checking node 172.16.5.168","mode":"done"}
    {"prefix":" - Cleanup check files on 172.16.5.168:22","suffix":"RootSSH: user=root, host=172.16.5.168, port=22"}
    {"prefix":" - Cleanup check files on 172.16.5.168:22","suffix":"Rmdir: host=172.16.5.168, directories='/tmp/tiup'"}
    {"prefix":" - Cleanup check files on 172.16.5.168:22","suffix":"RootSSH: user=root, host=172.16.5.168, port=22"}
    {"prefix":" - Cleanup check files on 172.16.5.168:22","suffix":"Rmdir: host=172.16.5.168, directories='/tmp/tiup'"}
    {"prefix":" - Cleanup check files on 172.16.5.168:22","suffix":"RootSSH: user=root, host=172.16.5.168, port=22"}
    {"prefix":" - Cleanup check files on 172.16.5.168:22","suffix":"Rmdir: host=172.16.5.168, directories='/tmp/tiup'"}
    {"prefix":" - Cleanup check files on 172.16.5.168:22","mode":"done"}
    {"prefix":" - Cleanup check files on 172.16.5.168:22","mode":"done"}
    {"prefix":" - Cleanup check files on 172.16.5.168:22","mode":"done"}
    Node Check Result Message

172.16.5.168 os-version Pass OS is CentOS Linux 7 (Core) 7.6.1810
172.16.5.168 cpu-cores Pass number of CPU cores / threads: 8
172.16.5.168 cpu-governor Warn Unable to determine current CPU frequency governor policy
172.16.5.168 swap Fail swap is enabled, please disable it for best performance
172.16.5.168 memory Pass memory size is 16384MB
172.16.5.168 disk Warn mount point /home does not have 'noatime' option set
172.16.5.168 disk Warn mount point /home does not have 'noatime' option set
172.16.5.168 selinux Pass SELinux is disabled
172.16.5.168 thp Pass THP is disabled
172.16.5.168 command Fail numactl not usable, bash: numactl: command not found
{"exit_code":0}

  1. What version of TiUP are you using (tiup --version)?
    1.8.1 tiup
    Go Version: go1.17.5
    Git Ref: v1.8.1
    GitHash: 559b99d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Categorizes issue as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants