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

feat(notifier): add selfstate monitor #1118

Open
wants to merge 11 commits into
base: feat/add-selfstate-heartbeats
Choose a base branch
from

Conversation

almostinf
Copy link
Member

Add selfstate monitor

@almostinf almostinf changed the base branch from master to feat/add-selfstate-heartbeats November 5, 2024 13:32
@almostinf almostinf marked this pull request as ready for review November 5, 2024 15:49
@almostinf almostinf requested a review from a team as a code owner November 5, 2024 15:49

// Start moira selfstate checker
if selfstateCfg.Enabled {
fmt.Println(selfstateCfg)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
fmt.Println(selfstateCfg)

Copy link
Member Author

Choose a reason for hiding this comment

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

поправил, спасибо

LastCheckDelay: "60s",
NoticeInterval: "300s",
Selfstate: selfstateConfig{
Enabled: false,
Copy link
Member

Choose a reason for hiding this comment

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

А нужно ли заполнять остальной конфиг, если он по умолчанию выключен? Или типа на случай, если включал и чего-то не заполнят?

Copy link
Member Author

Choose a reason for hiding this comment

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

Просто оставил старые значения, могу убрать

type AdminMonitorConfig struct {
MonitorBaseConfig

AdminContacts []map[string]string `validate:"required_if=Enabled true"`
Copy link
Member

Choose a reason for hiding this comment

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

А почему map[string]string, структуру нельзя сделать?

Copy link
Member Author

Choose a reason for hiding this comment

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

Перенес старый вариант, менять на структуру сейчас?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants