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

(0.3.0) Postgres plugin: canonicalize & sanitize adress #490

Closed
wants to merge 1 commit into from
Closed

(0.3.0) Postgres plugin: canonicalize & sanitize adress #490

wants to merge 1 commit into from

Conversation

donaldguy
Copy link

Rebase of #486 as requested.

As I said in #486, its tempting to think maybe we should just make the key and values
(user, sslmode, etc.) individual tags. What do you think?

@donaldguy
Copy link
Author

Let the record show that we made literally identical changes to the postgresql_test.go except I added the metric a second time as a comment. (yours was committed between when I rebased and pushed)

diff --git a/plugins/postgresql/postgresql_test.go b/plugins/postgresql/postgresql_test.go
index 0f4ff55..566354e 100644
--- a/plugins/postgresql/postgresql_test.go
+++ b/plugins/postgresql/postgresql_test.go
@@ -57,7 +57,7 @@ func TestPostgresqlGeneratesMetrics(t *testing.T) {
        for _, metric := range intMetrics {
                _, ok := availableColumns[metric]
                if ok {
-                       assert.True(t, acc.HasIntField("postgresql", metric))
+                       assert.True(t, acc.HasIntField("postgresql", metric), metric)
                        metricsCounted++
                }
        }
@@ -65,7 +65,7 @@ func TestPostgresqlGeneratesMetrics(t *testing.T) {
        for _, metric := range floatMetrics {
                _, ok := availableColumns[metric]
                if ok {
-                       assert.True(t, acc.HasFloatField("postgresql", metric))
+                       assert.True(t, acc.HasFloatField("postgresql", metric), metric)
                        metricsCounted++
                }
        }

Anyway I'll drop my commit of that now.

@@ -5,6 +5,9 @@
- **breaking change** Plugin measurements aggregated into a single measurement.
- **breaking change** `jolokia` plugin: must use global tag/drop/pass parameters
for configuration.
- **breaking change** `postgresql` plugin: by default, converts both forms of address
Copy link
Contributor

Choose a reason for hiding this comment

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

is this really a breaking change?

Copy link
Author

Choose a reason for hiding this comment

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

It's definitely not breaking in Telegraf proper; but it could certainly be breaking for tooling built around the data in influx.

but with the field aggregation its a kinda moot point vs 0.2

@sparrc
Copy link
Contributor

sparrc commented Jan 14, 2016

looks good! I would say forget about verbatim address tags, users really shouldn't want to have their password within the tag value

@donaldguy
Copy link
Author

So is 0.10.0 the new 0.3? should I retarget to master? how do you want to proceed ?

@sparrc
Copy link
Contributor

sparrc commented Jan 15, 2016

yes, 0.10.0 is the new 0.3.0, but the commits are identical. You could target to master, as that has now been merged in

@sparrc
Copy link
Contributor

sparrc commented Jan 29, 2016

@donaldguy any chance you could make your changes on a new branch and send a new PR?

@sparrc
Copy link
Contributor

sparrc commented Feb 3, 2016

closing for lack of updates, @donaldguy I'll review and merge if you submit a new, rebased PR.
Thanks!

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.

2 participants