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

增加nsq消息队列采集 #537

Merged
merged 2 commits into from Jun 13, 2023
Merged

增加nsq消息队列采集 #537

merged 2 commits into from Jun 13, 2023

Conversation

tianyanli
Copy link
Contributor

目前只增加depth指标,这个最常用,是消息队列的积压指标,指标名称:nsq_channel_depth
image
image

}

func (ins *Instance) GetTopicInfo() ([]string, error) {
client := http.Client{Timeout: 5 * time.Second}
Copy link
Collaborator

Choose a reason for hiding this comment

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

timeout可以提取成配置参数

if err != nil {
return nil, err
}
//req.SetBasicAuth(username, password)
Copy link
Collaborator

Choose a reason for hiding this comment

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

basic auth 和 自定义header也可以放到配置中

}

func getQueuesInfo(URL, topicName string) (int, error) {
client := http.Client{Timeout: 5 * time.Second}
Copy link
Collaborator

Choose a reason for hiding this comment

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

5秒这个 放到配置中,Init时添加默认值,这里就可以直接用ins.Timeout 了

@kongfei605
Copy link
Collaborator

先merge了,我来改一下

@kongfei605 kongfei605 merged commit 2677b22 into flashcatcloud:main Jun 13, 2023
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.

None yet

2 participants