Plugin:Oracle

From collectd Wiki
Revision as of 22:01, 26 February 2009 by Octo (talk | contribs) (Created initial page.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

The Oracle interface uses the "Oracle call interface" (OCI) to connect to one or more Oracle database systems, execute SQL statements on them and read back the result. Depending on the configuration, the returned values are then converted into collectd "value lists" (the data structure used internally to pass statistics around). It is a very generic plugin, so reading the collectd.conf(5) manpage is a must.

The configuration syntax of the Oracle, DBI, and PostgreSQL plugins is very similar, because it is are handled by the same module. Also, we tried to keep the syntax similar to that of the SNMP plugin. So if you use any of those plugins already, most of the following will look familiar.

Synopsis

<Plugin oracle> 
  <Query "out_of_stock">
    Statement "SELECT category, COUNT(*) AS value FROM products WHERE in_stock = 0 GROUP BY category"
    <Result>
      Type "gauge" 
      # InstancePrefix "foo"
      InstancesFrom "category"
      ValuesFrom "value" 
    </Result>
  </Query>
  <Database "product_information">
    ConnectID "db01"
    Username "oracle"
    Password "secret"
    Query "out_of_stock"
  </Database>
</Plugin>

Example graph

None yet. Add one now!

Dependencies

  • OCI
  • libclntsh
    (An Oracle library with a mystic name. Should be part of OCI.)