Welcome to Questions - Ask OpenNMS, where you can ask questions and receive answers from other members of the community.

Non Displaying Graphs of Oracle Queries - Free tablespace

0 votes
670 views

Hi,

We are collecting Free Oracle Tablespace query information and storing it in ~/share/rrd/snmp/<nodeID>

jdbc-datacollection-config.xml:

<jdbc-collection name="FREETABLESPACE">
        <rrd step="3600">
            <rra>RRA:AVERAGE:0.5:1:2016</rra>
            <rra>RRA:MAX:0.5:24:388</rra>
            <rra>RRA:MIN:0.5:24:388</rra>
        </rrd>
        <queries>
           <query name="FreeTablespace" ifType="ignore" instance-column="TABLESPACE_NAME" resourceType="FreeTablespace">
                <statement>
                   <queryString>
                        SELECT a.tablespace_name AS TABLESPACE_NAME, (a.bytes/1024/1024) as SIZE_MB, b.TOTAL_Free_Mb AS TOTAL_FREE_MB
                        FROM dba_data_files a,
                        (
                        SELECT file_id, tablespace_name, sum(bytes/1024/1024) as TOTAL_Free_Mb
                        FROM DBA_FREE_SPACE
                        GROUP BY TABLESPACE_NAME, FILE_ID
                        ) b
                        WHERE a.file_id = b.file_id
                   </queryString>
                </statement>
                <columns>
                   <column name="TABLESPACE_NAME" data-source-name="TABLESPACE_NAME" alias="TABLESPACE_NAME" type="string"/>
                   <column name="SIZE_MB" data-source-name="SIZE_MB" alias="SIZE_MB" type="gauge"/>
                   <column name="TOTAL_FREE_MB" data-source-name="TOTAL_FREE_MB" alias="TOTAL_FREE_MB" type="gauge"/>
                </columns>
           </query>
        </queries>
    </jdbc-collection>

collectd-configuration.xml:

<service name="T_FREETABLESPACE" interval="300000" user-defined="true" status="on">
            <parameter key="collection" value="FREETABLESPACE"/>
            <parameter key="driver" value="oracle.jdbc.driver.OracleDriver"/>
            <parameter key="user" value="<user>"/>
            <parameter key="password" value="<password>"/>
            <parameter key="url" value="jdbc:oracle:thin:@<ip>:1521:LDB"/>
        </service>

<collector service="T_FREETABLESPACE" class-name="org.opennms.netmgt.collectd.JdbcCollector"/>

snmp-graph.properties.d/Oracle-graph.properties:

reports=T_FREETABLESPACE

....

################################
# Oracle Reports FREE TABLESPACE
################################

report.oracleQuota.name=Oracle Tablespace Quotas
report.oracleQuota.columns=BytesUsed,MaxBytes
report.oracleQuota.propertiesValues=TABLESPACE_NAME
report.oracleQuota.type=oracleQuota
report.oracleQuota.command=--title="Oracle Tablespace Quota {TABLESPACE_NAME}" \
 --vertical-label="Usage" \
 DEF:a={rrd1}:BytesUsed:AVERAGE \
 DEF:b={rrd2}:MaxBytes:AVERAGE \
 AREA:b#00ddcc:" max" \
 AREA:a#0000cc:" used" \
 GPRINT:a:AVERAGE:"Avg: %8.2lf %s" \
 GPRINT:b:MIN:"Min: %8.2lf %s" \
 GPRINT:b:MAX:"Max: %8.2lf %s\\n"


report.T_FREETABLESPACE.name=Free Tablespace
report.T_FREETABLESPACE.columns=TOTAL_FREE_MB,SIZE_MB
report.T_FREETABLESPACE.propertiesValues=TABLESPACE_NAME
report.T_FREETABLESPACE.type=t_FreeTablespace
report.T_FREETABLESPACE.command=--title="Tablespace: {TABLESPACE_NAME}" \
 --vertical-label="Free Mb" \
 DEF:a={rrd1}:TOTAL_FREE_MB:AVERAGE \
 DEF:b={rrd2}:SIZE_MB:AVERAGE \
 AREA:a#0000cc:" free space" \
 AREA:b#00ddcc:" total space" \
 GPRINT:a:AVERAGE:"Avg: %8.2lf %s" \
 GPRINT:b:MIN:"Min: %8.2lf %s" \
 GPRINT:b:MAX:"Max: %8.2lf %s\\n"

 

The *.meta and *.jrb and the strings.properties files are all being created and located in ~/share/rrd/snmp/<nodeID>/FreeTablespace/<TABLESPACE>.  However we cannot get the graphs to display - not sure what is going wrong.

Any assistance would be appreciated.

OpenNMS version
1.12.3
Java version
java version "1.7.0_40"
OpenJDK Runtime Environment (rhel-2.4.2.1.el6-x86_64 u40-b60)
OpenJDK 64-Bit Server VM (build 24.0-b56, mixed mode)
Operating system
Redhay 6
PostgreSQL version
psql (PostgreSQL) 9.2.6
asked Jul 6, 2015 by mobilis (150 points)

1 Answer

0 votes
Can you please have a look in $OPENNMS_HOME/logs/web.log when you try to load the particular graph. Can you also provide the content of the *.meta files and the name of the *.jrb files.? Do you have storeByGroup enabled or not? You can find it in $OPENNMS_HOME/etc/opennms.properties. It seems your Oracle-graph.properties file doesn't fit to your created JRB files.
answered Jul 6, 2015 by indigo (11,480 points)
...