Difference between revisions of "Plugin:Oracle"

From collectd Wiki
Jump to: navigation, search
m (Description: Fix a grammatical incorrect sentence.)
(Example graphs: Use the "No Example Graph" template.)
Line 25: Line 25:
 
  </Plugin>
 
  </Plugin>
  
= Example graph =
+
= Example graphs =
  
<em>None yet. Add one now!</em>
+
{{No Example Graph}}
  
 
= Dependencies =
 
= Dependencies =

Revision as of 12:17, 1 March 2009

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 the configuration of those plugins is 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 graphs

None yet. Add one now!

Dependencies

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