Comments (3)
Hi,
In this part of the code, the replication_role label is being overwritten as slave. By commenting out this section, the replication_role label correctly reflects master as expected. Here is an example showing the correct behavior after the modification:
The function that you are pointing to parses lines that start with slave (e.g. ^slave\d+
). That means from the example output you provided it is parsing the following data:
slave0:ip=127.0.0.1,port=6384,state=online,offset=2870,lag=1
slave1:ip=127.0.0.1,port=6380,state=online,offset=2870,lag=1
slave2:ip=127.0.0.1,port=6381,state=online,offset=2870,lag=1
slave3:ip=127.0.0.1,port=6383,state=online,offset=2870,lag=1
slave4:ip=127.0.0.1,port=6382,state=online,offset=2870,lag=1
I think, Labeling the replication_role as "slave" for metrics collected from the master server might create some confusion.
I can see that, however I think the intention was to clarify that these metrics are representing a slave not a master, not that the data was collected from a master.
I do not see us suddenly changing the value and meaning of a tag that appears to have been there for 5 years without some major churn to existing users.
Thoughts?
from telegraf.
Thanks for the your comment, I've given it some more thought as you said.
I thought replication_role
was not used in other metrics to indicate that the metric is related to a master or slave.
For example, even if there is information related to the master in a node that is a slave, such as the following:
redis-cli -p 6380 info Replication
# Replication
role:slave
master_host:127.0.0.1
master_port:6379
master_link_status:up
master_last_io_seconds_ago:0
...
the replication_role tag is not changed when this metric is collected.
I may also have thought that because I typically use that tag to distinguish between master and replica nodes.
I do not see us suddenly changing the value and meaning of a tag that appears to have been there for 5 years without some major churn to existing users.
I completely agree with your opinion. I think I was too narrow-minded, focusing only on my use case.
I think this issue can be closed. (I'm not sure I understand the issue handling process correctly, so I won't close it for now).
thanks.
from telegraf.
Thanks for the response! I will go ahead and close this then.
from telegraf.
Related Issues (20)
- Linter: revive, Rule: `enforce-slice-style` - Enforces consistent usage of `make([]type, 0)`, `[]type{}`, or var `[]type` for slice initialization. Should we enable it? HOT 7
- Linter: revive, Rule: `exported` - Warns on undocumented exported functions and methods. Should we enable it? HOT 5
- Improve documentation for Opentelemetry inputs HOT 1
- Linter: revive, Rule: `file-header` - Helps to enforce a common header for all source files. Should we enable it? HOT 2
- Linter: revive, Rule: `flag-parameter` - Warns on boolean parameters that create a control coupling. Should we enable it? HOT 4
- Linter: revive, Rule: `function-length` - Checks if functions don't contain too many lines and statements. Should we enable it? HOT 2
- Linter: revive, Rule: `get-return` - Checks if functions with names prefixed with `Get` return values. Should we enable it? HOT 5
- Linter: revive, Rule: `import-alias-naming` - Enforces clear and lowercase import alias names. Should we enable it? HOT 2
- Linter: revive, Rule: `max-control-nesting` - Warns if nesting level of control structures (`if-then-else`, `for`, `switch`) exceeds a given maximum.. Should we enable it? HOT 3
- Linter: revive, Rule: `max-public-structs` - Warns on files declaring too many public structs. Should we enable it? HOT 7
- Linter: revive, Rule: `nested-structs` - Warns when nested structs are declared. Should we enable it? HOT 3
- Linter: revive, Rule: `optimize-operands-order` - Spots logical expressions where the order of evaluation of terms seems non optimal. Should we enable it?
- Linter: revive, Rule: `redundant-import-alias` - warns on redundant import aliases. Should we enable it?
- Linter: revive, Rule: `string-format` - Allows you to configure a list of regular expressions that string literals in certain function calls are checked against. Should we enable it?
- Linter: revive, Rule: `time-equal` - Warns when using `==` and `!=` for equality check `time.Time`. Should we enable it?
- inputs.http: Allow to configure fallback values in case of connection issues HOT 2
- Add retry feature for http secret-store plugin HOT 1
- ADAL in use after it has bee deprecated HOT 1
- Error on connect to proxy Server HOT 3
- StatsD with `float_counters` should send timings and sets counts as float HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegraf.