Skip to content

Commit f9249fc

Browse files
authored
feat: ✨ add support for TrueNAS 25.04 (#87)
* feat: ✨ new cgroup metrics * feat: ✨ add arcstats * feat: ✨ add disk by ID mapping for disk I/O metrics * chore(ci): 🚀 improve docker workflow and image * fix(ci): 🐛 remove labels set by workflow
1 parent 532c828 commit f9249fc

File tree

3 files changed

+83
-12
lines changed

3 files changed

+83
-12
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ jobs:
2525
# This is used to complete the identity challenge
2626
# with sigstore/fulcio when running outside of PRs.
2727
id-token: write
28-
strategy:
29-
fail-fast: false
30-
matrix:
31-
platform:
32-
- linux/amd64
33-
- linux/arm/v7
34-
- linux/arm64
35-
3628
steps:
3729
- name: Install cosign
3830
if: github.event_name != 'pull_request'
@@ -60,7 +52,7 @@ jobs:
6052
with:
6153
context: .
6254
labels: ${{ steps.meta.outputs.labels }}
63-
platforms: ${{ matrix.platform }}
55+
platforms: linux/amd64,linux/arm64, linux/arm/v7
6456
push: ${{ github.event_name != 'pull_request' }}
6557
tags: ${{ steps.meta.outputs.tags }}
6658
- name: Sign the published Docker image

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM prom/graphite-exporter:v0.16.0
22

3+
LABEL maintainer="Supporterino <[email protected]>"
4+
LABEL org.opencontainers.image.authors="Supporterino <[email protected]>"
5+
36
COPY graphite_mapping.conf /config/graphite_mapping.conf
47

58
ENTRYPOINT ["/bin/graphite_exporter", "--graphite.mapping-config=/config/graphite_mapping.conf"]

graphite_mapping.conf

Lines changed: 79 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,16 @@ mappings:
637637
cgroup: "${2}"
638638
unit: "percent"
639639

640+
- match: 'truenas\.(.*)\.(.*)\.io\.(.*)'
641+
match_type: "regex"
642+
name: "cgroup_io_usage"
643+
labels:
644+
job: "truenas"
645+
type: "${3}"
646+
instance: "${1}"
647+
cgroup: "${2}"
648+
unit: "KiB/s"
649+
640650
- match: 'truenas\.(.*)\.(.*)\.io_full_pressure\.(.*)'
641651
match_type: "regex"
642652
name: "cgroup_io_full_pressure"
@@ -677,6 +687,16 @@ mappings:
677687
cgroup: "${2}"
678688
unit: "ms"
679689

690+
- match: 'truenas\.(.*)\.(.*)\.mem\.(.*)'
691+
match_type: "regex"
692+
name: "cgroup_memory_detailed_usage"
693+
labels:
694+
job: "truenas"
695+
type: "${3}"
696+
instance: "${1}"
697+
cgroup: "${2}"
698+
unit: "MiB"
699+
680700
- match: 'truenas\.(.*)\.(.*)\.mem_full_pressure\.(.*)'
681701
match_type: "regex"
682702
name: "cgroup_mem_full_pressure"
@@ -687,7 +707,7 @@ mappings:
687707
cgroup: "${2}"
688708
unit: "percent"
689709

690-
- match: 'truenas\.(.*)\.(.*)\.mem_full_pressure_stall_time\.time'
710+
- match: 'truenas\.(.*)\.(.*)\.memory_full_pressure_stall_time\.time'
691711
match_type: "regex"
692712
name: "cgroup_mem_full_pressure_stall_time"
693713
labels:
@@ -707,7 +727,7 @@ mappings:
707727
cgroup: "${2}"
708728
unit: "percent"
709729

710-
- match: 'truenas\.(.*)\.(.*)\.mem_some_pressure_stall_time\.time'
730+
- match: 'truenas\.(.*)\.(.*)\.memory_some_pressure_stall_time\.time'
711731
match_type: "regex"
712732
name: "cgroup_mem_some_pressure_stall_time"
713733
labels:
@@ -782,4 +802,60 @@ mappings:
782802
type: "${3}"
783803
instance: "${1}"
784804
cgroup: "${2}"
785-
unit: "MiB"
805+
unit: "MiB"
806+
807+
- match: 'truenas\.(.*)\.(.*)\.serviced_ops\.(.*)'
808+
match_type: "regex"
809+
name: "cgroup_serviced_ops"
810+
labels:
811+
job: "truenas"
812+
type: "${3}"
813+
instance: "${1}"
814+
cgroup: "${2}"
815+
unit: "op/s"
816+
817+
################################################
818+
# arcstat mapping
819+
################################################
820+
821+
- match: 'truenas\.(.*)\.truenas_arcstats\.(.*)\.(.*)'
822+
match_type: "regex"
823+
name: "truenas_arcstats"
824+
labels:
825+
job: "truenas"
826+
type: "${2}"
827+
subtype: "${3}"
828+
instance: "${1}"
829+
830+
################################################
831+
# disk by ID mapping
832+
################################################
833+
834+
- match: 'truenas\.(.*)\.truenas_disk_stats\.(.*)\.(reads|writes)'
835+
match_type: "regex"
836+
name: "disk_io"
837+
labels:
838+
job: "truenas"
839+
disk: "${2}"
840+
instance: "${1}"
841+
op: "${3}"
842+
unit: "KiB/s"
843+
844+
- match: 'truenas\.(.*)\.truenas_disk_stats\.(.*)\.(read_ops|write_ops)'
845+
match_type: "regex"
846+
name: "disk_io_ops"
847+
labels:
848+
job: "truenas"
849+
disk: "${2}"
850+
instance: "${1}"
851+
op: "${3}"
852+
unit: "op/s"
853+
854+
- match: 'truenas\.(.*)\.truenas_disk_stats\.(.*)\.busy'
855+
match_type: "regex"
856+
name: "disk_busy"
857+
labels:
858+
job: "truenas"
859+
disk: "${2}"
860+
instance: "${1}"
861+
unit: "ms"

0 commit comments

Comments
 (0)