Skip to content

Commit

Permalink
Fixed divide by zero error in query (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
Corbin Phelps authored Jan 10, 2019
1 parent 1363aa8 commit b8c86e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.1.2 - 2019-01-09
### Fixed
- Divide by zero error in query

## 1.1.1 - 2018-12-11
### Fixed
- Properly specified inventory prefix
Expand Down
2 changes: 1 addition & 1 deletion src/metric_definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ var oracleTablespaceMetrics = oracleMetricGroup{
SUM(bytes) AS "USED",
MAX( CASE WHEN status = 'OFFLINE' THEN 1 ELSE 0 END) AS "OFFLINE",
SUM(maxbytes) AS "SIZE",
SUM( bytes ) / SUM( maxbytes) * 100 AS "USED_PERCENT"
SUM( bytes ) / NULLIF( SUM(maxbytes), 0 ) * 100 AS "USED_PERCENT"
FROM dba_data_files`

if len(tablespaceWhiteList) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion src/oracledb.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type argumentList struct {

const (
integrationName = "com.newrelic.oracledb"
integrationVersion = "1.1.1"
integrationVersion = "1.1.2"
)

var (
Expand Down

0 comments on commit b8c86e8

Please sign in to comment.