参数 | 说明 |
名称 | 集成名称,命名规范如下: 名称具有唯一性。 名称需要符合下面的正则:'^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$'。 |
域名 | Aerospike 数据库域名。 |
地址 | Aerospike 数据库端口。 |
用户名 | Aerospike 数据库用户名称。 |
密码 | Aerospike 数据库密码。 |
标签 | 给指标添加自定义 Label。 |
apiVersion: v1kind: Secretmetadata:name: aerospike-secret-test # 根据业务需要调整成相应名称namespace: aerospike-demo # 根据业务需要调整到相应命名空间type: OpaquestringData:ape.toml: |-[Agent]# metrics server timeout in secondstimeout = 30# support system statistics alsorefresh_system_stats = true# prometheus binding portbind = ":8080" # 暴露指标端口[Aerospike]db_host = "127.0.0.1" # 根据业务需要调整成对应的 IP 或域名db_port = 3000 # 根据业务需要调整成对应的端口user = "admin" # 根据业务需要调整成对应的用户名password = "admin" # 根据业务需要调整成对应的密码# timeout for sending commands to the server node in secondstimeout = 30gauge_stats_list.toml: |-# This file represents a list of metrics which are treated as Gauges while exporting to Prometheus or some other Observability tool.# to know more about these stats, please visit https://docs.aerospike.com## SETS: below section define all Sets stats which are treated as Gauges#sets_gauge_stats = ["device_data_bytes","index_populating","memory_data_bytes","objects","sindexes","tombstones","truncate_lut",# 7.0 changes"data_used_bytes","truncating",]## XDR: below section define all XDR stats which are treated as Gauges#xdr_gauge_stats = ["compression_ratio","in_progress","in_queue","lag","lap_us","latency_ms","nodes","recoveries_pending","throughput","uncompressed_pct",]## Sindex: below section define all Sindex stats which are treated as Gauges#sindex_gauge_stats = ["entries_per_bval","entries_per_rec","entries","histogram", # removed in server6.0"ibtr_memory_used", # removed in server6.0"keys", # removed in server6.0"load_pct","load_time","loadtime", # removed in server6.0"memory_used", # deprecated in server6.3 version and replaced by used_bytes"nbtr_memory_used", # removed in server6.0"query_basic_avg_rec_count", # removed in server6.0"used_bytes", # added in server6.3 represents memory used by data (aka memory_used)]## Node: below section define all Node stats which are treated as Gauges#node_gauge_stats = ["batch_index_proto_compression_ratio","batch_index_proto_uncompressed_pct","batch_index_queue","batch_index_unused_buffers","client_connections","cluster_clock_skew_ms","cluster_clock_skew_stop_writes_sec","cluster_integrity","cluster_is_member","cluster_max_compatibility_id","cluster_min_compatibility_id","cluster_size","fabric_bulk_recv_rate","fabric_bulk_send_rate","fabric_connections","fabric_ctrl_recv_rate","fabric_ctrl_send_rate","fabric_meta_recv_rate","fabric_meta_send_rate","fabric_rw_recv_rate","fabric_rw_send_rate","failed_best_practices","heap_active_kbytes","heap_allocated_kbytes","heap_efficiency_pct","heap_mapped_kbytes","heap_site_count","heartbeat_connections","info_queue","migrate_partitions_remaining","objects","process_cpu_pct","proxy_in_progress","queries_active","rw_in_progress","scans_active","sindex_gc_list_creation_time","sindex_gc_list_deletion_time","system_free_mem_pct","system_kernel_cpu_pct","system_total_cpu_pct","system_user_cpu_pct","threads_detached","threads_joinable","threads_pool_active","threads_pool_total","time_since_rebalance","tombstones","tree_gc_queue","tsvc_queue",## 4.x XDR stats"dlog_free_pct","dlog_used_objects","xdr_active_failed_node_sessions","xdr_active_link_down_sessions","xdr_global_lastshiptime","xdr_read_active_avg_pct","xdr_read_idle_avg_pct","xdr_read_latency_avg","xdr_read_reqq_used_pct","xdr_read_reqq_used","xdr_read_respq_used","xdr_read_txnq_used_pct","xdr_read_txnq_used","xdr_ship_compression_avg_pct","xdr_ship_inflight_objects","xdr_ship_latency_avg","xdr_ship_outstanding_objects","xdr_throughput","xdr_timelag",]## Namespace: below section define all Namespace stats which are treated as Gauges#namespace_gauge_stats =["appeals_rx_active","appeals_tx_active","appeals_tx_remaining","available_bin_names","cache_read_pct","clock_skew_stop_writes","dead_partitions","defrag_q","device_available_pct","device_compression_ratio","device_free_pct","device_total_bytes","device_used_bytes","effective_is_quiesced","effective_prefer_uniform_balance","effective_replication_factor","evict_ttl","hwm_breached","index_flash_alloc_bytes","index_flash_alloc_pct","index_flash_used_bytes","index_flash_used_pct","index_pmem_used_bytes","index_pmem_used_pct","master_objects","master_tombstones","memory_free_pct","memory_used_bytes","memory_used_data_bytes","memory_used_index_bytes","memory_used_set_index_bytes","memory_used_sindex_bytes","migrate_rx_instances","migrate_rx_partitions_active","migrate_rx_partitions_initial","migrate_rx_partitions_remaining","migrate_signals_active","migrate_signals_remaining","migrate_tx_instances","migrate_tx_partitions_active","migrate_tx_partitions_imbalance","migrate_tx_partitions_initial","migrate_tx_partitions_lead_remaining","migrate_tx_partitions_remaining","n_nodes_quiesced","non_expirable_objects","non_replica_objects","non_replica_tombstones","ns_cluster_size","nsup_cycle_deleted_pct","nsup_cycle_duration","nsup_cycle_sleep_pct","objects","pending_quiesce","pmem_available_pct","pmem_compression_ratio","pmem_free_pct","pmem_total_bytes","pmem_used_bytes","prole_objects","prole_tombstones","query_aggr_avg_rec_count","query_basic_avg_rec_count","query_proto_compression_ratio","query_proto_uncompressed_pct","record_proto_compression_ratio","record_proto_uncompressed_pct","scan_proto_compression_ratio","scan_proto_uncompressed_pct","shadow_write_q","stop_writes","storage-engine.device.defrag_q","storage-engine.device.free_wblocks","storage-engine.device.shadow_write_q","storage-engine.device.used_bytes","storage-engine.device.write_q","storage-engine.device.age","storage-engine.file.defrag_q","storage-engine.file.free_wblocks","storage-engine.file.shadow_write_q","storage-engine.file.used_bytes","storage-engine.file.write_q","storage-engine.file.age","storage-engine.stripe.defrag_q","storage-engine.stripe.free_wblocks","storage-engine.stripe.shadow_write_q","storage-engine.stripe.used_bytes","storage-engine.stripe.write_q","storage-engine.stripe.age","storage-engine.stripe.backing_write_q","migrate_fresh_partitions","tombstones","truncate_lut","unavailable_partitions","unreplicated_records","write_q","xdr_bin_cemeteries","xdr_tombstones",# added in 7.0"data_avail_pct","data_compression_ratio","data_total_bytes","data_used_bytes","data_used_pct","index_mounts_used_pct","index_used_bytes","indexes_memory_used_pct","set_index_used_bytes","sindex_mounts_used_pct","sindex_used_bytes","truncating",]# System Info Gauge metrics list#system_info_gauge_stats = ["",]
apiVersion: apps/v1kind: Deploymentmetadata:labels:k8s-app: aerospike-exporter # 根据业务需要调整成对应的名称,建议加上 Aerospike 实例的信息name: aerospike-exporter # 根据业务需要调整成对应的名称,建议加上 Aerospike 实例的信息namespace: aerospike-demo # 根据业务需要调整成对应的命名空间spec:replicas: 1selector:matchLabels:k8s-app: aerospike-exporter # 根据业务需要调整成对应的名称,建议加上 Aerospike 实例的信息template:metadata:labels:k8s-app: aerospike-exporter # 根据业务需要调整成对应的名称,建议加上 Aerospike 实例的信息spec:volumes:- name: secsecret:defaultMode: 420secretName: aerospike-secret-test # 对应 步骤二 配置名称containers:- name: aerospike-exporterimage: ccr.ccs.tencentyun.com/rig-agent/common-image:aerospike-exporter-1.18.0imagePullPolicy: IfNotPresentports:- containerPort: 8080 # 对应 步骤二 配置中的指标导出端口name: metricslivenessProbe:tcpSocket:port: metricsreadinessProbe:tcpSocket:port: metricsvolumeMounts:- mountPath: /etc/aerospike-prometheus-exportername: secreadOnly: true
wget -qO- http://localhost:8080/metrics
PodMonitors
来定义 Prometheus 抓取任务,YAML 配置示例如下:apiVersion: monitoring.coreos.com/v1kind: PodMonitormetadata:name: aerospike-exporter # 填写一个唯一名称namespace: cm-prometheus # 按量实例: 集群的 namesapce; 包年包月实例(已停止售卖): namespace 固定,不要修改spec:podMetricsEndpoints:- interval: 30sport: metric-port # 填写pod yaml中Prometheus Exporter对应的Port的Namepath: /metrics # 填写Prometheus Exporter对应的Path的值,不填默认/metricsrelabelings:- action: replacesourceLabels:- instanceregex: (.*)targetLabel: instancereplacement: 'crs-xxxxxx' # 调整成对应的 Aerospike 实例 IDnamespaceSelector: # 选择要监控 aerospike exporter pod 所在的 namespacematchNames:- aerospike-demoselector: # 填写要监控pod的Label值,以定位目标podmatchLabels:k8s-app: aerospike-exporter
名称 | 描述 |
bind | 指标导出端口,默认":9145" |
cert_file | 签名用证书文件 |
key_file | 签名用证书文件 |
root_ca | 签名用证书文件 |
basic_auth_username | http auth 验证用户名 |
basic_auth_password | http auth 验证密码 |
timeout | 指标拉取超时 |
labels | 自定义标签值 |
refresh_system_stats | 支持系统数据统计 |
名称 | 描述 |
db_host | Aerospike 数据库域名或 IP |
db_port | Aerospike 数据库服务端口 |
auth_mode | Aerospike 校验模式,默认 internal,取值有 "external","internal","pki","" |
user | Aerospike 数据库用户名 |
password | Aerospike 数据库密码 |
timeout | Aerospike 数据库连接超时 |
本页内容是否解决了您的问题?