Skip to content

Use "counter" type of value instead of gauge.#3

Open
PierreF wants to merge 1 commit intoindygreg:masterfrom
PierreF:master
Open

Use "counter" type of value instead of gauge.#3
PierreF wants to merge 1 commit intoindygreg:masterfrom
PierreF:master

Conversation

@PierreF
Copy link
Copy Markdown

@PierreF PierreF commented Jul 21, 2015

Isn't more adapted to use "counter" type of value and let collectd compute the delta between value ?

It simplify the code and also make metric being "per second".

With old code, metric are "number of writes since last measurement" (which is usually 10 seconds). When using counter, collectd compute the delta for us and make the metric per second.

What do you think of this change ?

@indygreg
Copy link
Copy Markdown
Owner

It's been a while since I wrote this, but I remember trying to use counter originally and something wonky happened. Maybe I was just too impatient to have to use derivatives everywhere in Graphite in order to produce usable graphs.

Like it or not, users of this code expect the current behavior. This change is backwards incompatible and too invasive. If you refactor this to make it a configurable option, I'll accept the pull request. But the current behavior needs to be retained as the default behavior.

@PierreF
Copy link
Copy Markdown
Author

PierreF commented Aug 31, 2015

I've updated the pull request to include a 'DeltaPerSecond' configuration parameter.

It defaults to 'no' : old behavior.

Their is only one little change in old behavior : io_inprogress is always sent, including the very first time. It means that unlike before, when collectd start io_inprogress will be sent immediately and alone. It break the assumption that all metrics are always sent together.
I could fix this, but I think it minor enough and it reduces the number of if-then-else.

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