Skip to content

Commit

Permalink
Merge pull request #36 from newrelic/log-oracle-home
Browse files Browse the repository at this point in the history
Add log message if oracle home is unset
  • Loading branch information
camdencheek authored Mar 20, 2019
2 parents edcb45c + 879963c commit 864024b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
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.4 - 2019-03-19
### Added
- Log error message if ORACLE_HOME is unset

## 1.1.3 - 2019-02-04
### Fixed
- Use correct protocol version
Expand Down
2 changes: 2 additions & 0 deletions oracledb-config.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ instances:
password: password
# True if the monitoring user is a SysDBA. If omitted, defaults to false.
is_sys_dba: true
# The location of ORACLE_HOME
oracle_home: /u01/app/oracle/product/version/database
# True if the monitoring user is a SysOper. If omitted, defaults to false.
is_sys_oper: false
# A JSON array of tablespaces to collect. If omitted, collects all tablespaces.
Expand Down
7 changes: 6 additions & 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.3"
integrationVersion = "1.1.4"
)

var (
Expand All @@ -41,6 +41,11 @@ func main() {
i, err := integration.New(integrationName, integrationVersion, integration.Args(&args))
exitOnErr(err)

if oracleHome := os.Getenv("ORACLE_HOME"); oracleHome == "" {
log.Error("Required argument oracle_home is unset")
os.Exit(1)
}

// parse tablespace whitelist
err = parseTablespaceWhitelist()
exitOnErr(err)
Expand Down

0 comments on commit 864024b

Please sign in to comment.