image: repository: prom/graphite-exporter pullPolicy: IfNotPresent tag: v0.15.1@sha256:9b2900c0ffe258eb4f5485270b12a01c385753897f7f3ad6a2cb64101292a879 service: main: ports: main: protocol: tcp port: 9109 main-udp: enabled: true protocol: udp port: 9109 metrics: enabled: true ports: metrics: enabled: true protocol: http port: 9108 workload: main: podSpec: containers: main: args: - "--graphite.mapping-config=/config/graphite_mapping.conf" metrics: main: enabled: true targetSelector: metrics endpoints: - port: metrics portal: open: enabled: false persistence: config: enabled: true type: configmap mountPath: /config/graphite_mapping.conf objectName: config readOnly: true subPath: graphite_mapping.conf configmap: dashboard: enabled: true labels: grafana_dashboard: "1" data: truenasexporter.json: >- {{ .Files.Get "dashboard.json" | indent 8 }} config: enabled: true data: graphite_mapping.conf: >- mappings: ################################################ # memory mapping ################################################ - match: "truenas.*.system.ram.*" name: "physical_memory" labels: job: "truenas" instance: "${1}" kind: "${2}" - match: "truenas.*.mem.*.*" name: "memory_${2}" labels: job: "truenas" instance: "${1}" kind: "${3}" - match: "truenas.*.system.swap.*" name: "swap" labels: job: "truenas" instance: "${1}" kind: "${2}" ################################################ # disk smart metrics ################################################ - match: "truenas.*.smart.log.smart.disktemp.*.*" name: "disk_temperature" labels: job: "truenas" instance: "${1}" serial: "${2}" ################################################ # disk operation mappings ################################################ - match: "truenas.*.disk.*.*" name: "disk_io" labels: job: "truenas" instance: "${1}" disk: "${2}" op: "${3}" - match: "truenas.*.disk_ops.*.*" name: "disk_io_ops" labels: job: "truenas" instance: "${1}" disk: "${2}" op: "${3}" - match: "truenas.*.disk_ext.*.*" name: "disk_io" labels: job: "truenas" instance: "${1}" disk: "${2}" op: "${3}" - match: "truenas.*.disk_ext_ops.*.*" name: "disk_io_ops" labels: job: "truenas" instance: "${1}" disk: "${2}" op: "${3}" - match: "truenas.*.disk_backlog.*.backlog" name: "disk_io_backlog" labels: job: "truenas" instance: "${1}" disk: "${2}" - match: "truenas.*.disk_busy.*.busy" name: "disk_busy" labels: job: "truenas" instance: "${1}" disk: "${2}" - match: "truenas.*.disk_util.*.utilization" name: "disk_utilization" labels: job: "truenas" instance: "${1}" disk: "${2}" - match: "truenas.*.disk_mops.*.*" name: "disk_io" labels: job: "truenas" instance: "${1}" disk: "${2}" op: "merged_${3}" - match: "truenas.*.disk_ext_mops.*.*" name: "disk_io" labels: job: "truenas" instance: "${1}" disk: "${2}" op: "merged_${3}" - match: "truenas.*.disk_iotime.*.*" name: "disk_iotime" labels: job: "truenas" instance: "${1}" disk: "${2}" op: "${3}" - match: "truenas.*.disk_ext_iotime.*.*" name: "disk_iotime" labels: job: "truenas" instance: "${1}" disk: "${2}" op: "${3}" - match: "truenas.*.disk_qops.*.operations" name: "disk_qops" labels: job: "truenas" instance: "${1}" disk: "${2}" - match: "truenas.*.disk_await.*.*" name: "disk_await" labels: job: "truenas" instance: "${1}" disk: "${2}" op: "${3}" - match: "truenas.*.disk_ext_await.*.*" name: "disk_await" labels: job: "truenas" instance: "${1}" disk: "${2}" op: "${3}" - match: "truenas.*.disk_avgsz.*.*" name: "disk_io_size" labels: job: "truenas" instance: "${1}" disk: "${2}" op: "${3}" - match: "truenas.*.disk_ext_avgsz.*.*" name: "disk_io_size" labels: job: "truenas" instance: "${1}" disk: "${2}" op: "${3}" - match: "truenas.*.disk_svctm.*.svctm" name: "disk_svctm" labels: job: "truenas" instance: "${1}" disk: "${2}" - match: "truenas.*.system.io.*" name: "system_io" labels: job: "truenas" instance: "${1}" op: "${2}" ################################################ # CPU mapping ################################################ - match: "truenas.*.system.intr.interrupts" name: "interrupts" labels: job: "truenas" instance: "${1}" kind: "hard" - match: "truenas.*.system.cpu.softirq" name: "interrupts" labels: job: "truenas" instance: "${1}" kind: "soft" - match: "truenas.*.cpu.*.softirq" name: "cpu_softirq" labels: job: "truenas" instance: "${1}" cpu: "${2}" - match: "truenas.*.system.ctxt.switches" name: "context_switches" labels: job: "truenas" instance: "${1}" - match: "truenas.*.system.cpu.*" name: "cpu_total" labels: job: "truenas" instance: "${1}" kind: "${2}" - match: "truenas.*.cputemp.temperatures.*" name: "cpu_temperature" labels: job: "truenas" instance: "${1}" cpu: "cpu${2}" - match: "truenas.*.cpu.core_throttling.*" name: "cpu_throttling" labels: job: "truenas" instance: "${1}" cpu: "${2}" - match: "truenas.*.cpu.cpufreq.*" name: "cpu_frequency" labels: job: "truenas" instance: "${1}" cpu: "${2}" - match: 'truenas\.(.*)\.cpu\.(.*)_cpuidle\.(.*)' match_type: "regex" name: "cpu_idlestate" labels: job: "truenas" instance: "${1}" cpu: "${2}" state: "${3}" - match: 'truenas\.(.*)\.cpu\.(.*)\.(.*)' match_type: "regex" name: "cpu_usage" labels: job: "truenas" instance: "${1}" cpu: "${2}" kind: "${3}" ################################################ # process mapping ################################################ - match: "truenas.*.system.forks.started" name: "processes_forks" labels: job: "truenas" instance: "${1}" - match: "truenas.*.system.processes.*" name: "processes" labels: job: "truenas" instance: "${1}" kind: "${2}" - match: "truenas.*.system.active_processes.*" name: "processes" labels: job: "truenas" instance: "${1}" kind: "${2}" ################################################ # uptime mapping ################################################ - match: "truenas.*.system.uptime.uptime" name: "uptime" labels: job: "truenas" instance: "${1}" - match: "truenas.*.system.clock_sync_state.state" name: "clock_synced" labels: job: "truenas" instance: "${1}" - match: "truenas.*.system.clock_status.*" name: "clock_status" labels: job: "truenas" instance: "${1}" state: "${2}" - match: "truenas.*.system.clock_sync_offset.offset" name: "clock_offset" labels: job: "truenas" instance: "${1}" ################################################ # load mapping ################################################ - match: "truenas.*.system.load.*" name: "system_load" labels: job: "truenas" instance: "${1}" kind: "${2}" ################################################ # nsfd mappings ################################################ - match: "truenas.*.nfsd.*.*" name: "nfs_${2}" labels: job: "truenas" instance: "${1}" op: "${3}" ################################################ # zfs mappings ################################################ - match: "truenas.*.zfs.*.*" name: "zfs_${2}" labels: job: "truenas" instance: "${1}" op: "${3}" - match: 'truenas\.(.*)\.zfspool\.state_(.*)\.(.*)' match_type: "regex" name: "zfs_pool" labels: job: "truenas" instance: "${1}" pool: "${2}" state: "${3}" ################################################ # network mappings ################################################ - match: "truenas.*.net.*.*" name: "interface_io" labels: job: "truenas" instance: "${1}" interface: "${2}" op: "${3}" - match: "truenas.*.net_speed.*.speed" name: "interface_speed" labels: job: "truenas" instance: "${1}" interface: "${2}" - match: "truenas.*.net_duplex.*.*" name: "interface_duplex" labels: job: "truenas" instance: "${1}" interface: "${2}" state: "${3}" - match: "truenas.*.net_operstate.*.*" name: "interface_operationstate" labels: job: "truenas" instance: "${1}" interface: "${2}" state: "${3}" - match: "truenas.*.net_carrier.*.*" name: "interface_carrierstate" labels: job: "truenas" instance: "${1}" interface: "${2}" state: "${3}" - match: "truenas.*.net_mtu.*.mtu" name: "interface_mtu" labels: job: "truenas" instance: "${1}" interface: "${2}" - match: "truenas.*.net_packets.*.*" name: "interface_packets" labels: job: "truenas" instance: "${1}" interface: "${2}" op: "${3}" - match: "truenas.*.net_errors.*.*" name: "interface_errors" labels: job: "truenas" instance: "${1}" interface: "${2}" op: "${3}" - match: "truenas.*.net_drops.*.*" name: "interface_drops" labels: job: "truenas" instance: "${1}" interface: "${2}" op: "${3}" - match: "truenas.*.system.net.*" name: "system_net_io" labels: job: "truenas" instance: "${1}" op: "${2}"