Age | Commit message (Collapse) | Author | Files | Lines |
|
The prior bindRemote function was restricted to IPv4 by explicitly using
address family specific functions as pack_sockaddr_in or unparametrized
gethostbyname. Since Perl 5.14, released in early 2013, there is
IO::Socket::IP, which supports lookups and connects for a dual stacked
network.
By switching the connection establishment code, the plugin is now able
to establish connections to IPv6-only hosts. Furthermore, additional -4
and -6 flags were introduced to enforce a specific address family.
> $ netstat -p tcp -ln | grep 6667
> tcp6 0 0 *.6667 *.* LISTEN
> $ ./plugins-scripts/check_ircd -H localhost
> IRCD ok - Current Local Users: 4
> $ ./plugins-scripts/check_ircd -H localhost -4
> IRCD UNKNOWN: Could not start socket (Connection refused)
> $ ./plugins-scripts/check_ircd -H localhost -6
> IRCD ok - Current Local Users: 4
|
|
On some OS, sockaddr structs include a length field. Perl's pack_sockaddr_in
takes this into account; the hand-rolled "pack('S n a4 x8'..." doesn't do so,
resulting in connection failures.
|
|
|
|
|
|
check_ircd was using the string `ircd` plus the PID as a nickname
for connecting to a IRC network by default.
This caused errors, when the PID was too high and the network
restricted the length of the nickname to 9 characters.
This patch "fixes" this by just cutting it of, if it gets too big.
|
|
Signed-off-by: Sven Nierlein <sven@nierlein.de>
|
|
utils.pm locate is already convered by FindBin
|
|
As the FindBin module doesn't work with ePN, set the path to utils.pm
explicitly at build time. Keep using FindBin additionally, so that the
plugins can also be executed from the build directory.
Closes #1271.
|
|
Perl's "taint" checks don't like `use lib "$FindBin::Bin"'.
Cf. http://www.perlmonks.org/?node_id=585299
|
|
Remove the buggy and complex awk(1) magic in "plugins-scripts/subst.in"
in favor of simple sed(1) substitutions.
The plugins in the "plugins-scripts" directory now always use the PATH
specified via "./configure --trusted-path", or the default PATH
hard-coded in "configure.ac".
Fixes #1242.
|
|
* awiddersheim/fix_trusted_path:
Fix trusted path
Conflicts:
plugins-scripts/check_ntp.pl
plugins-scripts/subst.in
Closes #1212.
|
|
'use lib utils.pm' is not valid Perl syntax:
Bareword "utils" not allowed while "strict subs" in use at plugins-scripts/check_ircd.pl line 52.
Bareword "pm" not allowed while "strict subs" in use at plugins-scripts/check_ircd.pl line 52.
This makes it impossible to use the plugins directly from the git tree,
e.g. while hacking on them.
Using FindBin::Bin as the library path allows that, while preserving
the original behaviour of adding the libexec path when the plugin is
properly installed.
|
|
This is an initial take at renaming the project to Monitoring Plugins.
It's not expected to be fully complete, and it is expected to break
things (The perl module for instance). More testing will be required
before this goes mainline.
|
|
When configuring the plugins you have the option to specify a trusted path with --with-trusted-path. This option seems to have been deprecated at some point for unknown reasons and had typically had no affect. This commit makes this option work again for those who have a desire to use it. There should be no affect on those who have not chosen to specify a trusted path.
|
|
If Perl's "shift" function is called outside of a subroutine and without
any argument, it usually shifts @ARGV. However, if a plugin is executed
via ePN, such a call will shift @_ instead, so we must explicitly
specify @ARGV for this to work as expected.
This fixes Debian bug #545940, see: http://bugs.debian.org/545940
Commit de7191e3424e02ba278a39b86e8b1906a25d0362 fixed the same issue for
check_disk_smb.
(Reported by Hendrik Jaeger, forwarded by Jan Wagner.)
|
|
|
|
For contrib/, full tags have been imported from subversion
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
|
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@22 f882894a-f735-0410-b71e-b25c423dba1c
|
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@21 f882894a-f735-0410-b71e-b25c423dba1c
|
|
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2 f882894a-f735-0410-b71e-b25c423dba1c
|