From nobody Tue Nov 02 06:36:24 2021 X-Original-To: fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 327331824313 for ; Tue, 2 Nov 2021 06:36:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hk0Y50rrMz4RFS for ; Tue, 2 Nov 2021 06:36:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE57D20410 for ; Tue, 2 Nov 2021 06:36:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1A26aOGx024454 for ; Tue, 2 Nov 2021 06:36:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1A26aO58024453 for fs@FreeBSD.org; Tue, 2 Nov 2021 06:36:24 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 259607] sysutils/node_exporter / OpenZFS: need better handling for ZFS statistic numbers Date: Tue, 02 Nov 2021 06:36:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: delphij@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: dor.bsd@xm0.uk X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259607 Bug ID: 259607 Summary: sysutils/node_exporter / OpenZFS: need better handling for ZFS statistic numbers Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: dor.bsd@xm0.uk Reporter: delphij@FreeBSD.org CC: dor.bsd@xm0.uk, fs@FreeBSD.org CC: dor.bsd@xm0.uk Flags: maintainer-feedback?(dor.bsd@xm0.uk) node_exporter is spamming syslog with: level=3Derror ts=3D2021-11-02T06:18:08.285Z caller=3Dstdlib.go:105 msg=3D"e= rror gathering metrics: 11 error(s) occurred:\n* [from Gatherer #2] collected me= tric \"sysctl_vfs_zfs_l2arc_write_boost\" { untyped: } was collected before with the same name and label values\n* [from Gatherer #2] collected metric \"sysctl_vfs_zfs_arc_max\" { untyped: } was collected before with the same name and label values\n* [from Gatherer #2] collected metric \"sysctl_vfs_zfs_l2arc_feed_min_ms\" { untyped: } was collected before with the same name and label values\n* [from Gathe= rer #2] collected metric \"sysctl_vm_uma_tcp_log_bucket_size\" { untyped: } was collected before with the same name and label values\n* [from Gathe= rer #2] collected metric \"sysctl_vfs_zfs_l2arc_write_max\" { untyped: } was collected before with the same name and label values\n* [from Gatherer #2] collected metric \"sysctl_vfs_zfs_l2arc_feed_again\" { untyped: } was collected be= fore with the same name and label values\n* [from Gatherer #2] collected metric \"sysctl_vfs_zfs_l2arc_norw\" { untyped: } was collected before w= ith the same name and label values\n* [from Gatherer #2] collected metric \"sysctl_vfs_zfs_l2arc_noprefetch\" { untyped: } was collected be= fore with the same name and label values\n* [from Gatherer #2] collected metric \"sysctl_vfs_zfs_arc_min\" { untyped: } was collected before with= the same name and label values\n* [from Gatherer #2] collected metric \"sysctl_vfs_zfs_l2arc_feed_secs\" { untyped: } was collected bef= ore with the same name and label values\n* [from Gatherer #2] collected metric \"sysctl_vfs_zfs_l2arc_headroom\" { untyped: } was collected befo= re with the same name and label values" The problem is that some ZFS values are exported from two OIDs, for example: vfs.zfs.l2arc_feed_min_ms: 200 vfs.zfs.l2arc.feed_min_ms: 200 But node_exporter is aliasing "." to "_" unconditionally. To get a list of all affected sysctl OIDs, one can use: sysctl -da | grep -E \("$(sysctl -Na | sed -e s,\\.,_,g | sort | uniq -c | = sort -n | awk '{ if ($1 >1) print $2; }' | sed -e s,_,.,g | paste -sd \| -)"\): and on FreeBSD 13.0-RELEASE-p4, I got: vm.uma.tcp_log_bucket.size: Allocation size vm.uma.tcp_log.bucket_size: Desired per-cpu cache size vfs.zfs.arc_max: max arc size (LEGACY) vfs.zfs.arc_min: min arc size (LEGACY) vfs.zfs.l2arc_norw: no reads during writes (LEGACY) vfs.zfs.l2arc_feed_again: turbo warmup (LEGACY) vfs.zfs.l2arc_noprefetch: don't cache prefetch bufs (LEGACY) vfs.zfs.l2arc_feed_min_ms: min interval milliseconds (LEGACY) vfs.zfs.l2arc_feed_secs: interval seconds (LEGACY) vfs.zfs.l2arc_headroom: number of dev writes (LEGACY) vfs.zfs.l2arc_write_boost: extra write during warmup (LEGACY) vfs.zfs.l2arc_write_max: max write size (LEGACY) vfs.zfs.l2arc.norw: No reads during writes vfs.zfs.l2arc.feed_again: Turbo L2ARC warmup vfs.zfs.l2arc.noprefetch: Skip caching prefetched buffers vfs.zfs.l2arc.feed_min_ms: Min feed interval in milliseconds vfs.zfs.l2arc.feed_secs: Seconds between L2ARC writing vfs.zfs.l2arc.headroom: Number of max device writes to precache vfs.zfs.l2arc.write_boost: Extra write bytes during device warmup vfs.zfs.l2arc.write_max: Max write bytes per interval vfs.zfs.arc.max: Max arc size vfs.zfs.arc.min: Min arc size So it's not just ZFS. I *think* the proper fix should be to change the translation code to first replace all _ with __, then replace . with _. --=20 You are receiving this mail because: You are on the CC list for the bug.=