Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 7562579

Browse files
authored
Merge pull request #377 from perkons/fix_metric_name
Fix metric name
2 parents 10389b9 + 7eeed28 commit 7562579

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The following metrics are exposed currently.
4141
- oracledb_wait_time_user_io
4242
- oracledb_tablespace_bytes
4343
- oracledb_tablespace_max_bytes
44-
- oracledb_tablespace_free
44+
- oracledb_tablespace_free_bytes
4545
- oracledb_tablespace_used_percent
4646
- oracledb_process_count
4747
- oracledb_resource_current_utilization

default-metrics.legacy-tablespace.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ WHERE
4545
[[metric]]
4646
context = "tablespace"
4747
labels = [ "tablespace", "type" ]
48-
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." }
48+
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." }
4949
request = '''
5050
SELECT
5151
df.tablespace_name as tablespace,
5252
df.type as type,
5353
nvl(sum(df.bytes),0) as bytes,
5454
nvl(sum(df.max_bytes),0) as max_bytes,
55-
nvl(sum(f.free),0) as free
55+
nvl(sum(f.free),0) as free_bytes
5656
FROM
5757
(
5858
SELECT
@@ -69,7 +69,7 @@ FROM
6969
) df,
7070
(
7171
SELECT
72-
TRUNC(SUM(bytes)) AS free,
72+
TRUNC(SUM(bytes)) AS free_bytes,
7373
file_id
7474
FROM dba_free_space
7575
GROUP BY file_id
@@ -82,7 +82,7 @@ SELECT
8282
Y.type as type,
8383
SUM(Y.bytes) as bytes,
8484
SUM(Y.max_bytes) as max_bytes,
85-
MAX(nvl(Y.free_bytes,0)) as free
85+
MAX(nvl(Y.free_bytes,0)) as free_bytes
8686
FROM
8787
(
8888
SELECT

default-metrics.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ WHERE
4545
[[metric]]
4646
context = "tablespace"
4747
labels = [ "tablespace", "type" ]
48-
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.", used_percent = "Gauge metric showing as a percentage of how much of the tablespace has been used." }
48+
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.", used_percent = "Gauge metric showing as a percentage of how much of the tablespace has been used." }
4949
request = '''
5050
SELECT
5151
dt.tablespace_name as tablespace,
5252
dt.contents as type,
5353
dt.block_size * dtum.used_space as bytes,
5454
dt.block_size * dtum.tablespace_size as max_bytes,
55-
dt.block_size * (dtum.tablespace_size - dtum.used_space) as free,
55+
dt.block_size * (dtum.tablespace_size - dtum.used_space) as free_bytes,
5656
dtum.used_percent
5757
FROM dba_tablespace_usage_metrics dtum, dba_tablespaces dt
5858
WHERE dtum.tablespace_name = dt.tablespace_name

0 commit comments

Comments
 (0)