ncabatoff / dbms_exporter

A PostgresSQL/Sybase/ODBC metric exporter for Prometheus
Apache License 2.0
6 stars 11 forks source link

bogus metrics when sybase internal signed 32bit counters overflow #2

Closed ncabatoff closed 7 years ago

ncabatoff commented 7 years ago

I noticed a server suddenly start reporting ~8M tcp packets sent per second, based on a metric from a query of the global value @@packsent. This was a result of @@packsent having overflowed its int32 to become negative. Proposed solution: when converting int values that will become counter metrics, cast to uint before casting to float64.