|
| 1 | +--- |
| 2 | +rules: |
| 3 | + |
| 4 | + # These come from the master |
| 5 | + # Example: master.aliveWorkers |
| 6 | + - pattern: "metrics<name=master\\.(.*), type=counters><>Value" |
| 7 | + name: spark_master_$1 |
| 8 | + |
| 9 | + # These come from the worker |
| 10 | + # Example: worker.coresFree |
| 11 | + - pattern: "metrics<name=worker\\.(.*), type=counters><>Value" |
| 12 | + name: spark_worker_$1 |
| 13 | + |
| 14 | + # These come from the application driver |
| 15 | + # Example: app-20160809000059-0000.driver.DAGScheduler.stage.failedStages |
| 16 | + - pattern: "metrics<name=(.*)\\.driver\\.(DAGScheduler|BlockManager|jvm)\\.(.*), type=gauges><>Value" |
| 17 | + name: spark_driver_$2_$3 |
| 18 | + type: GAUGE |
| 19 | + labels: |
| 20 | + app_id: "$1" |
| 21 | + |
| 22 | + # These come from the application driver |
| 23 | + # Emulate timers for DAGScheduler like messagePRocessingTime |
| 24 | + - pattern: "metrics<name=(.*)\\.driver\\.DAGScheduler\\.(.*), type=counters><>Count" |
| 25 | + name: spark_driver_DAGScheduler_$2_total |
| 26 | + type: COUNTER |
| 27 | + labels: |
| 28 | + app_id: "$1" |
| 29 | + |
| 30 | + - pattern: "metrics<name=(.*)\\.driver\\.HiveExternalCatalog\\.(.*), type=counters><>Count" |
| 31 | + name: spark_driver_HiveExternalCatalog_$2_total |
| 32 | + type: COUNTER |
| 33 | + labels: |
| 34 | + app_id: "$1" |
| 35 | + |
| 36 | + # These come from the application driver |
| 37 | + # Emulate histograms for CodeGenerator |
| 38 | + - pattern: "metrics<name=(.*)\\.driver\\.CodeGenerator\\.(.*), type=counters><>Count" |
| 39 | + name: spark_driver_CodeGenerator_$2_total |
| 40 | + type: COUNTER |
| 41 | + labels: |
| 42 | + app_id: "$1" |
| 43 | + |
| 44 | + # These come from the application driver |
| 45 | + # Emulate timer (keep only count attribute) plus counters for LiveListenerBus |
| 46 | + - pattern: "metrics<name=(.*)\\.driver\\.LiveListenerBus\\.(.*), type=counters><>Count" |
| 47 | + name: spark_driver_LiveListenerBus_$2_total |
| 48 | + type: COUNTER |
| 49 | + labels: |
| 50 | + app_id: "$1" |
| 51 | + |
| 52 | + # Get Gauge type metrics for LiveListenerBus |
| 53 | + - pattern: "metrics<name=(.*)\\.driver\\.LiveListenerBus\\.(.*), type=gauges><>Value" |
| 54 | + name: spark_driver_LiveListenerBus_$2 |
| 55 | + type: GAUGE |
| 56 | + labels: |
| 57 | + app_id: "$1" |
| 58 | + |
| 59 | + # These come from the application driver if it's a streaming application |
| 60 | + # Example: app-20160809000059-0000.driver.com.example.ClassName.StreamingMetrics.streaming.lastCompletedBatch_schedulingDelay |
| 61 | + - pattern: "metrics<name=(.*)\\.driver\\.(.*)\\.StreamingMetrics\\.streaming\\.(.*), type=gauges><>Value" |
| 62 | + name: spark_driver_streaming_$3 |
| 63 | + labels: |
| 64 | + app_id: "$1" |
| 65 | + app_name: "$2" |
| 66 | + |
| 67 | + # These come from the application driver if it's a structured streaming application |
| 68 | + # Example: app-20160809000059-0000.driver.spark.streaming.QueryName.inputRate-total |
| 69 | + - pattern: "metrics<name=(.*)\\.driver\\.spark\\.streaming\\.(.*)\\.(.*), type=gauges><>Value" |
| 70 | + name: spark_driver_structured_streaming_$3 |
| 71 | + labels: |
| 72 | + app_id: "$1" |
| 73 | + query_name: "$2" |
| 74 | + |
| 75 | + # These come from the application executors |
| 76 | + # Examples: |
| 77 | + # app-20160809000059-0000.0.executor.threadpool.activeTasks (value) |
| 78 | + # app-20160809000059-0000.0.executor.JvmGCtime (counter) |
| 79 | + |
| 80 | + # filesystem metrics are declared as gauge metrics, but are actually counters |
| 81 | + - pattern: "metrics<name=(.*)\\.(.*)\\.executor\\.filesystem\\.(.*), type=gauges><>Value" |
| 82 | + name: spark_executor_filesystem_$3_total |
| 83 | + type: COUNTER |
| 84 | + labels: |
| 85 | + app_id: "$1" |
| 86 | + executor_id: "$2" |
| 87 | + |
| 88 | + - pattern: "metrics<name=(.*)\\.(.*)\\.executor\\.(.*), type=gauges><>Value" |
| 89 | + name: spark_executor_$3 |
| 90 | + type: GAUGE |
| 91 | + labels: |
| 92 | + app_id: "$1" |
| 93 | + executor_id: "$2" |
| 94 | + |
| 95 | + - pattern: "metrics<name=(.*)\\.(.*)\\.executor\\.(.*), type=counters><>Count" |
| 96 | + name: spark_executor_$3_total |
| 97 | + type: COUNTER |
| 98 | + labels: |
| 99 | + app_id: "$1" |
| 100 | + executor_id: "$2" |
| 101 | + |
| 102 | + - pattern: "metrics<name=(.*)\\.(.*)\\.ExecutorMetrics\\.(.*), type=gauges><>Value" |
| 103 | + name: spark_executor_$3 |
| 104 | + type: GAUGE |
| 105 | + labels: |
| 106 | + app_id: "$1" |
| 107 | + executor_id: "$2" |
| 108 | + |
| 109 | + # These come from the application executors |
| 110 | + # Example: app-20160809000059-0000.0.jvm.threadpool.activeTasks |
| 111 | + - pattern: "metrics<name=(.*)\\.([0-9]+)\\.(jvm|NettyBlockTransfer)\\.(.*), type=gauges><>Value" |
| 112 | + name: spark_executor_$3_$4 |
| 113 | + type: GAUGE |
| 114 | + labels: |
| 115 | + app_id: "$1" |
| 116 | + executor_id: "$2" |
| 117 | + |
| 118 | + - pattern: "metrics<name=(.*)\\.([0-9]+)\\.HiveExternalCatalog\\.(.*), type=counters><>Count" |
| 119 | + name: spark_executor_HiveExternalCatalog_$3_total |
| 120 | + type: COUNTER |
| 121 | + labels: |
| 122 | + app_id: "$1" |
| 123 | + executor_id: "$2" |
| 124 | + |
| 125 | + # These come from the application driver |
| 126 | + # Emulate histograms for CodeGenerator |
| 127 | + - pattern: "metrics<name=(.*)\\.([0-9]+)\\.CodeGenerator\\.(.*), type=counters><>Count" |
| 128 | + name: spark_executor_CodeGenerator_$3_total |
| 129 | + type: COUNTER |
| 130 | + labels: |
| 131 | + app_id: "$1" |
| 132 | + executor_id: "$2" |
0 commit comments