oracledb_exporter
oracledb_exporter copied to clipboard
prometheus-Common label application Questions
Q 1
- For example, as shown above, it is possible to distinguish the fields that are received by each sql statement in the field of prometheus.labels.instance, but where is the field generated?
Q 2
Current Query
[[metric]]
context = "sessions"
labels = [ "status", "type", "oracle_server_name" ]
metricsdesc = { value= "Gauge metric with count of sessions by status and type." }
request = "SELECT status, type, COUNT(*) as value, 'master1_oracleExporter' as oracle_server_name FROM v$session GROUP BY status, type"
[[metric]]
context = "resource"
labels = [ "resource_name", "oracle_server_name" ]
metricsdesc = { current_utilization= "Generic counter metric from v$resource_limit view in Oracle (current value).", limit_value="Generic counter metric from v$resource_limit view in Oracle (UNLIMITED: -1)." }
request="SELECT resource_name,current_utilization,CASE WHEN TRIM(limit_value) LIKE 'UNLIMITED' THEN '-1' ELSE TRIM(limit_value) END as limit_value FROM v$resource_limit"
Apply representative query
[[metric]]
context = "sessions"
labels = [ "status", "type", "oracle_server_name" ]
metricsdesc = { value= "Gauge metric with count of sessions by status and type." }
request = "SELECT status, type, COUNT(*) as value, 'master1_oracleExporter' as oracle_server_name FROM v$session GROUP BY status, type"
[[metric]]
context = "resource"
labels = [ "resource_name", "oracle_server_name" ]
metricsdesc = { current_utilization= "Generic counter metric from v$resource_limit view in Oracle (current value).", limit_value="Generic counter metric from v$resource_limit view in Oracle (UNLIMITED: -1)." }
request="SELECT resource_name,current_utilization,CASE WHEN TRIM(limit_value) LIKE 'UNLIMITED' THEN '-1' ELSE TRIM(limit_value) END as limit_value, 'master1_oracleExporter' as oracle_server_name FROM v$resource_limit"
- I added oracle_server_name for each of those queries, but I want to know how to apply a representative field that can distinguish each exporter when using two exporters once without such a method.
- Isn't there a good way to do it all at once in the preferences?
- I want to know how to create a field that applies to all queries and distinguishes each oracle db_exporter without adding columns to the query.
@Yannig @iamseth