From arnim.sommer at tas-gruppe.de Wed Sep 6 12:29:15 2017 From: arnim.sommer at tas-gruppe.de (Arnim Sommer) Date: Wed, 6 Sep 2017 12:29:15 +0200 Subject: check_mrtgtraf Plugin Message-ID: <038a01d326fa$fd484dd0$f7d8e970$@tas-gruppe.de> Hey, could you include a switch tot he check_mrtgtraf, so that it warns if traffic falls below a certain threshold? Yours Arnim Sommer IT Management Telefon: 0 208 5999 142 E-Mail: arnim.sommer at tas-gruppe.de TAS Die 1. Adresse f?r erfolgreiche Kundenbetreuung, nachhaltigen Kundenservice und strategische Neukundengewinnung TAS M?lheim GmbH Mainstr. 1 45478 M?lheim an der Ruhr fon: +49 (0) 208 - 5999 - 0 fax: +49 (0) 208 - 5999 - 100 T?V Nord gepr?ftes Callcenter www.tas-gruppe.de info at tas-gruppe.de Besuchen Sie uns auf Facebook Gesch?ftsf?hrer: R?diger Wolf Finanzamt M?lheim a.d. Ruhr ID-Nr.: DE 238243034 HRB 17140 TAS - Dem Branchenkodex verpflichtet Dem Branchencodex verpflichtet Die Selbstverpflichtung der Callcenter Wirtschaft ... macht zentrale Vorgaben und Regeln verbindlich ... sch?tzt vor unlauteren Gesch?ftspraktiken ... st?rkt den Verbraucherschutz im Telefonmarketing Mehr Informationen unter: https://callcenter-verband.de/verband/branchenkodex Ansprechpartner ist jederzeit gerne Frau Alice Kempkes unter der Tel. 0208-5999-120. _____ Bitte drucken Sie diese E Mail nur aus, wenn dies wirklich notwendig ist. Danke f?r ein gesundes Klima -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2779 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 2593 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 1959 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.jpg Type: image/jpeg Size: 4465 bytes Desc: not available URL: From f at zz.de Fri Sep 8 14:16:35 2017 From: f at zz.de (Florian Lohoff) Date: Fri, 8 Sep 2017 14:16:35 +0200 Subject: Perl Nagios::Plugin vs Monitoring::Plugin Message-ID: <20170908121634.GA23025@pax.zz.de> Hi, i am trying to have perl checks supported on hosts from Debian/Squeeze up to Debian/Stretch. Squeeze->Jessie have Nagios::Plugin, Wheezy->Stretch have Monitoring plugin. So i was trying around in loading one or the other conditionally eval { require Nagios::Plugin; 1; } or do { require Monitoring::Plugin; } Now i fail to find a way to get all the exports e.g. CRITICAL/WARNING/OK/UNKNOWN. Is there a nice generic way to support either perl module? Flo -- Florian Lohoff f at zz.de UTF-8 Test: The ? ran after a ?, but the ? ran away -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 828 bytes Desc: Digital signature URL: From Sven.Nierlein at Consol.de Fri Sep 8 14:24:54 2017 From: Sven.Nierlein at Consol.de (Sven Nierlein) Date: Fri, 8 Sep 2017 14:24:54 +0200 Subject: Perl Nagios::Plugin vs Monitoring::Plugin In-Reply-To: <20170908121634.GA23025@pax.zz.de> References: <20170908121634.GA23025@pax.zz.de> Message-ID: <8ba8cafa-6386-e1ca-6c64-ad5d5c9a9de4@consol.de> Hi, you could use Module::Load (which is a perl core module) to do that: use Module::Load qw/load/; eval { ? load Monitoring::Plugin, qw/required exports/; }; if($@) { ? load Nagios::Plugin, qw/required exports/; } Or just stay with Nagios::Plugin till the old systems fade out. You can use Monitoring::Plugin by the name "Nagios::Plugin" as well. It comes with a compatibility module. Cheers, ?Sven On 08/09/17 14:16, Florian Lohoff wrote: > > Hi, > > i am trying to have perl checks supported on hosts from Debian/Squeeze > up to Debian/Stretch. Squeeze->Jessie have Nagios::Plugin, > Wheezy->Stretch have Monitoring plugin. > > So i was trying around in loading one or the other conditionally > > eval { > require Nagios::Plugin; > 1; > } or do { > require Monitoring::Plugin; > } > > Now i fail to find a way to get all the exports e.g. > CRITICAL/WARNING/OK/UNKNOWN. > > Is there a nice generic way to support either perl module? > > Flo -- Sven Nierlein???????????? Sven.Nierlein at consol.de ConSol* GmbH????????????? http://www.consol.de Franziskanerstrasse 38??? Tel.:089/45841-439 81669 Muenchen??????????? Fax.:089/45841-111 From f at zz.de Fri Sep 8 15:16:20 2017 From: f at zz.de (Florian Lohoff) Date: Fri, 8 Sep 2017 15:16:20 +0200 Subject: Perl Nagios::Plugin vs Monitoring::Plugin In-Reply-To: <8ba8cafa-6386-e1ca-6c64-ad5d5c9a9de4@consol.de> References: <20170908121634.GA23025@pax.zz.de> <8ba8cafa-6386-e1ca-6c64-ad5d5c9a9de4@consol.de> Message-ID: <20170908131620.GC23025@pax.zz.de> On Fri, Sep 08, 2017 at 02:24:54PM +0200, Sven Nierlein wrote: > Hi, > > you could use Module::Load (which is a perl core module) to do that: > > use Module::Load qw/load/; > eval { > ? load Monitoring::Plugin, qw/required exports/; > }; > if($@) { > ? load Nagios::Plugin, qw/required exports/; > } This fails for me - Testcase: #!/usr/bin/perl -w use strict; use Getopt::Long; use Module::Load qw/autoload/; my $module="Nagios::Plugin"; eval { require Nagios::Plugin; 1; } or do { $module="Monitoring::Plugin"; }; autoload $module; my $np=new $module; $np->nagios_exit(UNKNOWN, "Unknown"); Returns: Bareword "UNKNOWN" not allowed while "strict subs" in use at /tmp/f line 18. $ERRORS{UNKNOWN} is equally not imported. Using qw/UNKNOWN/ with load or autoload does not change anything. > Or just stay with Nagios::Plugin till the old systems fade out. You can use > Monitoring::Plugin by the name "Nagios::Plugin" as well. It comes > with a compatibility module. The problem here is that Debian/Stretch does not seem to ship it - flo at p3:~$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.1 (stretch) Release: 9.1 Codename: stretch flo at p3:~$ dpkg -l libmonitoring-plugin-perl Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-============================-===================-===================-============================================================= ii libmonitoring-plugin-perl 0.39-1 all family of perl modules to streamline writing Monitoring plugi flo at p3:~$ perl -MNagios::Plugin Can't locate Nagios/Plugin.pm in @INC (you may need to install the Nagios::Plugin module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base). BEGIN failed--compilation aborted. Flo -- Florian Lohoff f at zz.de UTF-8 Test: The ? ran after a ?, but the ? ran away -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 828 bytes Desc: Digital signature URL: From Sven.Nierlein at Consol.de Fri Sep 8 15:31:29 2017 From: Sven.Nierlein at Consol.de (Sven Nierlein) Date: Fri, 8 Sep 2017 15:31:29 +0200 Subject: Perl Nagios::Plugin vs Monitoring::Plugin In-Reply-To: <20170908131620.GC23025@pax.zz.de> References: <20170908121634.GA23025@pax.zz.de> <8ba8cafa-6386-e1ca-6c64-ad5d5c9a9de4@consol.de> <20170908131620.GC23025@pax.zz.de> Message-ID: <62bfda4b-cfcb-62c2-504d-a373abe0a773@consol.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Try this one: #!/usr/bin/perl use strict; use warnings; my $mod; BEGIN { for my $try (qw/Nagios::Plugin Monitoring::Plugin/) { eval "use $try"; if(!$@) { $mod = $try; last; } } }; my $np = $mod->new(); $np->nagios_exit(UNKNOWN, "Unknown"); On 08.09.2017 15:16, Florian Lohoff wrote: > On Fri, Sep 08, 2017 at 02:24:54PM +0200, Sven Nierlein wrote: >> Hi, >> >> you could use Module::Load (which is a perl core module) to do that: >> >> use Module::Load qw/load/; eval { load Monitoring::Plugin, qw/required exports/; }; if($@) { load Nagios::Plugin, qw/required exports/; } > > This fails for me - Testcase: > > #!/usr/bin/perl -w > > use strict; use Getopt::Long; > > use Module::Load qw/autoload/; my $module="Nagios::Plugin"; eval { require Nagios::Plugin; 1; } or do { $module="Monitoring::Plugin"; }; > > autoload $module; my $np=new $module; > > $np->nagios_exit(UNKNOWN, "Unknown"); > > Returns: > > Bareword "UNKNOWN" not allowed while "strict subs" in use at /tmp/f line 18. > > $ERRORS{UNKNOWN} is equally not imported. Using qw/UNKNOWN/ with load or autoload does not change anything. > >> Or just stay with Nagios::Plugin till the old systems fade out. You can use Monitoring::Plugin by the name "Nagios::Plugin" as well. It comes with a compatibility module. > > The problem here is that Debian/Stretch does not seem to ship it - > > flo at p3:~$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.1 (stretch) Release: 9.1 Codename: stretch flo at p3:~$ dpkg -l libmonitoring-plugin-perl Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-============================-===================-===================-============================================================= ii libmonitoring-plugin-perl 0.39-1 all family of perl modules to streamline writing Monitoring plugi flo at p3:~$ perl -MNagios::Plugin Can't locate Nagios/Plugin.pm in @INC (you may need to install the Nagios::Plugin module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base). BEGIN failed--compilation aborted. > > > Flo > - -- Sven Nierlein Sven.Nierlein at consol.de ConSol* GmbH http://www.consol.de Franziskanerstrasse 38 Tel.:089/45841-439 81669 Muenchen Fax.:089/45841-111 -----BEGIN PGP SIGNATURE----- iLMEAQEIAB0WIQTy+Xc3tZrMySwj+Mf4wcoIpXue1wUCWbKbsQAKCRD4wcoIpXue 11v3A/9CvwAEtMew7Vt8rZpAZ/prsE+SgAs7zWFno7pcJIQ5ovXzIxbxRgLll/gj WjbEXVuJkSI5oLse1Ez+9CTznxm4R1iHqCWyxU8dxm3STH/h/uYeSAkr6rBAEH4d mJeAHIO+jAf7HZzIxjUAHFF0Aeij8fKC3W1m+JtjssTAKxtt3A== =NkAX -----END PGP SIGNATURE----- From eponymousalias at yahoo.com Fri Sep 8 18:28:12 2017 From: eponymousalias at yahoo.com (eponymous alias) Date: Fri, 8 Sep 2017 16:28:12 +0000 (UTC) Subject: check_snmp IP address space options References: <897410657.5444461.1504888092017.ref@mail.yahoo.com> Message-ID: <897410657.5444461.1504888092017@mail.yahoo.com> In the monitoring plugins 2.2 release, the "check_snmp --help" output says this: -4, --use-ipv4 Use IPv4 connection -6, --use-ipv6 Use IPv6 connection but the code says otherwise about how the long options are named: {"ipv4", no_argument, 0, '4'}, {"ipv6", no_argument, 0, '6'}, This discrepancy can cause a lot of confusion. Looking around at the other plugins that have similar arguments: check_by_ssh check_dig check_fping check_http check_ldap check_ntp check_ntp_peer check_ntp_time check_ping check_smtp check_ssh check_tcp their code all supports the full --use-ipv4 and --use-ipv6 arguments, and not the --ipv4 and --ipv6 forms. So for the sake of consistency, the code in check_snmp.c should be modified to support what the help message says. Perhaps for backward compatibility, it might also be useful to continue supporting the --ipv4 and --ipv6 forms with check_snmp, but I will leave that for others to decide.