-
Notifications
You must be signed in to change notification settings - Fork 312
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
Feature/sp prometheus remote rw #1070
Feature/sp prometheus remote rw #1070
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1070 +/- ##
==========================================
- Coverage 53.52% 49.48% -4.05%
==========================================
Files 285 285
Lines 20258 20272 +14
==========================================
- Hits 10843 10031 -812
- Misses 7750 8686 +936
+ Partials 1665 1555 -110
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I'd like to have Prometheus' config been fully exported like what tidb/tikv/pd does, but i'm also ok with current approach. |
And add some test please |
I'm afraid this will not work at all: https://play.golang.org/p/ZQRYbtvhtu0 The output is something like: a: b
---
c: d
---
e: f
---
g: h
---
i: j
---
k: l It's invalid. Suggestion: Maybe you try this: https://play.golang.org/p/VWp4uf_go1V |
And please add a test in server_config_test.go, something like: func (s *configSuite) TestEncodeRemoteCfg(c *check.C) {
yamlData := []byte(`remote_write:
remote_timeout: 30
url: http://172.16.5.140:8808
write_relabel_configs:
source_labels:
- label1
- label2
`)
bs, err := encodeRemoteCfg2Yaml(Remote{
RemoteWrite: map[string]interface{}{
"url": "http://172.16.5.140:8808",
"remote_timeout": 30,
"write_relabel_configs": map[string]interface{}{
"source_labels": []string{"label1", "label2"},
},
},
})
c.Assert(err, check.IsNil)
c.Assert(bs, check.BytesEquals, yamlData)
} |
Based on https://play.golang.org/p/VWp4uf_go1V the remote_write:
- g: h
i: j
k: l
remote_read:
- a1: b
c1: d
e1: f
- a2: b
c2: d
e3: f |
Thank you very much! |
/lgtm |
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 30a6d47
|
|
Seems the CLA check not passed, you need to sign it with your Github's name and email: `[email protected] |
@XSHui: Your PR has out-of-dated, I have automatically updated it for you. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
add remote storage work add more remote config rollback makefile fix ut fix comments fix ut rm global prom cfg rm prom cfg already in tmpl rm marshal & unmarshal rm dirty code fix encode yaml failed fix if condition
…up into feature/sp-prometheus-remote-rw
@breeswish Could you please help me to see the CI task which had been canceled? |
@XSHui I have no idea. Seems that TiDB process is killed according to the log: BTW I have a question for this PR, why not using |
Other configuration of prometheus already configed in https://prometheus.io/docs/prometheus/latest/configuration/configuration/ |
How about allowing users to combine these configurations? For example, user can specify his own |
May I implement this feature in a new branch ? |
The |
How to rerun CI |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 8b7fcaa
|
What problem does this PR solve?
close #1063
Support write prometheus data to remote.
What is changed and how it works?
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write
Check List
Tests
Code changes
Side effects
Related changes
Release notes: