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

Vatz healthchecker #190

Merged
merged 11 commits into from
Jul 22, 2022
Merged

Vatz healthchecker #190

merged 11 commits into from
Jul 22, 2022

Conversation

kim201212
Copy link
Member

1. Type of change

Please delete options that are not relevant.

  • New feature
  • Enhancement
  • Bug/fix (non-breaking change which fixes an issue)
  • others (anything other than above)

2. Summary

Please include a summary of the changes and which issue is fixed or solved.

Related: # (issue)

related #166

Summary

vatz healthchecker


3. Comments

Please, leave a comments if there's further action that requires.

Enter in cron format to the config file

  1. When you want it once
  health_checker_schedule:
    - "* 1 * * *"
  1. When you want it many times
  health_checker_schedule:
    - "* 1 * * *"
    - "* 2 * * *"
    - "* 3 * * *"

@xellos00
Copy link
Member

@kim201212
Can you give me example how would I set this if I want to run this

  • every 5 hour ?
  • everyday at 5:00 PM?

@kim201212
Copy link
Member Author

@kim201212 Can you give me example how would I set this if I want to run this

  • every 5 hour ?
  • everyday at 5:00 PM?

The time standard is UTC.

every 5 hours :

 health_checker_schedule:
    - "* */5 * * *"

everyday at 5:00 PM :

 health_checker_schedule:
    - "0 17 * * *"

@xellos00
Copy link
Member

xellos00 commented Jul 20, 2022

@kim201212 Can you give me example how would I set this if I want to run this

  • every 5 hour ?
  • everyday at 5:00 PM?

The time standard is UTC.

every 5 hours :

 health_checker_schedule:
    - "* */5 * * *"

everyday at 5:00 PM :

 health_checker_schedule:
    - "0 17 * * *"

@kim201212
Then any reason to you want it many times?
health_checker_schedule:

  - "* 1 * * *"
  - "* 2 * * *"
  - "* 3 * * *"

@kim201212
Copy link
Member Author

@kim201212 Can you give me example how would I set this if I want to run this

  • every 5 hour ?
  • everyday at 5:00 PM?

The time standard is UTC.
every 5 hours :

 health_checker_schedule:
    - "* */5 * * *"

everyday at 5:00 PM :

 health_checker_schedule:
    - "0 17 * * *"

@kim201212 Then any reason to you want it many times? health_checker_schedule:

  - "* 1 * * *"
  - "* 2 * * *"
  - "* 3 * * *"

It was a requirement.

@xellos00 xellos00 linked an issue Jul 20, 2022 that may be closed by this pull request
3 tasks
@xellos00
Copy link
Member

xellos00 commented Jul 20, 2022

@kim201212
Got it. I assume single line expression would have better for sending verifying only VATZ is running

  • 7 Dec 2022
  • 14 Jan 2023
  • 21 Feb 2023

somewhat like this.

 "30 9 7,14,21 12,1,2"

but if you prefer like this.

  • "0 0 7 12 * "
  • "0 0 14 1 * "
  • "0 0 21 2 * "

How about give way to notify with somewhat more options?
what do you think?

cron_tab:
  - name: "health_checker_schedule"
    schedule: "0 * * * *" 
    options: 
        channel: ["discord", "slack"] 

or does it works as con_tab such as

"2 * * * *"  job1
"20 * * * *"  job2

@kim201212 kim201212 force-pushed the vatz_healthchecker branch from da7888d to 9f66f60 Compare July 20, 2022 07:17
main.go Outdated Show resolved Hide resolved
@kim201212 kim201212 requested a review from heejin-github July 20, 2022 12:54
@kim201212 kim201212 self-assigned this Jul 20, 2022
@kim201212 kim201212 added area:svc Anything related to Vatz Service. type:feature-development Any development regarding Vatz service/plugin, etc. Vatz Project Name labels Jul 20, 2022
Copy link
Member

@hqueue hqueue left a comment

Choose a reason for hiding this comment

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

Just left some comments.

main.go Outdated Show resolved Hide resolved
Copy link
Member

@heejin-github heejin-github left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@gnongs gnongs left a comment

Choose a reason for hiding this comment

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

👍🏻

Copy link
Member

@meetrick meetrick left a comment

Choose a reason for hiding this comment

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

LGTM

manager/healthcheck/healthcheck.go Show resolved Hide resolved
xellos00
xellos00 previously approved these changes Jul 22, 2022
@skonhwang
Copy link
Member

👍

@rootwarp
Copy link
Member

rootwarp@Mindhack2021 ~/g/vatz vatz_healthchecker > make build
rootwarp@Mindhack2021 ~/g/vatz vatz_healthchecker > make coverage
echo "Test Coverage script will be here"
Test Coverage script will be here
?       github.com/dsrvlabs/vatz        [no test files]
ok      github.com/dsrvlabs/vatz/manager/api    0.798s  coverage: 0.0% of statements [no tests to run]
ok      github.com/dsrvlabs/vatz/manager/config 0.456s  coverage: 94.4% of statements
ok      github.com/dsrvlabs/vatz/manager/executor       1.073s  coverage: 79.6% of statements
?       github.com/dsrvlabs/vatz/manager/healthcheck    [no test files]
?       github.com/dsrvlabs/vatz/manager/model  [no test files]
?       github.com/dsrvlabs/vatz/manager/notification   [no test files]

manager/healthcheck/healthcheck.go Outdated Show resolved Hide resolved
manager/healthcheck/healthcheck.go Outdated Show resolved Hide resolved
@xellos00 xellos00 self-requested a review July 22, 2022 04:04
@xellos00 xellos00 dismissed their stale review July 22, 2022 04:06

advanced requirements are mentioned as above

Copy link
Member

@rootwarp rootwarp left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@xellos00 xellos00 merged commit 3d2ef4d into main Jul 22, 2022
@xellos00 xellos00 deleted the vatz_healthchecker branch July 22, 2022 08:31
@xellos00 xellos00 restored the vatz_healthchecker branch July 22, 2022 08:31
@xellos00 xellos00 deleted the vatz_healthchecker branch July 22, 2022 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:svc Anything related to Vatz Service. type:feature-development Any development regarding Vatz service/plugin, etc. Vatz Project Name
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Health Checker that notify every VATZ is up and running properly.
8 participants