[pkg-nagios-changes] [Git][nagios-team/nagios-snmp-plugins][development] 20 commits: Add Rules-Requires-Root to control file.

Jan Wagner (@waja) gitlab at salsa.debian.org
Tue Sep 5 12:59:00 BST 2023



Jan Wagner pushed to branch development at Debian Nagios Maintainer Group / nagios-snmp-plugins


Commits:
36ad1226 by Bas Couwenberg at 2022-11-30T09:10:01+01:00
Add Rules-Requires-Root to control file.

- - - - -
465be3fd by Jan Wagner at 2022-12-14T08:44:16+00:00
d/control: Drop 'pkg-' from Vcs-Headers

- - - - -
8bb19983 by Debian Janitor at 2022-12-14T10:09:56+00:00
Remove constraints unnecessary since buster (oldstable)

* nagios-snmp-plugins: Drop dependency on essential package perl-base (>= 5.8.4-8) in Depends.

Changes-By: deb-scrub-obsolete

- - - - -
7456f80b by Jan Wagner at 2022-12-14T10:10:30+00:00
Merge branch 'pkg-nagios-snmp-plugins-scrub-obsolete'

- - - - -
16004b91 by Debian Janitor at 2023-01-13T10:40:12+00:00
Remove constraints unnecessary since buster (oldstable)

* nagios-snmp-plugins: Drop dependency on essential package perl-base (>= 5.8.4-8) in Depends.

Changes-By: deb-scrub-obsolete

- - - - -
ea50f546 by Jan Wagner at 2023-01-13T10:40:49+00:00
Bump debhelper from old 12 to 13.

Changes-By: lintian-brush
Fixes: lintian: package-uses-old-debhelper-compat-version
See-also: https://lintian.debian.org/tags/package-uses-old-debhelper-compat-version.html

- - - - -
4f38dec7 by Jan Wagner at 2023-01-13T10:41:04+00:00
Update standards version to 4.6.2, no changes needed.

Changes-By: lintian-brush
Fixes: lintian: out-of-date-standards-version
See-also: https://lintian.debian.org/tags/out-of-date-standards-version.html

- - - - -
a193b79f by Jan Wagner at 2023-01-13T10:46:13+00:00
Adding d/p/19_check_snmp_int_remove_unneeded_my from upstream

- - - - -
fdc0108a by Jan Wagner at 2023-01-13T10:48:13+00:00
Adding d/p/20_check_snmp_int_avaid_huge_amount_of_regex from upstream

- - - - -
d4bd9c98 by Jan Wagner at 2023-01-13T10:50:17+00:00
Adding d/p/21_check_snmp_load_update_fortiswitch_and_fortigate4.3 from upstream

- - - - -
f4939717 by Jan Wagner at 2023-01-13T11:09:51+00:00
Merge branch 'master' into development

- - - - -
e2bdf2d8 by Jan Wagner at 2023-01-23T11:23:20+00:00
Adding d/p/22_check_snmp_storage_fix_space_btrfs from upstream

- - - - -
cc498cd2 by Jan Wagner at 2023-01-23T14:19:15+00:00
Prepare release

- - - - -
885218a3 by Jan Wagner at 2023-01-23T14:23:58+00:00
New changelog

- - - - -
671e17c2 by dependabot[bot] at 2023-03-07T05:00:25+00:00
build(deps): bump dawidd6/action-debian-package from 1.4.4 to 1.5.0

