google-code-export / mysql-cacti-templates

Automatically exported from code.google.com/p/mysql-cacti-templates
GNU General Public License v2.0
1 stars 0 forks source link

Distinguish zero from no-value #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A lot of times the scripts will return 0 if some value can't be found.  If
the value can't be returned, there should be a way to say so.  Should it

a) return -1 and the templates should recognize 0 as the min valid value?
2) return an empty string?
d) something else?

The consequence of the current behavior is that there can be sudden spikes
in the graphs.  If variable X is a huge counter and goes 99 million,
unknown, 99 million, then it looks like there is a spike of 99 million
between the measurements.

Original issue reported on code.google.com by baron.schwartz on 23 Oct 2008 at 11:02

GoogleCodeExporter commented 9 years ago
Hmm, it seems there are big spikes because of roll-overs.  If something is 
restarted
and the counter is then less, Cacti assumes it has rolled past the max value and
wrapped around.  How to work around this, both in terms of making sure 
wraparounds
are counted, and not having spikes when there is a restart?

Original comment by baron.schwartz on 2 Nov 2008 at 11:27

GoogleCodeExporter commented 9 years ago
Returning -1 for unknown, and setting the minimum valid value to 0, has proven 
to
generate NaN in graphs, so I am pretty sure this works.

Original comment by baron.schwartz on 8 Nov 2008 at 4:37

GoogleCodeExporter commented 9 years ago

Original comment by baron.schwartz on 8 Nov 2008 at 4:40