diff --git a/example_configs/hadoop_datanode.yml b/example_configs/hadoop_datanode.yml new file mode 100644 index 00000000..c156dabe --- /dev/null +++ b/example_configs/hadoop_datanode.yml @@ -0,0 +1,15 @@ +ssl: false +lowercaseOutputName: true +lowercaseOutputLabelNames: true +rules: + - pattern: 'Hadoop<>DatanodeNetworkCounts: (\d\.\-Ee+)' + name: hadoop_datanode_network_errors + value: $2 + help: "DataNode networkError counts every host" + type: COUNTER + labels: + "host": "$1" + - pattern: 'Hadoop<>(\w+)' + name: Hadoop_$1_$2_$3 + attrNameSnakeCase: true + help: "Common config, parse from jmx bean: {Hadoop:service=$1, name=$2}.$3" \ No newline at end of file diff --git a/example_configs/hadoop_namenode.yml b/example_configs/hadoop_namenode.yml new file mode 100644 index 00000000..918b83f4 --- /dev/null +++ b/example_configs/hadoop_namenode.yml @@ -0,0 +1,26 @@ +lowercaseOutputName: true +rules: + - pattern: "Hadoop<>State:.*?active.*?" + name: hadoop_namenode_status + value: 1 + help: "NameNodeStatus status, means active and means standby" + type: COUNTER + - pattern: "Hadoop<>State:.*?standby.*?" + name: hadoop_namenode_status + value: 0 + help: "NameNodeStatus status, means active and means standby" + type: COUNTER + - pattern: "Hadoop<>FSState:.*?Operational.*?" + name: hadoop_namenode_fsnamesystem_state + value: 1 + help: "FSNameSystem state, means Operational and means Safemode" + type: COUNTER + - pattern: "Hadoop<>FSState:.*?Safemode.*?" + name: hadoop_namenode_fsnamesystem_state + value: 0 + help: "FSNameSystem state, means Operational and means Safemode" + type: COUNTER + - pattern: "Hadoop<>(\w+)" + name: hadoop_$1_$2_$3 + attrNameSnakeCase: true + help: "Common config, parse from jmx bean: {Hadoop:service=$1, name=$2}.$3" diff --git a/example_configs/hive-2.0.0.yml b/example_configs/hive-2.0.0.yml new file mode 100644 index 00000000..08259b90 --- /dev/null +++ b/example_configs/hive-2.0.0.yml @@ -0,0 +1,94 @@ +ssl: false +lowercaseOutputName: true +# the data of these rules comes from hive jmx url: 192.168.205.197:10002/jmx +# Noted that, you must config hive params in hive-site.xml to enable hive monitor itself: +# hive.metastore.metrics.enabled:true +# hive.server2.metrics.enabled :true +# hive.service.metrics.reporter :JMX +rules: + - pattern: 'Hadoop(\w+)' + name: hive_metrics_system_$1 + attrNameSnakeCase: true + help: "hadoop hive metrics system status" + - pattern: 'Hadoop(\w+)' + name: hive_ugi_metrics_$1 + attrNameSnakeCase: true + help: "hadoop hive metrics system status" + - pattern: 'metrics<>Value' + name: hive_metrics_buffers_mapped_count + - pattern: 'metrics<>Value' + name: hive_metrics_memory_non_heap_usage + - pattern: 'metrics<>Value' + name: hive_metrics_gc_PS_Scavenge_time + - pattern: 'metrics<>Value' + name: hive_metrics_memory_non_heap_init + - pattern: 'metrics<>Value' + name: hive_metrics_memory_pools_Code_Cache_usage + - pattern: 'metrics<>Value' + name: hive_metrics_buffers_direct_used + - pattern: 'metrics<>Value' + name: hive_metrics_memory_total_committed + - pattern: 'metrics<>Value' + name: hive_metrics_buffers_mapped_capacity + - pattern: 'metrics<>Value' + name: hive_metrics_memory_heap_max + - pattern: 'metrics<>Value' + name: hive_metrics_threads_timed_waiting_count + - pattern: 'metrics<>Value' + name: hive_metrics_memory_heap_usage + - pattern: 'metrics<>Value' + name: hive_metrics_memory_non_heap_max + - pattern: 'metrics<>Value' + name: hive_metrics_threads_runnable_count + - pattern: 'metrics<>Value' + name: hive_metrics_memory_pools_PS_Eden_Space_usage + - pattern: 'metrics<>Value' + name: hive_metrics_memory_non_heap_used + - pattern: 'metrics<>Value' + name: hive_metrics_gc_PS_Mark_Sweep_count + - pattern: 'metrics<>Value' + name: hive_metrics_buffers_mapped_used + - pattern: 'metrics<>Value' + name: hive_metrics_gc_PS_Scavenge_count + - pattern: 'metrics<>Value' + name: hive_metrics_threads_new_count + - pattern: 'metrics<>Value' + name: hive_metrics_memory_heap_used + - pattern: 'metrics<>Value' + name: hive_metrics_memory_total_init + - pattern: 'metrics<>Value' + name: hive_metrics_memory_pools_Metaspace_usage + - pattern: 'metrics<>Value' + name: hive_metrics_memory_pools_PS_Old_Gen_usage + - pattern: 'metrics<>Value' + name: hive_metrics_threads_daemon_count + - pattern: 'metrics<>Value' + name: hive_metrics_memory_total_max + - pattern: 'metrics<>Value' + name: hive_metrics_threads_count + - pattern: 'metrics<>Value' + name: hive_metrics_threads_deadlock_count + - pattern: 'metrics<>Value' + name: hive_metrics_memory_heap_init + - pattern: 'metrics<>Value' + name: hive_metrics_threads_terminated_count + - pattern: 'metrics<>Value' + name: hive_metrics_buffers_direct_count + - pattern: 'metrics<>Value' + name: hive_metrics_memory_total_used + - pattern: 'metrics<>Value' + name: hive_metrics_memory_non_heap_committed + - pattern: 'metrics<>Value' + name: hive_metrics_memory_pools_PS_Survivor_Space_usage + - pattern: 'metrics<>Value' + name: hive_metrics_class_loading_loaded + - pattern: 'metrics<>Value' + name: hive_metrics_threads_waiting_count + - pattern: 'metrics<>Value' + name: hive_metrics_class_loading_unloaded + - pattern: 'metrics<>Value' + name: hive_metrics_memory_heap_committed + - pattern: 'metrics<>Value' + name: hive_metrics_gc_PS_Mark_Sweep_time + + diff --git a/example_configs/yarn-nodemanager.yml b/example_configs/yarn-nodemanager.yml new file mode 100644 index 00000000..5d30e61e --- /dev/null +++ b/example_configs/yarn-nodemanager.yml @@ -0,0 +1,14 @@ +ssl: false +lowercaseOutputName: true +lowercaseOutputLabelNames: true +rules: + - pattern: 'Hadoop<>(\w+)' + name: hadoop_nodemanager_rpc_activity_for_port_$2 + attrNameSnakeCase: true + labels: + "port": $1 + help: "rpc activity for port metric, parse from jmx bean: {Hadoop:service=NodeManager, name=RpcActivityForPort$1}.$2" + - pattern: 'Hadoop<>(\w+)' + name: hadoop_nodemanager_$1_$2 + attrNameSnakeCase: true + help: "Common config, parse from jmx bean: {Hadoop:service=NodeManager, name=$1}.$2" diff --git a/example_configs/yarn-resourcemanager.yml b/example_configs/yarn-resourcemanager.yml new file mode 100644 index 00000000..9d54b576 --- /dev/null +++ b/example_configs/yarn-resourcemanager.yml @@ -0,0 +1,63 @@ +ssl: false +lowercaseOutputName: true +lowercaseOutputLabelNames: true +rules: + - pattern: 'Hadoop<>(\w+)' + name: hadoop_resourcemanager_metrics_system_$1_$2 + attrNameSnakeCase: true + help: "rpc activity for port metric, parse from jmx bean: {Hadoop:service=ResourceManager, name=RpcActivityForPort$1}.$2" + - pattern: 'Hadoop<>(\w+)' + name: hadoop_resourcemanager_rpc_activity_for_port_$2 + attrNameSnakeCase: true + labels: + "port": $1 + help: "rpc activity for port metric, parse from jmx bean: {Hadoop:service=ResourceManager, name=RpcActivityForPort$1}.$2" + - pattern: 'Hadoop<>(\w+)' + name: hadoop_resourcemanager_rpc_activity_for_port_$2 + attrNameSnakeCase: true + labels: + "port": $1 + help: "rpc activity for port metric, parse from jmx bean: {Hadoop:service=ResourceManager, name=RpcActivityForPort$1}.$2" + - pattern: 'Hadoop<>(\w+)' + name: hadoop_resourcemanager_queue_metrics_$5 + attrNameSnakeCase: true + labels: + "q0": "$1" + "q1": "$2" + "q2": "$3" + "user": "$4" + - pattern: 'Hadoop<>(\w+)' + name: hadoop_resourcemanager_queue_metrics_$4 + attrNameSnakeCase: true + labels: + "q0": "$1" + "q1": "$2" + "q2": "$3" + - pattern: 'Hadoop<>(\w+)' + name: hadoop_resourcemanager_queue_metrics_$4 + attrNameSnakeCase: true + labels: + "q0": "$1" + "q1": "$2" + "user": "$3" + - pattern: 'Hadoop<>(\w+)' + name: hadoop_resourcemanager_queue_metrics_$3 + attrNameSnakeCase: true + labels: + "q0": "$1" + "q1": "$2" + - pattern: 'Hadoop<>(\w+)' + name: hadoop_resourcemanager_queue_metrics_$3 + attrNameSnakeCase: true + labels: + "q0": "$1" + "user": "$2" + - pattern: 'Hadoop<>(\w+)' + name: hadoop_resourcemanager_queue_metrics_$2 + attrNameSnakeCase: true + labels: + "q0": "$1" + - pattern: 'Hadoop<>(\w+)' + name: hadoop_resourcemanager_$1_$2 + attrNameSnakeCase: true + help: "Common config, parse from jmx bean: {Hadoop:service=ResourceManager, name=$1}.$2"