Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions nagios-classic/check_qnap_hdd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#
# check_qnap_hdd v1.2, 12.07.2019
# check_qnap_hdd v1.3, 26.11.2025
# (c) Michael Geiger, [email protected]
# updates on https://www.mgeiger.de/downloads.html
#
Expand All @@ -27,7 +27,7 @@ use Monitoring::Plugin;
use Monitoring::Plugin::Getopt;
use SNMP;

use constant VERSION => "1.2";
use constant VERSION => "1.3";
use constant QTREE =>".1.3.6.1.4.1.24681.1.2.";

my ($np,$sess,$anz,@tab,$statc,$statw,$txt,$a,$x);
Expand Down Expand Up @@ -61,6 +61,12 @@ $np->add_arg(
required => 1,
);

$np->add_arg(
spec => "community|C=s",
help => "Optional community string for SNMP communication (default is \"public\")",
default => "public",
);

$np->add_arg(
spec => "warning|w=i",
help => "temperature in celsius, when a WARNING is returned",
Expand All @@ -79,7 +85,7 @@ $np->getopts;
# setup SNMP session
$sess = new SNMP::Session(
DestHost => $np->opts->host,
Community => "public",
Community => $np->opts->community,
Version => 2,
Timeout => $np->opts->timeout * 1000000,
Retries => 2,
Expand Down
12 changes: 9 additions & 3 deletions nagios-classic/check_qnap_temp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#
# check_qnap_temp v1.3, 12.07.2019
# check_qnap_temp v1.4, 26.11.2025
# (c) Michael Geiger, [email protected]
# updates on https://www.mgeiger.de/downloads.html
#
Expand All @@ -27,7 +27,7 @@ use Monitoring::Plugin;
use Monitoring::Plugin::Getopt;
use SNMP;

use constant VERSION => "1.3";
use constant VERSION => "1.4";
use constant QTREE =>".1.3.6.1.4.1.24681.1.2.";

my ($np,$sess,$erg,$cpu,$sys,$str);
Expand Down Expand Up @@ -60,6 +60,12 @@ $np->add_arg(
required => 1,
);

$np->add_arg(
spec => "community|C=s",
help => "Optional community string for SNMP communication (default is \"public\")",
default => "public",
);

$np->add_arg(
spec => "warning|w=i",
help => "temperature in celsius, when a WARNING is returned",
Expand All @@ -78,7 +84,7 @@ $np->getopts;
# setup SNMP session
$sess = new SNMP::Session(
DestHost => $np->opts->host,
Community => "public",
Community => $np->opts->community,
Version => 2,
Timeout => $np->opts->timeout * 1000000,
Retries => 2,
Expand Down
12 changes: 9 additions & 3 deletions nagios-classic/check_qnap_volumes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#
# check_qnap_volumes v1.3, 12.07.2019
# check_qnap_volumes v1.4, 26.11.2025
# (c) Michael Geiger, [email protected]
# updates on https://www.mgeiger.de/downloads.html
#
Expand All @@ -27,7 +27,7 @@ use Monitoring::Plugin;
use Monitoring::Plugin::Getopt;
use SNMP;

use constant VERSION => "1.3";
use constant VERSION => "1.4";
use constant QTREE =>".1.3.6.1.4.1.24681.1.2.";

my ($np,$sess,$anz,@tab,$statc,$statw,$txt,$a,$x,$warn,$crit,$free,$size);
Expand Down Expand Up @@ -81,6 +81,12 @@ $np->add_arg(
required => 1,
);

$np->add_arg(
spec => "community|C=s",
help => "Optional community string for SNMP communication (default is \"public\")",
default => "public",
);

$np->add_arg(
spec => "warning|w=s",
label => "PERCENT%",
Expand Down Expand Up @@ -113,7 +119,7 @@ if ($np->opts->critical =~ /^(\d+)%/) {
# setup SNMP session
$sess = new SNMP::Session(
DestHost => $np->opts->host,
Community => "public",
Community => $np->opts->community,
Version => 2,
Timeout => $np->opts->timeout * 1000000,
Retries => 2,
Expand Down