diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-13 19:09:29 +0200 | 
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-13 19:09:29 +0200 | 
| commit | b6d3acf5e3f685d6048905d4bef84ebfbb9f4815 (patch) | |
| tree | 8a4f5e2f2f28976f80ba9b5e68dd19ba917e35f4 /plugins-scripts | |
| parent | 41ebe4b6d9c36205577a336ae6f81567a0321267 (diff) | |
| parent | bf70f5f847e3407af572d1768cca747af270b993 (diff) | |
| download | monitoring-plugins-b6d3acf5e3f685d6048905d4bef84ebfbb9f4815.tar.gz | |
Merge branch 'master' into check_dhcp_rogue_detection
Diffstat (limited to 'plugins-scripts')
| -rw-r--r-- | plugins-scripts/check_disk_smb.pl | 3 | ||||
| -rwxr-xr-x | plugins-scripts/check_ircd.pl | 4 | 
2 files changed, 3 insertions, 4 deletions
| diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl index f4d33a7b..eda8dd48 100644 --- a/plugins-scripts/check_disk_smb.pl +++ b/plugins-scripts/check_disk_smb.pl | |||
| @@ -226,7 +226,8 @@ if (/\s*(\d*) blocks of size (\d*)\. (\d*) blocks available/) { | |||
| 226 | my ($total_bytes) = $1 * $2; | 226 | my ($total_bytes) = $1 * $2; | 
| 227 | my ($occupied_bytes) = $1 * $2 - $avail_bytes; | 227 | my ($occupied_bytes) = $1 * $2 - $avail_bytes; | 
| 228 | my ($avail) = $avail_bytes/1024; | 228 | my ($avail) = $avail_bytes/1024; | 
| 229 | my ($capper) = int(($3/$1)*100); | 229 | my ($capper); | 
| 230 | if ($1!=0) { $capper = int(($3/$1)*100) } else { $capper=100 }; | ||
| 230 | my ($mountpt) = "\\\\$host\\$share"; | 231 | my ($mountpt) = "\\\\$host\\$share"; | 
| 231 | 232 | ||
| 232 | # TODO : why is the kB the standard unit for args ? | 233 | # TODO : why is the kB the standard unit for args ? | 
| diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl index 84f20229..4822fe68 100755 --- a/plugins-scripts/check_ircd.pl +++ b/plugins-scripts/check_ircd.pl | |||
| @@ -146,7 +146,6 @@ sub bindRemote ($$) | |||
| 146 | { | 146 | { | 
| 147 | my ($in_remotehost, $in_remoteport) = @_; | 147 | my ($in_remotehost, $in_remoteport) = @_; | 
| 148 | my $proto = getprotobyname('tcp'); | 148 | my $proto = getprotobyname('tcp'); | 
| 149 | my $sockaddr; | ||
| 150 | my $that; | 149 | my $that; | 
| 151 | my ($name, $aliases,$type,$len,$thataddr) = gethostbyname($in_remotehost); | 150 | my ($name, $aliases,$type,$len,$thataddr) = gethostbyname($in_remotehost); | 
| 152 | 151 | ||
| @@ -154,8 +153,7 @@ sub bindRemote ($$) | |||
| 154 | print "IRCD UNKNOWN: Could not start socket ($!)\n"; | 153 | print "IRCD UNKNOWN: Could not start socket ($!)\n"; | 
| 155 | exit $ERRORS{"UNKNOWN"}; | 154 | exit $ERRORS{"UNKNOWN"}; | 
| 156 | } | 155 | } | 
| 157 | $sockaddr = 'S n a4 x8'; | 156 | $that = pack_sockaddr_in ($in_remoteport, $thataddr); | 
| 158 | $that = pack($sockaddr, AF_INET, $in_remoteport, $thataddr); | ||
| 159 | if (!connect(ClientSocket, $that)) { | 157 | if (!connect(ClientSocket, $that)) { | 
| 160 | print "IRCD UNKNOWN: Could not connect socket ($!)\n"; | 158 | print "IRCD UNKNOWN: Could not connect socket ($!)\n"; | 
| 161 | exit $ERRORS{"UNKNOWN"}; | 159 | exit $ERRORS{"UNKNOWN"}; | 
