Skip to content

tjheslin1/Patterdale

Repository files navigation

Patterdale

Docker Pulls

See here for example patterdale.yml configuration file

See here for complete documentation.

Prometheus Oracle database exporter. Runs provided queries.

docker run -d -p 7000:7000 -v /your/jdbc/odjbc7.jar:/app/odjbc7.jar -v /your/config/directory:/config -v /your/secrets/directory:/passwords tjheslin1/patterdale:1.3.1

If a logback.xml file is included in the directory passed into the /config container volume, this will override your logging configuration.

Note the volume mount: /your/jdbc/odjbc7.jar:/app/odjbc7.jar in the example. This driver can be downloaded manually from the Oracle JDBC Downloads page or, preferably, you can provide mavenOracleUsername and mavenOraclePassword in your gradle.properties file when building locally which will fetch the driver from the maven repository. This requires you register an Oracle single sign-on account.

Troubleshooting

Getting one of the following exceptions when running locally?:

  • java.sql.SQLRecoverableException
  • java.net.ConnectException
  • com.zaxxer.hikari.pool.HikariPool$PoolInitializationException
  • or similar

patterdale.yml from src/test/resources will need to have the jdbcUrls changed locally to point to your local Oracle database(s), if this occurs replace localhost in the jdbcUrls with the local IP address or your databases. For local Docker images this will be the IP of your machine.

The sath89/oracle-12c docker images take a few minutes to start up. Patterdale will retry connections to the database(s) according to the maxConnectionRetries and connectionRetryDelayInSeconds settings. During this time the HikariPool$PoolInitializationException will be logged, as will details of the connection retry attempts.

Example view of Patterdale metrics within Prometheus

Example view of Patterdale metrics within Prometheus