Bumps [dawidd6/action-debian-package](https://github.com/dawidd6/action-debian-package) from 1.4.4 to 1.5.0.
- [Release notes](https://github.com/dawidd6/action-debian-package/releases)
- [Commits](https://github.com/dawidd6/action-debian-package/compare/v1.4.4...v1.5.0)

---
updated-dependencies:
- dependency-name: dawidd6/action-debian-package
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support at github.com>
- - - - -
a27b58ae by waja at 2023-03-07T06:05:42+01:00
Merge pull request #9 from waja/dependabot-github_actions-dawidd6-action-debian-package-1.5.0


- - - - -
13ac6fb8 by Bas Couwenberg at 2023-08-26T08:43:38+02:00
Explicitly enable test-build-twice job.

- - - - -
d9bb2c8c by dependabot[bot] at 2023-09-05T04:33:31+00:00
build(deps): bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support at github.com>
- - - - -
003fec0f by waja at 2023-09-05T08:59:11+02:00
Merge pull request #10 from waja/dependabot-github_actions-actions-checkout-4

build(deps): bump actions/checkout from 3 to 4
- - - - -
05b20357 by Jan Wagner at 2023-09-05T13:55:19+02:00
Merge branch 'master' of github.com:waja/nagios-snmp-plugins

- - - - -


10 changed files:

- .github/workflows/packaging_test.yml
- .github/workflows/release.yml
- debian/.gitlab-ci.yml
- debian/changelog
- debian/control
- + debian/patches/19_check_snmp_int_remove_unneeded_my
- + debian/patches/20_check_snmp_int_avaid_huge_amount_of_regex
- + debian/patches/21_check_snmp_load_update_fortiswitch_and_fortigate4.3
- + debian/patches/22_check_snmp_storage_fix_space_btrfs
- debian/patches/series


Changes:

=====================================
.github/workflows/packaging_test.yml
=====================================
@@ -17,7 +17,7 @@ jobs:
   test:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout at v3
+    - uses: actions/checkout at v4
       env:
         DEBIAN_FRONTEND: "noninteractive"
     - name: Remove github artefacts
@@ -27,7 +27,7 @@ jobs:
       run: |
         sed -i '0,/restricted/s//stable/' debian/changelog
     - name: Build Debian package
-      uses: dawidd6/action-debian-package at v1.4.4
+      uses: dawidd6/action-debian-package at v1.5.0
       with:
         artifacts_directory: debian/build/release/
         os_distribution: testing


=====================================
.github/workflows/release.yml
=====================================
@@ -18,7 +18,7 @@ jobs:
       release-id: ${{ steps.create_release.outputs.id }}
     steps:
       - name: Checkout code
-        uses: actions/checkout at v3
+        uses: actions/checkout at v4
       - name: Install needed packages
         run: |
           if [ $(dpkg -l | grep -c dpkg-dev) -ne 1 ]; then sudo apt-get update && sudo apt-get install -y dpkg-dev; fi
@@ -43,7 +43,7 @@ jobs:
     needs: create-release
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout at v3
+    - uses: actions/checkout at v4
       env:
         DEBIAN_FRONTEND: "noninteractive"
     - name: Remove github artefacts
@@ -53,7 +53,7 @@ jobs:
       run: |
         sed -i '0,/restricted/s//stable/' debian/changelog
     - name: Build Debian package
-      uses: dawidd6/action-debian-package at v1.4.4
+      uses: dawidd6/action-debian-package at v1.5.0
       with:
         artifacts_directory: debian/build/release/
         os_distribution: testing


=====================================
debian/.gitlab-ci.yml
=====================================
@@ -1,14 +1,15 @@
+---
 include:
- - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
 
 variables:
- RELEASE: 'unstable'
- SALSA_CI_DISABLE_APTLY: 0
- SALSA_CI_DISABLE_AUTOPKGTEST: 0
- SALSA_CI_DISABLE_BLHC: 0
- SALSA_CI_DISABLE_LINTIAN: 0
- SALSA_CI_DISABLE_PIUPARTS: 0
- SALSA_CI_DISABLE_REPROTEST: 0
- SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 0
- SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 0
+  RELEASE: 'unstable'
+  SALSA_CI_DISABLE_APTLY: 0
+  SALSA_CI_DISABLE_AUTOPKGTEST: 0
+  SALSA_CI_DISABLE_BLHC: 0
+  SALSA_CI_DISABLE_LINTIAN: 0
+  SALSA_CI_DISABLE_PIUPARTS: 0
+  SALSA_CI_DISABLE_REPROTEST: 0
+  SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 0
+  SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 0
+  SALSA_CI_ENABLE_BUILD_PACKAGE_TWICE: 1


=====================================
debian/changelog
=====================================
@@ -1,8 +1,47 @@
-nagios-snmp-plugins (2.1.0-3) UNRELEASED; urgency=medium
+nagios-snmp-plugins (2.1.0-4) UNRELEASED; urgency=medium
 
+  *
+
+ -- Jan Wagner <waja at cyconet.org>  Mon, 23 Jan 2023 14:23:45 +0000
+
+nagios-snmp-plugins (2.1.0-3) unstable; urgency=medium
+
+  [ Jan Wagner ]
   * NOT RELEASED YET
+  * [4ffef41] Adding Github CI
+  * [071a540] Set upstream metadata fields: Bug-Database, Bug-Submit,
+    Repository, Repository-Browse.
+  * [56b1ad4] d/source/options: Adding .github to diff ignore
+  * [731359e] d/source/options: Fixing github ignore
+
+  [ Bas Couwenberg ]
+  * [9f8c997] Bump Standards-Version to 4.6.0, no changes.
+  * [547ca5d] Update watch file to use tags instead of releases.
+  * [0fef6a8] Bump Standards-Version to 4.6.1, no changes.
+
+
+  [ Bas Couwenberg ]
+  * [36ad122] Add Rules-Requires-Root to control file.
+
+  [ Jan Wagner ]
+  * [465be3f] d/control: Drop 'pkg-' from Vcs-Headers
+
+  [ Debian Janitor ]
+  * [8bb1998] Remove constraints unnecessary since buster (oldstable)
+  * [16004b9] Remove constraints unnecessary since buster (oldstable)
+
+  [ Jan Wagner ]
+  * [ea50f54] Bump debhelper from old 12 to 13.
+  * [4f38dec] Update standards version to 4.6.2, no changes needed.
+  * [a193b79] Adding d/p/19_check_snmp_int_remove_unneeded_my from upstream
+  * [fdc0108] Adding d/p/20_check_snmp_int_avaid_huge_amount_of_regex from
+    upstream
+  * [d4bd9c9] Adding d/p/21_check_snmp_load_update_fortiswitch_and_fortigate4.3
+    from upstream
+  * [e2bdf2d] Adding d/p/22_check_snmp_storage_fix_space_btrfs from upstream
+    (Closes: #959956)
 
- -- Jan Wagner <waja at cyconet.org>  Mon, 07 Dec 2020 17:03:12 +0100
+ -- Jan Wagner <waja at cyconet.org>  Mon, 23 Jan 2023 13:45:41 +0000
 
 nagios-snmp-plugins (2.1.0-2) unstable; urgency=medium
 
@@ -23,7 +62,7 @@ nagios-snmp-plugins (2.1.0-2) unstable; urgency=medium
 
   [ Jan Wagner ]
   * [a815051] check_snmp_int.pl: added ign-admindown, ign-emptyalias options.
-    fixed unitialized variable warning by adding d/p/14_check_snmp_int_ign
+    fixed uninitialized variable warning by adding d/p/14_check_snmp_int_ign
     from upstream
   * [c1ffe3e] check_snmp_int.pl: Add spaces only if necessary by adding
     d/p/15_check_snmp_int_spaces from upstream


=====================================
debian/control
=====================================
@@ -3,17 +3,17 @@ Section: net
 Priority: optional
 Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel at lists.alioth.debian.org>
 Uploaders: Jan Wagner <waja at cyconet.org>
-Build-Depends: debhelper-compat (= 12)
+Build-Depends: debhelper-compat (= 13)
+Standards-Version: 4.6.2
+Vcs-Browser: https://salsa.debian.org/nagios-team/nagios-snmp-plugins
+Vcs-Git: https://salsa.debian.org/nagios-team/nagios-snmp-plugins.git
 Homepage: https://github.com/SteScho/manubulon-snmp
-Vcs-Browser: https://salsa.debian.org/nagios-team/pkg-nagios-snmp-plugins
-Vcs-Git: https://salsa.debian.org/nagios-team/pkg-nagios-snmp-plugins.git
-Standards-Version: 4.6.1
+Rules-Requires-Root: no
 
 Package: nagios-snmp-plugins
 Architecture: all
 Depends: libnet-snmp-perl,
          monitoring-plugins-common | nagios-plugins-basic (>= 1.4.5-2),
-         perl-base (>= 5.8.4-8),
          ucf,
          ${misc:Depends},
          ${perl:Depends}


=====================================
debian/patches/19_check_snmp_int_remove_unneeded_my
=====================================
@@ -0,0 +1,23 @@
+From 524e0eec7407bb0f650e28aa3d26e16028b86e54 Mon Sep 17 00:00:00 2001
+From: Steffen Schoch <dein at gehirn-mag.net>
+Date: Tue, 27 Apr 2021 06:14:34 +0200
+Subject: [PATCH] Update check_snmp_int.pl
+
+Removed unneeded my
+---
+ plugins/check_snmp_int.pl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/check_snmp_int.pl b/plugins/check_snmp_int.pl
+index 5fe752e..271cfbc 100755
+--- a/plugins/check_snmp_int.pl
++++ b/plugins/check_snmp_int.pl
+@@ -1038,7 +1038,7 @@ sub check_options {
+             $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_discard'=" . $$result{ $oid_perf_outdisc[$i] } . "c ";
+         }
+         if (defined($o_perfs)) {
+-	    my $speed_real = "" unless (defined($speed_real));
++	    $speed_real = "" unless (defined($speed_real));
+             $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_speed_bps'=" . $speed_real . " ";
+         }
+         if (defined($o_weather) && $usable_data == 1) {


=====================================
debian/patches/20_check_snmp_int_avaid_huge_amount_of_regex
=====================================
@@ -0,0 +1,93 @@
+From c591f7d56378cbb40f1c3c23cbf23a8669a45730 Mon Sep 17 00:00:00 2001
+From: kwork-er <88452982+kwork-er at users.noreply.github.com>
+Date: Thu, 5 Aug 2021 21:53:43 +0200
+Subject: [PATCH] Update check_snmp_int.pl
+
+Effectively reverting commit 9f9b15a926d8795935b54626dc3ab9e5becb2763 and doing it in a different way that avoids adding huge amounts of regex, that may not run on older systems.
+Removed the added " =~ s/\./_/r ", instead replacing the dots (.) in the regex that was meant for it in the first place -> line 967.
+---
+ plugins/check_snmp_int.pl | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/plugins/check_snmp_int.pl b/plugins/check_snmp_int.pl
+index 271cfbc..71f8d14 100755
+--- a/plugins/check_snmp_int.pl
++++ b/plugins/check_snmp_int.pl
+@@ -964,7 +964,7 @@ sub check_options {
+     }
+ 
+     # Get rid of special caracters for performance in description
+-    $descr[$i] =~ s/'\/\(\)/_/g;
++    $descr[$i] =~ s/['\/\(\).]/_/g;
+     if (($int_status == $ok_val) || (defined($o_down) && $int_status == 2) || (defined($o_dormant) && $int_status == 5))
+     {
+         $num_ok++;
+@@ -979,12 +979,12 @@ sub check_options {
+                     $warn_factor /= $speed_real;
+                     $warn_factor *= 100;    # now turn into displayed % : 0,1 = 10%
+                 }
+-                $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_prct'=";
++                $perf_out .= "'" . $descr[$i] . "_in_prct'=";
+                 $perf_out .= sprintf("%.0f", $checkperf_out_raw[0] * 800 / $speed_real) . "%;";
+                 $perf_out .= ($o_warn[0] != 0) ? sprintf("%.0f", $o_warn[0] * $warn_factor) . ";" : ";";
+                 $perf_out .= ($o_crit[0] != 0) ? sprintf("%.0f", $o_crit[0] * $warn_factor) . ";" : ";";
+                 $perf_out .= "0;100 ";
+-                $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_prct'=";
++                $perf_out .= "'" . $descr[$i] . "_out_prct'=";
+                 $perf_out .= sprintf("%.0f", $checkperf_out_raw[1] * 800 / $speed_real) . "%;";
+                 $perf_out .= ($o_warn[1] != 0) ? sprintf("%.0f", $o_warn[1] * $warn_factor) . ";" : ";";
+                 $perf_out .= ($o_crit[1] != 0) ? sprintf("%.0f", $o_crit[1] * $warn_factor) . ";" : ";";
+@@ -1000,12 +1000,12 @@ sub check_options {
+                     } else {                   # just convert from K|M|G bps
+                         $warn_factor = (defined($o_meg)) ? 1000000 : (defined($o_gig)) ? 1000000000 : 1000;
+                     }
+-                    $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_bps'=";
++                    $perf_out .= "'" . $descr[$i] . "_in_bps'=";
+                     $perf_out .= sprintf("%.0f", $checkperf_out_raw[0] * 8) . ";";
+                     $perf_out .= ($o_warn[0] != 0) ? $o_warn[0] * $warn_factor . ";" : ";";
+                     $perf_out .= ($o_crit[0] != 0) ? $o_crit[0] * $warn_factor . ";" : ";";
+                     $perf_out .= "0;" . $speed_real . " ";
+-                    $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_bps'=";
++                    $perf_out .= "'" . $descr[$i] . "_out_bps'=";
+                     $perf_out .= sprintf("%.0f", $checkperf_out_raw[1] * 8) . ";";
+                     $perf_out .= ($o_warn[1] != 0) ? $o_warn[1] * $warn_factor . ";" : ";";
+                     $perf_out .= ($o_crit[1] != 0) ? $o_crit[1] * $warn_factor . ";" : ";";
+@@ -1017,29 +1017,29 @@ sub check_options {
+                     } else {                   # just convert from K|M|G bps
+                         $warn_factor = (defined($o_meg)) ? 1048576 : (defined($o_gig)) ? 1073741824 : 1024;
+                     }
+-                    $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_Bps'=" . sprintf("%.0f", $checkperf_out_raw[0]) . ";";
++                    $perf_out .= "'" . $descr[$i] . "_in_Bps'=" . sprintf("%.0f", $checkperf_out_raw[0]) . ";";
+                     $perf_out .= ($o_warn[0] != 0) ? $o_warn[0] * $warn_factor . ";" : ";";
+                     $perf_out .= ($o_crit[0] != 0) ? $o_crit[0] * $warn_factor . ";" : ";";
+                     $perf_out .= "0;" . $speed_real / 8 . " ";
+-                    $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_Bps'=" . sprintf("%.0f", $checkperf_out_raw[1]) . ";";
++                    $perf_out .= "'" . $descr[$i] . "_out_Bps'=" . sprintf("%.0f", $checkperf_out_raw[1]) . ";";
+                     $perf_out .= ($o_warn[1] != 0) ? $o_warn[1] * $warn_factor . ";" : ";";
+                     $perf_out .= ($o_crit[1] != 0) ? $o_crit[1] * $warn_factor . ";" : ";";
+                     $perf_out .= "0;" . $speed_real / 8 . " ";
+                 }
+             }
+         } else {    # output in octet counter
+-            $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_octet'=" . $$result{ $oid_perf_inoct[$i] } . "c ";
+-            $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_octet'=" . $$result{ $oid_perf_outoct[$i] } . "c ";
++            $perf_out .= "'" . $descr[$i] . "_in_octet'=" . $$result{ $oid_perf_inoct[$i] } . "c ";
++            $perf_out .= "'" . $descr[$i] . "_out_octet'=" . $$result{ $oid_perf_outoct[$i] } . "c ";
+         }
+         if (defined($o_perfe)) {
+-            $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_error'=" . $$result{ $oid_perf_inerr[$i] } . "c ";
+-            $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_discard'=" . $$result{ $oid_perf_indisc[$i] } . "c ";
+-            $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_error'=" . $$result{ $oid_perf_outerr[$i] } . "c ";
+-            $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_discard'=" . $$result{ $oid_perf_outdisc[$i] } . "c ";
++            $perf_out .= "'" . $descr[$i] . "_in_error'=" . $$result{ $oid_perf_inerr[$i] } . "c ";
++            $perf_out .= "'" . $descr[$i] . "_in_discard'=" . $$result{ $oid_perf_indisc[$i] } . "c ";
++            $perf_out .= "'" . $descr[$i] . "_out_error'=" . $$result{ $oid_perf_outerr[$i] } . "c ";
++            $perf_out .= "'" . $descr[$i] . "_out_discard'=" . $$result{ $oid_perf_outdisc[$i] } . "c ";
+         }
+         if (defined($o_perfs)) {
+ 	    $speed_real = "" unless (defined($speed_real));
+-            $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_speed_bps'=" . $speed_real . " ";
++            $perf_out .= "'" . $descr[$i] . "_speed_bps'=" . $speed_real . " ";
+         }
+         if (defined($o_weather) && $usable_data == 1) {
+             $perf_out .= "in=" . sprintf("%.0f", $checkperf_out_raw[0]) . ";;;0;" . sprintf("%.0f", $speed_real / 8) . " ";


=====================================
debian/patches/21_check_snmp_load_update_fortiswitch_and_fortigate4.3
=====================================
@@ -0,0 +1,90 @@
+From 946bd37f5632fead9382f05a3600f0328dae53a1 Mon Sep 17 00:00:00 2001
+From: Martin Botka <16738302+Haxk20 at users.noreply.github.com>
+Date: Mon, 1 Aug 2022 12:14:37 +0200
+Subject: [PATCH] check_snmp_load.pl: Add Fortiswitch & 4.3+ firmware fortigate
+
+This commit adds support for checking the fortiswitch CPU usage
+and also fortigate 4.3 and above firmware. This OID got changed but to keep
+backwards compatibility and not to break already running platforms depending on this
+the new OID was added as new type.
+
+Signed-off-by: Martin Botka <martin.botka at somainline.org>
+---
+ plugins/check_snmp_load.pl | 21 ++++++++++++++-------
+ 1 file changed, 14 insertions(+), 7 deletions(-)
+
+diff --git a/plugins/check_snmp_load.pl b/plugins/check_snmp_load.pl
+index 0959f6a..ecafb59 100755
+--- a/plugins/check_snmp_load.pl
++++ b/plugins/check_snmp_load.pl
+@@ -81,6 +81,12 @@
+ # Fortigate CPU
+ my $fortigate_cpu = ".1.3.6.1.4.1.12356.1.8.0";               # Fortigate CPU % usage
+ 
++# Fortigate CPU
++my $fortigate43_cpu = "1.3.6.1.4.1.12356.101.4.1.3.0";        # Fortigate 4.3 firmware CPU % usage
++
++# Fortigate CPU
++my $fortiswitch_cpu = ".1.3.6.1.4.1.12356.106.4.1.2.0";       # Fortiswitch CPU % usage
++
+ # Linkproof Appliance
+ my $linkproof_cpu = "1.3.6.1.4.1.89.35.1.55.0";               # CPU RE (Routing Engine Tasks)
+ 
+@@ -95,12 +101,12 @@
+ 
+ # valid values
+ my @valid_types
+-    = ("stand", "netsc", "netsl", "as400", "cisco", "cata", "cisg", "nsc", "fg", "bc", "nokia", "hp", "lp", "hpux", "n5k");
++    = ("stand", "netsc", "netsl", "as400", "cisco", "cata", "cisg", "nsc", "fg", "fg43", "fs", "bc", "nokia", "hp", "lp", "hpux", "n5k");
+ 
+ # CPU OID array
+ my %cpu_oid = (
+     "netsc", $ns_cpu_idle,  "as400", $as400_cpu,     "bc", $bluecoat_cpu,  "nokia", $nokia_cpu,
+-    "hp",    $procurve_cpu, "lp",    $linkproof_cpu, "fg", $fortigate_cpu, "n5k",   $n5k_cpu
++    "hp",    $procurve_cpu, "lp",    $linkproof_cpu, "fg", $fortigate_cpu, "fg43", $fortigate43_cpu, "fs", $fortiswitch_cpu, "n5k",   $n5k_cpu
+ );
+ 
+ # Globals
+@@ -113,7 +119,7 @@
+ my $o_verb      = undef;         # verbose mode
+ my $o_version   = undef;         # print version
+ 
+-# check type  : stand | netsc |  netsl | as400 | cisco | cata | cisg | nsc | fg | bc | nokia | hp | lp  | hpux
++# check type  : stand | netsc |  netsl | as400 | cisco | cata | cisg | nsc | fg | fg43| fs | bc | nokia | hp | lp  | hpux
+ my $o_check_type = "stand";
+ 
+ # End compatibility
+@@ -139,7 +145,7 @@
+ 
+ sub print_usage {
+     print
+-"Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>])  [-p <port>] [-P <protocol>] -w <warn level> -c <crit level> -T=[stand|netsl|netsc|as400|cisco|cata|cisg|nsc|fg|bc|nokia|hp|lp|hpux] [-f] [-t <timeout>] [-V]\n";
++"Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>])  [-p <port>] [-P <protocol>] -w <warn level> -c <crit level> -T=[stand|netsl|netsc|as400|cisco|cata|cisg|nsc|fg|fg43|fs|bc|nokia|hp|lp|hpux] [-f] [-t <timeout>] [-V]\n";
+ }
+ 
+ sub isnnum {                     # Return true if arg is not a number
+@@ -201,6 +207,8 @@ sub help {
+ 		cisg  : Cisco small business (SG500) CPU usage (1,5 & 15 minutes values)
+ 		nsc   : NetScreen CPU usage
+ 		fg    : Fortigate CPU usage
++		fg43  : Fortigate CPU usage for 4.3 firmware
++		fs    : Fortiswitch CPU usage
+ 		bc    : Bluecoat CPU usage
+ 		nokia : Nokia CPU usage
+ 		hp    : HP procurve switch CPU usage
+@@ -806,8 +814,8 @@ sub is_legacy_snmp_version {
+     exit $exit_val;
+ }
+ 
+-################## CPU for : AS/400 , Netsnmp, HP, Bluecoat, linkproof, fortigate  ###########
+-if ($o_check_type =~ /netsc|as400|bc|nokia|^hp$|lp|fg/) {
++################## CPU for : AS/400 , Netsnmp, HP, Bluecoat, linkproof, fortigate, fortigate43, fortiswitch  ###########
++if ($o_check_type =~ /netsc|as400|bc|nokia|^hp$|lp|fg|fg43|fs/) {
+ 
+     # Get load table
+     my @oidlist = $cpu_oid{$o_check_type};
+@@ -965,4 +973,3 @@ sub is_legacy_snmp_version {
+     ? print " | cpu_prct_used=$cpu_used%;$o_warn;$o_crit\n"
+     : print "\n";
+ exit $exit_val;
+-


=====================================
debian/patches/22_check_snmp_storage_fix_space_btrfs
=====================================
@@ -0,0 +1,423 @@
+From 42f4ebf23be504e448513a67faa99e02a3d5e3b5 Mon Sep 17 00:00:00 2001
+From: IB Development Team <dev at ib.pl>
+Date: Thu, 19 Jan 2023 10:36:45 +0000
+Subject: [PATCH] No out of space check_snmp_storage warning on btrfs
+
+We've noticed out of space condition in one of btrfs filesystems
+monitored with check_snmp_storage; problem was not detected by
+check_snmp_storage.
+
+Filesystem status:
+
+root at mysrv:~# btrfs fi df -b /mnt
+Data, single: total=2222194688, used=2222194688
+System, DUP: total=8388608, used=16384
+System, single: total=4194304, used=0
+Metadata, DUP: total=484835328, used=163921920
+Metadata, single: total=8388608, used=0
+GlobalReserve, single: total=16777216, used=0
+
+root at mysrv:~# df -B1 /mnt
+Filesystem       1B-blocks       Used     Available Use% Mounted on
+/dev/mapper/myvg 3221225472   2566848512         0  100% /mnt
+
+Net-snmp snmp infos for this fs:
+
+hrStorageTable (used by check_snmp_storage):
+
+iso.3.6.1.2.1.25.2.3.1.1.69 = INTEGER: 69                  //
+hrStorageIndex
+iso.3.6.1.2.1.25.2.3.1.2.69 = OID: iso.3.6.1.2.1.25.2.1.4  //
+hrStorageType
+iso.3.6.1.2.1.25.2.3.1.3.69 = STRING: "/mnt"               //
+hrStorageDescr
+iso.3.6.1.2.1.25.2.3.1.4.69 = INTEGER: 4096                //
+hrStorageAllocationUnits
+iso.3.6.1.2.1.25.2.3.1.5.69 = INTEGER: 786432              //
+hrStorageSize
+iso.3.6.1.2.1.25.2.3.1.6.69 = INTEGER: 626672              //
+hrStorageUsed
+
+dskTable (not used by check_snmp_storage):
+
+iso.3.6.1.4.1.2021.9.1.1.19 = INTEGER:
+19                                 // dskIndex
+iso.3.6.1.4.1.2021.9.1.2.19 = STRING:
+"/mnt"                              // dskPath
+iso.3.6.1.4.1.2021.9.1.3.19 = STRING: "/dev/mapper/myvg"           //
+dskDevice
+iso.3.6.1.4.1.2021.9.1.4.19 = INTEGER:
+-1                                 // dskMinimum
+iso.3.6.1.4.1.2021.9.1.5.19 = INTEGER:
+10                                 // dskMinPercent
+iso.3.6.1.4.1.2021.9.1.6.19 = INTEGER:
+3145728                            // dskTotal (Total size of the
+disk/partion (kBytes))
+iso.3.6.1.4.1.2021.9.1.7.19 = INTEGER:
+0                                  // dskAvail (Available space on the
+disk)
+iso.3.6.1.4.1.2021.9.1.8.19 = INTEGER:
+2506688                            // dskUsed (Used space on the disk)
+iso.3.6.1.4.1.2021.9.1.9.19 = INTEGER:
+80                                 // dskPercent (Percentage of space
+used on disk)
+iso.3.6.1.4.1.2021.9.1.10.19 = INTEGER:
+0                                 // dskPercentNode (Percentage of
+inodes used on disk)
+iso.3.6.1.4.1.2021.9.1.11.19 = Gauge32:
+3145728                           // dskTotalLow Total size of the
+disk/partion (kBytes). Together with dskTotalHigh composes 64-bit
+number)
+iso.3.6.1.4.1.2021.9.1.12.19 = Gauge32:
+0                                 // dskTotalHigh (Total size of the
+disk/partion (kBytes). Together with dskTotalLow composes 64-bit
+number.)
+iso.3.6.1.4.1.2021.9.1.13.19 = Gauge32:
+0                                 // dskAvailLow (Available space on
+the disk (kBytes). Together with dskAvailHigh composes 64-bit number.)
+iso.3.6.1.4.1.2021.9.1.14.19 = Gauge32:
+0                                 // dskAvailHigh (Available space on
+the disk (kBytes). Together with dskAvailLow composes 64-bit number.)
+iso.3.6.1.4.1.2021.9.1.15.19 = Gauge32:
+2506688                           // dskUsedLow (Used space on the disk
+(kBytes). Together with dskUsedHigh composes 64-bit number.)
+iso.3.6.1.4.1.2021.9.1.16.19 = Gauge32:
+0                                 // dskUsedHigh (Used space on the
+disk (kBytes). Together with dskUsedLow composes 64-bit number.)
+iso.3.6.1.4.1.2021.9.1.100.19 = INTEGER:
+1                                // dskErrorFlag (Error flag signaling
+that the disk or partition is under the minimum required space
+configured for it.)
+iso.3.6.1.4.1.2021.9.1.101.19 = STRING: "/mnt: less than 10% free (=
+0%)" // dskErrorMsg (A text description providing a warning and the
+space left on the disk.)
+
+The cause of problem is that in btrfs free space may be less than
+total-used and by default check_snmp_storage checks used space which
+was in this case about 80% (with 0% available in the same time and OS
+was throwing OOS errors on write).
+
+The solution is to configure warn/crit levels for %free not %used and
+use avail from dskTable because hrStorageTable does not provide this
+info (check_snmp_storage calculates free=total-used which is wrong for
+btrfs as above).
+
+This patch works ok for us (this allows one to use new -u switch to use
+dskTable and its avail info instead of default hrStorageTable and its
+free=total-used calculation). This also adds a few spaces to plugin
+output for better message readability.
+---
+ plugins/check_snmp_storage.pl | 145 ++++++++++++++++++++++++++--------
+ 1 file changed, 110 insertions(+), 35 deletions(-)
+
+--- a/plugins/check_snmp_storage.pl
++++ b/plugins/check_snmp_storage.pl
+@@ -19,13 +19,21 @@
+ my %ERRORS = ('OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3, 'DEPENDENT' => 4);
+ 
+ # SNMP Datas
+-my $storage_table     = '1.3.6.1.2.1.25.2.3.1';
+-my $storagetype_table = '1.3.6.1.2.1.25.2.3.1.2';
+-my $index_table       = '1.3.6.1.2.1.25.2.3.1.1';
+-my $descr_table       = '1.3.6.1.2.1.25.2.3.1.3';
+-my $size_table        = '1.3.6.1.2.1.25.2.3.1.5.';
+-my $used_table        = '1.3.6.1.2.1.25.2.3.1.6.';
+-my $alloc_units       = '1.3.6.1.2.1.25.2.3.1.4.';
++
++my $hrStorageTable_storage_table     = '1.3.6.1.2.1.25.2.3.1';
++my $hrStorageTable_storagetype_table = '1.3.6.1.2.1.25.2.3.1.2';
++my $hrStorageTable_index_table       = '1.3.6.1.2.1.25.2.3.1.1';
++my $hrStorageTable_descr_table       = '1.3.6.1.2.1.25.2.3.1.3';
++my $hrStorageTable_size_table        = '1.3.6.1.2.1.25.2.3.1.5.';
++my $hrStorageTable_used_table        = '1.3.6.1.2.1.25.2.3.1.6.';
++my $hrStorageTable_alloc_units       = '1.3.6.1.2.1.25.2.3.1.4.';
++
++my $dskTable_storage_table = '1.3.6.1.4.1.2021.9.1';
++my $dskTable_index_table = '1.3.6.1.4.1.2021.9.1.1';
++my $dskTable_descr_table = '1.3.6.1.4.1.2021.9.1.2';
++my $dskTable_size_table = '1.3.6.1.4.1.2021.9.1.6.';
++my $dskTable_avail_table = '1.3.6.1.4.1.2021.9.1.7.';
++my $dskTable_used_table = '1.3.6.1.4.1.2021.9.1.8.';
+ 
+ #Storage types definition  - from /usr/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
+ my %hrStorage;
+@@ -80,6 +88,8 @@
+ my @o_shortL      = undef;                       # output type,where,cut
+ my $o_reserve     = 0;                           # % reserved blocks (A. Greiner-B\ufffdr patch)
+ my $o_giga        = undef;                       # output and levels in gigabytes instead of megabytes
++my $o_dsktable    = undef;                       # use dskTable instead of default hrStorageTable
++
+ 
+ # SNMPv3 specific
+ my $o_login     = undef;                         # Login for snmpv3
+@@ -99,7 +109,7 @@
+ 
+ sub print_usage {
+     print
+-"Usage: $Name [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-O] [-S 0|1[,1,<car>]] [-o <octet_length>] [-R <% reserved>]\n";
++"Usage: $Name [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] [-u] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-O] [-S 0|1[,1,<car>]] [-o <octet_length>] [-R <% reserved>]\n";
+ }
+ 
+ sub round ($$) {
+@@ -145,13 +155,13 @@
+ -2, --v2c
+    Use snmp v2c
+ -l, --login=LOGIN ; -x, --passwd=PASSWD
+-   Login and auth password for snmpv3 authentication 
+-   If no priv password exists, implies AuthNoPriv 
++   Login and auth password for snmpv3 authentication
++   If no priv password exists, implies AuthNoPriv
+ -X, --privpass=PASSWD
+    Priv password for snmpv3 (AuthPriv protocol)
+ -L, --protocols=<authproto>,<privproto>
+    <authproto> : Authentication protocol (md5|sha : default md5)
+-   <privproto> : Priv protocole (des|aes : default des) 
++   <privproto> : Priv protocole (des|aes : default des)
+ -x, --passwd=PASSWD
+    Password for snmpv3 authentication
+ -p, --port=PORT
+@@ -162,6 +172,8 @@
+     'udp/ipv6'  : UDP over IPv6
+     'tcp/ipv4'  : TCP over IPv4
+     'tcp/ipv6'  : TCP over IPv6
++-u, --dsktable
++   use dskTable instead of default hrStorageTable; cannot be used with -q
+ -m, --name=NAME
+    Name in description OID (can be mounpoints '/home' or 'Swap Space'...)
+    This is treated as a regexp : -m /var will match /var , /var/log, /opt/var ...
+@@ -190,10 +202,10 @@
+    bu : calculate MegaBytes used
+ -w, --warn=INTEGER
+    percent / MB of disk used to generate WARNING state
+-   you can add the % sign 
++   you can add the % sign
+ -c, --critical=INTEGER
+    percent / MB of disk used to generate CRITICAL state
+-   you can add the % sign 
++   you can add the % sign
+ -R, --reserved=INTEGER
+    % reserved blocks for superuser
+    For ext2/3 filesystems, it is 5% by default
+@@ -205,29 +217,29 @@
+    <type>: Make the output shorter :
+      0 : only print the global result except the disk in warning or critical
+          ex: "< 80% : OK"
+-     1 : Don't print all info for every disk 
++     1 : Don't print all info for every disk
+          ex : "/ : 66 %used  (<  80) : OK"
+    <where>: (optional) if = 1, put the OK/WARN/CRIT at the beginning
+    <cut>: take the <n> first caracters or <n> last if n<0
+ -o, --octetlength=INTEGER
+   max-size of the SNMP message, usefull in case of Too Long responses.
+   Be carefull with network filters. Range 484 - 65535, default are
+-  usually 1472,1452,1460 or 1440.   
++  usually 1472,1452,1460 or 1440.
+ -t, --timeout=INTEGER
+    timeout for SNMP in seconds (Default: 5)
+ -V, --version
+    prints version number
+-Note : 
++Note :
+   with T=pu or T=bu : OK < warn < crit
+   with T=pl ot T=bl : crit < warn < OK
+-  
++
+   If multiple storage are selected, the worse condition will be returned
+   i.e if one disk is critical, the return is critical
+- 
+-  example : 
+-  Browse storage list : <script> -C <community> -H <host> -m <anything> -w 1 -c 2 -v 
+-  the -m option allows regexp in perl format : 
+-  Test drive C,F,G,H,I on Windows 	: -m ^[CFGHI]:    
++
++  example :
++  Browse storage list : <script> -C <community> -H <host> -m <anything> -w 1 -c 2 -v
++  the -m option allows regexp in perl format :
++  Test drive C,F,G,H,I on Windows 	: -m ^[CFGHI]:
+   Test all mounts containing /var      	: -m /var
+   Test all mounts under /var      	: -m ^/var
+   Test only /var                 	: -m /var -r
+@@ -270,6 +282,8 @@
+         'warn:s'        => \$o_warn,
+         't:i'           => \$o_timeout,
+         'timeout:i'     => \$o_timeout,
++        'u'             => \$o_dsktable,
++        'dsktable64'    => \$o_dsktable,
+         'm:s'           => \$o_descr,
+         'name:s'        => \$o_descr,
+         'T:s'           => \$o_type,
+@@ -404,6 +418,14 @@
+         print_usage();
+         exit $ERRORS{"UNKNOWN"};
+     }
++
++    # disallow using -u and -q together
++    if (defined($o_dsktable) && defined($o_storagetype)) {
++        print "Parameters -u and -q cannot be used together!\n";
++        print_usage();
++        exit $ERRORS{"UNKNOWN"}
++    }
++
+ }
+ 
+ ########## MAIN #######
+@@ -507,6 +529,30 @@
+ my $resultat = undef;
+ my $stype    = undef;
+ 
++my $storage_table;
++my $index_table;
++my $descr_table;
++my $size_table;
++my $used_table;
++my $alloc_units;
++
++if (defined($o_dsktable)) {
++    $storage_table = $dskTable_storage_table;
++    $index_table = $dskTable_index_table;
++    $descr_table = $dskTable_descr_table;
++    $size_table = $dskTable_size_table;
++    $used_table = $dskTable_used_table;
++    $alloc_units = 'dummy';
++}
++else {
++    $storage_table = $hrStorageTable_storage_table;
++    $index_table = $hrStorageTable_index_table;
++    $descr_table = $hrStorageTable_descr_table;
++    $size_table = $hrStorageTable_size_table;
++    $used_table = $hrStorageTable_used_table;
++    $alloc_units = $hrStorageTable_alloc_units;
++}
++
+ # Get rid of UTF8 translation in case of accentuated caracters (thanks to Dimo Velev).
+ $session->translate(Net::SNMP->TRANSLATE_NONE);
+ if (defined($o_index)) {
+@@ -526,9 +572,9 @@
+ #get storage typetable for reference
+ if (defined($o_storagetype)) {
+     if (version->parse(Net::SNMP->VERSION) < 4) {
+-        $stype = $session->get_table($storagetype_table);
++        $stype = $session->get_table($hrStorageTable_storagetype_table);
+     } else {
+-        $stype = $session->get_table(Baseoid => $storagetype_table);
++        $stype = $session->get_table(Baseoid => $hrStorageTable_storagetype_table);
+     }
+ }
+ if (!defined($resultat) | (!defined($stype) && defined($o_storagetype))) {
+@@ -573,7 +619,7 @@
+ 
+         # Check if storage type is OK
+         if (defined($o_storagetype)) {
+-            my ($skey) = $storagetype_table . "." . $tindex[$num_int];
++            my ($skey) = $hrStorageTable_storagetype_table . "." . $tindex[$num_int];
+             verb("   OID : $skey, Storagetype: $hrStorage{$$stype{$skey}} ?= $o_storagetype");
+             if ($hrStorage{ $$stype{$skey} } !~ $o_storagetype) {
+                 $test = undef;
+@@ -587,7 +633,12 @@
+             # put the oid in an array
+             $oids[$count_oid++] = $size_table . $tindex[$num_int];
+             $oids[$count_oid++] = $used_table . $tindex[$num_int];
+-            $oids[$count_oid++] = $alloc_units . $tindex[$num_int];
++            if (!defined($o_dsktable)) {
++                $oids[$count_oid++] = $alloc_units . $tindex[$num_int];
++            }
++            else {
++                $oids[$count_oid++] = $dskTable_avail_table . $tindex[$num_int];
++            }
+ 
+             verb("   Name : $descr[$num_int], Index : $tindex[$num_int]");
+             $num_int++;
+@@ -635,9 +686,17 @@
+ # Only a few ms left...
+ alarm(0);
+ 
++# dskTable use fixed 1kB unit
++if (defined($o_dsktable)) {
++    for (my $i = 0; $i < $num_int; $i++) {
++        $$result{ $alloc_units . $tindex[$i] } = 1024;
++    }
++}
++
+ # Sum everything if -s and more than one storage
+ if (defined($o_sum) && ($num_int > 1)) {
+     verb("Adding all entries");
++
+     $$result{ $size_table . $tindex[0] } *= $$result{ $alloc_units . $tindex[0] };
+     $$result{ $used_table . $tindex[0] } *= $$result{ $alloc_units . $tindex[0] };
+     $$result{ $alloc_units . $tindex[0] } = 1;
+@@ -670,6 +729,9 @@
+     verb("Size :  $$result{$size_table . $tindex[$i]}");
+     verb("Used : $$result{$used_table . $tindex[$i]}");
+     verb("Alloc : $$result{$alloc_units . $tindex[$i]}");
++    if (defined($o_dsktable)) {
++        verb("Avail : $$result{$dskTable_avail_table . $tindex[$i]}");
++    }
+ 
+     if (   !defined($$result{ $size_table . $tindex[$i] })
+         || !defined($$result{ $used_table . $tindex[$i] })
+@@ -691,12 +753,24 @@
+         $pu = 0;
+     }
+     my $bu = $$result{ $used_table . $tindex[$i] } * $$result{ $alloc_units . $tindex[$i] } / $output_metric_val;
+-    my $pl = 100 - $pu;
+-    my $bl
+-        = (
+-        ($$result{ $size_table . $tindex[$i] } * ((100 - $o_reserve) / 100) - ($$result{ $used_table . $tindex[$i] }))
+-        * $$result{ $alloc_units . $tindex[$i] }
++
++    # in dskTable mode get available storage from SNMP to avoid problems with filesystems like btrfs
++    # where available may be 0 but size-used is still > 0
++    my $pl;
++    my $bl;
++    if (defined($o_dsktable)) {
++        $pl = $$result{ $dskTable_avail_table . $tindex[$i] } * 100
++           / ($$result{ $size_table . $tindex[$i] } * (100 - $o_reserve) / 100);
++        $bl = $$result{ $dskTable_avail_table . $tindex[$i] } * $$result{ $alloc_units . $tindex[$i] }
++            / $output_metric_val;
++    }
++    else {
++        $pl = 100 - $pu;
++        $bl = (
++            ($$result{ $size_table . $tindex[$i] } * ((100 - $o_reserve) / 100) - ($$result{ $used_table . $tindex[$i] }))
++            * $$result{ $alloc_units . $tindex[$i] }
+             / $output_metric_val);
++    }
+ 
+     # add a ' ' if some data exists in $perf_out
+     $perf_out .= " " if (defined($perf_out));
+@@ -717,7 +791,7 @@
+             || (($pu >= $o_warn) && ($locstate = $warn_state = 1));
+         if (defined($o_shortL[2])) { }
+         if (!defined($o_shortL[0]) || ($locstate == 1)) {    # print full output if warn or critical state
+-            $output .= sprintf("%s: %.0f%%used(%.0f%sB/%.0f%sB) ", $descr[$i], $pu, $bu, $output_metric, $to,
++            $output .= sprintf("%s: %.0f%% used (%.0f%sB/%.0f%sB) ", $descr[$i], $pu, $bu, $output_metric, $to,
+                 $output_metric);
+         } elsif ($o_shortL[0] == 1) {
+             $output .= sprintf("%s: %.0f%% ", $descr[$i], $pu);
+@@ -732,7 +806,7 @@
+             || (($bu >= $o_warn) && ($locstate = $warn_state = 1));
+         if (!defined($o_shortL[0]) || ($locstate == 1)) {    # print full output if warn or critical state
+             $output
+-                .= sprintf("%s: %.0f%sBused/%.0f%sB (%.0f%%) ", $descr[$i], $bu, $output_metric, $to, $output_metric,
++                .= sprintf("%s: %.0f%sB used / %.0f%sB (%.0f%%) ", $descr[$i], $bu, $output_metric, $to, $output_metric,
+                 $pu);
+         } elsif ($o_shortL[0] == 1) {
+             $output .= sprintf("%s: %.0f%sB ", $descr[$i], $bu, $output_metric);
+@@ -747,7 +821,7 @@
+             || (($bl <= $o_warn) && ($locstate = $warn_state = 1));
+         if (!defined($o_shortL[0]) || ($locstate == 1)) {    # print full output if warn or critical state
+             $output
+-                .= sprintf("%s: %.0f%sBleft/%.0f%sB (%.0f%%) ", $descr[$i], $bl, $output_metric, $to, $output_metric,
++                .= sprintf("%s: %.0f%sB left / %.0f%sB (%.0f%%) ", $descr[$i], $bl, $output_metric, $to, $output_metric,
+                 $pl);
+         } elsif ($o_shortL[0] == 1) {
+             $output .= sprintf("%s: %.0f%sB ", $descr[$i], $bl, $output_metric);
+@@ -761,7 +835,7 @@
+         (($pl <= $o_crit) && ($locstate = $crit_state = 1))
+             || (($pl <= $o_warn) && ($locstate = $warn_state = 1));
+         if (!defined($o_shortL[0]) || ($locstate == 1)) {    # print full output if warn or critical state
+-            $output .= sprintf("%s: %.0f%%left(%.0f%sB/%.0f%sB) ", $descr[$i], $pl, $bl, $output_metric, $to,
++            $output .= sprintf("%s: %.0f%% left (%.0f%sB/%.0f%sB) ", $descr[$i], $pl, $bl, $output_metric, $to,
+                 $output_metric);
+         } elsif ($o_shortL[0] == 1) {
+             $output .= sprintf("%s: %.0f%% ", $descr[$i], $pl);


=====================================
debian/patches/series
=====================================
@@ -7,5 +7,9 @@
 16_check_snmp_win_max_message_size
 17_check_snmp_storage_okifempty
 18_check_snmp_int_fix_perf_out
+19_check_snmp_int_remove_unneeded_my
+20_check_snmp_int_avaid_huge_amount_of_regex
+21_check_snmp_load_update_fortiswitch_and_fortigate4.3
+22_check_snmp_storage_fix_space_btrfs
 50_disable_epn
 51_fix_privacy_doc



View it on GitLab: https://salsa.debian.org/nagios-team/nagios-snmp-plugins/-/compare/0f4afbbbddabee35520ac508a15e35049d494e48...05b203575a9f0fe0f1fd1f97da6c638d0e6f9c7f

-- 
View it on GitLab: https://salsa.debian.org/nagios-team/nagios-snmp-plugins/-/compare/0f4afbbbddabee35520ac508a15e35049d494e48...05b203575a9f0fe0f1fd1f97da6c638d0e6f9c7f
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20230905/1416ae63/attachment-0001.htm>


More information about the pkg-nagios-changes mailing list