|
| 1 | +metric: |
| 2 | + - context: bankpdb_sessions |
| 3 | + labels: |
| 4 | + - inst_id |
| 5 | + - status |
| 6 | + - type |
| 7 | + metricsdesc: |
| 8 | + value: Gauge metric with count of bankpdb sessions by status and type. |
| 9 | + request: >- |
| 10 | + select inst_id, status, type, count(*) as value from gv$session group by |
| 11 | + status, type, inst_id |
| 12 | + - context: bankqueue_messages_by_state |
| 13 | + labels: |
| 14 | + - state |
| 15 | + metricsdesc: |
| 16 | + value: Total number of messages in bank queue by state |
| 17 | + request: 'select state, count(*) as value from AQuser.bankaqueuetable group by state' |
| 18 | + ignorezeroresult: true |
| 19 | + - context: bankqueue_dequeuerate_count |
| 20 | + metricsdesc: |
| 21 | + value: ' number of messages dequeued from bank queue' |
| 22 | + request: >- |
| 23 | + select count(*) as value from AQuser.bankaqueuetable WHERE sysdate - |
| 24 | + DEQ_TIME < interval '30' second |
| 25 | + ignorezeroresult: true |
| 26 | + - context: bankqueue_enqueuerate_count |
| 27 | + metricsdesc: |
| 28 | + value: ' number of messages enqueued to bank queue by ' |
| 29 | + request: >- |
| 30 | + select count(*) as value from AQuser.bankaqueuetable WHERE sysdate - |
| 31 | + ENQ_TIME < interval '30' second |
| 32 | + ignorezeroresult: true |
| 33 | + - context: ownership |
| 34 | + metricsdesc: |
| 35 | + inst_id: Owner instance of the current queues. |
| 36 | + request: | |
| 37 | + SELECT |
| 38 | + inst_id |
| 39 | + FROM |
| 40 | + gv$persistent_queues |
| 41 | + WHERE |
| 42 | + ROWNUM < 2 |
| 43 | + - context: teq |
| 44 | + metricsdesc: |
| 45 | + curr_inst_id: ID of current instance |
| 46 | + request: SELECT instance_number AS curr_inst_id FROM v$instance |
| 47 | + - context: teq |
| 48 | + labels: |
| 49 | + - inst_id |
| 50 | + metricsdesc: |
| 51 | + total_queues: Total number of queues |
| 52 | + request: | |
| 53 | + SELECT |
| 54 | + inst_id, |
| 55 | + COUNT(*) AS total_queues |
| 56 | + FROM |
| 57 | + ( |
| 58 | + SELECT DISTINCT |
| 59 | + t1.inst_id, |
| 60 | + t2.queue_name |
| 61 | + FROM |
| 62 | + gv$persistent_subscribers t1 |
| 63 | + JOIN gv$persistent_queues t2 ON t1.queue_id = t2.queue_id |
| 64 | + ) |
| 65 | + GROUP BY |
| 66 | + inst_id |
| 67 | + - context: teq |
| 68 | + labels: |
| 69 | + - inst_id |
| 70 | + metricsdesc: |
| 71 | + total_subscribers: Total number of subscribers |
| 72 | + request: | |
| 73 | + SELECT |
| 74 | + inst_id, |
| 75 | + COUNT(*) AS total_subscribers |
| 76 | + FROM |
| 77 | + ( |
| 78 | + SELECT DISTINCT |
| 79 | + inst_id, |
| 80 | + subscriber_id |
| 81 | + FROM |
| 82 | + gv$persistent_subscribers |
| 83 | + ) |
| 84 | + GROUP BY |
| 85 | + inst_id |
| 86 | + - context: teq |
| 87 | + labels: |
| 88 | + - inst_id |
| 89 | + - queue_name |
| 90 | + - subscriber_name |
| 91 | + metricsdesc: |
| 92 | + enqueued_msgs: Total enqueued messages. |
| 93 | + dequeued_msgs: Total dequeued messages. |
| 94 | + remained_msgs: Total remained messages. |
| 95 | + time_since_last_dequeue: Time since last dequeue. |
| 96 | + estd_time_to_drain_no_enq: Estimated time to drain if no enqueue. |
| 97 | + message_latency_1: Message latency for last 5 mins. |
| 98 | + message_latency_2: Message latency for last 1 hour. |
| 99 | + message_latency_3: Message latency for last 5 hours. |
| 100 | + request: | |
| 101 | + SELECT DISTINCT |
| 102 | + t1.inst_id, |
| 103 | + t1.queue_id, |
| 104 | + t2.queue_name, |
| 105 | + t1.subscriber_id AS subscriber_name, |
| 106 | + t1.enqueued_msgs, |
| 107 | + t1.dequeued_msgs, |
| 108 | + t1.remained_msgs, |
| 109 | + t1.message_latency_1, |
| 110 | + t1.message_latency_2, |
| 111 | + t1.message_latency_3 |
| 112 | + FROM |
| 113 | + ( |
| 114 | + SELECT |
| 115 | + inst_id, |
| 116 | + queue_id, |
| 117 | + subscriber_id, |
| 118 | + SUM(enqueued_msgs) AS enqueued_msgs, |
| 119 | + SUM(dequeued_msgs) AS dequeued_msgs, |
| 120 | + SUM(enqueued_msgs - dequeued_msgs) AS remained_msgs, |
| 121 | + AVG(10) AS message_latency_1, |
| 122 | + AVG(20) AS message_latency_2, |
| 123 | + AVG(30) AS message_latency_3 |
| 124 | + FROM |
| 125 | + gv$persistent_subscribers |
| 126 | + GROUP BY |
| 127 | + queue_id, |
| 128 | + subscriber_id, |
| 129 | + inst_id |
| 130 | + ) t1 |
| 131 | + JOIN gv$persistent_queues t2 ON t1.queue_id = t2.queue_id |
| 132 | + - context: sessions |
| 133 | + labels: |
| 134 | + - inst_id |
| 135 | + - status |
| 136 | + - type |
| 137 | + metricsdesc: |
| 138 | + value: Gauge metric with count of sessions by status and type. |
| 139 | + request: | |
| 140 | + SELECT |
| 141 | + inst_id, |
| 142 | + status, |
| 143 | + type, |
| 144 | + COUNT(*) AS value |
| 145 | + FROM |
| 146 | + gv$session |
| 147 | + GROUP BY |
| 148 | + status, |
| 149 | + type, |
| 150 | + inst_id |
| 151 | + - context: asm_diskgroup |
| 152 | + labels: |
| 153 | + - inst_id |
| 154 | + - name |
| 155 | + metricsdesc: |
| 156 | + total: Total size of ASM disk group. |
| 157 | + free: Free space available on ASM disk group. |
| 158 | + request: | |
| 159 | + SELECT |
| 160 | + inst_id, |
| 161 | + name, |
| 162 | + total_mb * 1024 * 1024 AS total, |
| 163 | + free_mb * 1024 * 1024 AS free |
| 164 | + FROM |
| 165 | + gv$asm_diskgroup |
| 166 | + ignorezeroresult: true |
| 167 | + - context: activity |
| 168 | + labels: |
| 169 | + - inst_id |
| 170 | + - name |
| 171 | + metricsdesc: |
| 172 | + value: Generic counter metric from gv$sysstat view in Oracle. |
| 173 | + request: | |
| 174 | + SELECT |
| 175 | + inst_id, |
| 176 | + name, |
| 177 | + value |
| 178 | + FROM |
| 179 | + gv$sysstat |
| 180 | + WHERE |
| 181 | + name IN ( |
| 182 | + 'parse count (total)', |
| 183 | + 'execute count', |
| 184 | + 'user commits', |
| 185 | + 'user rollbacks' |
| 186 | + ) |
| 187 | + - context: process |
| 188 | + labels: |
| 189 | + - inst_id |
| 190 | + metricsdesc: |
| 191 | + count: Gauge metric with count of processes. |
| 192 | + request: | |
| 193 | + SELECT |
| 194 | + inst_id, |
| 195 | + COUNT(*) AS count |
| 196 | + FROM |
| 197 | + gv$process |
| 198 | + GROUP BY |
| 199 | + inst_id |
| 200 | + - context: wait_class |
| 201 | + labels: |
| 202 | + - inst_id |
| 203 | + - wait_class |
| 204 | + metricsdesc: |
| 205 | + total_waits: Number of times waits of the class occurred |
| 206 | + time_waited: Amount of time spent in the wait by all sessions in the instance |
| 207 | + request: | |
| 208 | + SELECT |
| 209 | + inst_id, |
| 210 | + wait_class, |
| 211 | + total_waits, |
| 212 | + time_waited |
| 213 | + FROM |
| 214 | + gv$system_wait_class |
| 215 | + - context: system |
| 216 | + labels: |
| 217 | + - inst_id |
| 218 | + - stat_name |
| 219 | + metricsdesc: |
| 220 | + value: os metric from gv$osstat view in Oracle. |
| 221 | + request: | |
| 222 | + SELECT |
| 223 | + inst_id, |
| 224 | + stat_name, |
| 225 | + value |
| 226 | + FROM |
| 227 | + gv$osstat |
| 228 | + WHERE |
| 229 | + upper(stat_name) IN ( |
| 230 | + 'NUM_CPUS', |
| 231 | + 'LOAD', |
| 232 | + 'IDLE_TIME', |
| 233 | + 'BUSY_TIME', |
| 234 | + 'USER_TIME', |
| 235 | + 'PHYSICAL_MEMORY_BYTES', |
| 236 | + 'FREE_MEMORY_BYTES' |
| 237 | + ) |
| 238 | + - context: system_network |
| 239 | + labels: |
| 240 | + - inst_id |
| 241 | + metricsdesc: |
| 242 | + received_from_client: Bytes received from client. |
| 243 | + sent_to_client: Bytes sent to client. |
| 244 | + request: | |
| 245 | + SELECT |
| 246 | + t1.inst_id AS inst_id, |
| 247 | + t1.received_from_client AS received_from_client, |
| 248 | + t2.sent_to_client AS sent_to_client |
| 249 | + FROM |
| 250 | + ( |
| 251 | + SELECT |
| 252 | + inst_id, |
| 253 | + value AS received_from_client |
| 254 | + FROM |
| 255 | + gv$sysstat |
| 256 | + WHERE |
| 257 | + lower(name) LIKE '%received via sql*net from client%' |
| 258 | + ORDER BY |
| 259 | + value DESC |
| 260 | + ) t1 |
| 261 | + LEFT JOIN ( |
| 262 | + SELECT |
| 263 | + inst_id, |
| 264 | + value AS sent_to_client |
| 265 | + FROM |
| 266 | + gv$sysstat |
| 267 | + WHERE |
| 268 | + lower(name) LIKE '%sent via sql*net to client%' |
| 269 | + ORDER BY |
| 270 | + value DESC |
| 271 | + ) t2 ON t1.inst_id = t2.inst_id |
| 272 | +
|
0 commit comments