Skip to content

Commit

Permalink
Fix metric name
Browse files Browse the repository at this point in the history
  • Loading branch information
ugisu committed Nov 13, 2023
1 parent d4e09aa commit 7eeed28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The following metrics are exposed currently.
- oracledb_wait_time_user_io
- oracledb_tablespace_bytes
- oracledb_tablespace_max_bytes
- oracledb_tablespace_free
- oracledb_tablespace_free_bytes
- oracledb_tablespace_used_percent
- oracledb_process_count
- oracledb_resource_current_utilization
Expand Down
8 changes: 4 additions & 4 deletions default-metrics.legacy-tablespace.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ WHERE
[[metric]]
context = "tablespace"
labels = [ "tablespace", "type" ]
metricsdesc = { bytes = "Generic counter metric of tablespaces bytes in Oracle.", max_bytes = "Generic counter metric of tablespaces max bytes in Oracle.", free = "Generic counter metric of tablespaces free bytes in Oracle." }
metricsdesc = { bytes = "Generic counter metric of tablespaces bytes in Oracle.", max_bytes = "Generic counter metric of tablespaces max bytes in Oracle.", free_bytes = "Generic counter metric of tablespaces free bytes in Oracle." }
request = '''
SELECT
df.tablespace_name as tablespace,
df.type as type,
nvl(sum(df.bytes),0) as bytes,
nvl(sum(df.max_bytes),0) as max_bytes,
nvl(sum(f.free),0) as free
nvl(sum(f.free),0) as free_bytes
FROM
(
SELECT
Expand All @@ -69,7 +69,7 @@ FROM
) df,
(
SELECT
TRUNC(SUM(bytes)) AS free,
TRUNC(SUM(bytes)) AS free_bytes,
file_id
FROM dba_free_space
GROUP BY file_id
Expand All @@ -82,7 +82,7 @@ SELECT
Y.type as type,
SUM(Y.bytes) as bytes,
SUM(Y.max_bytes) as max_bytes,
MAX(nvl(Y.free_bytes,0)) as free
MAX(nvl(Y.free_bytes,0)) as free_bytes
FROM
(
SELECT
Expand Down

0 comments on commit 7eeed28

Please sign in to comment.