Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Patches for check_swap and check_tcp #22

Closed
wants to merge 2 commits into from

2 participants

@madrisan

Hello,
a minor fix for 'check_swap' plus a simple improvement for 'check_tcp'.
Please apply.

madrisan added some commits
@madrisan madrisan Fix the plugin name that appears in the comment
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
d112598
@madrisan madrisan check_tcp: also display the server addr when host_specified is set.
This will help the admins when multiple checks are configured

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
8a8ec33
@abrist
Collaborator

Patches applied in:
f3a20ed
a5cf16d

@abrist abrist closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 20, 2014
  1. @madrisan

    Fix the plugin name that appears in the comment

    madrisan authored
    Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
  2. @madrisan

    check_tcp: also display the server addr when host_specified is set.

    madrisan authored
    This will help the admins when multiple checks are configured
    
    Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 3 deletions.
  1. +1 −1  plugins/check_swap.c
  2. +7 −2 plugins/check_tcp.c
View
2  plugins/check_swap.c
@@ -1,6 +1,6 @@
/*****************************************************************************
*
-* Nagios check_disk plugin
+* Nagios check_swap plugin
*
* License: GPL
* Copyright (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net)
View
9 plugins/check_tcp.c
@@ -354,8 +354,13 @@ main (int argc, char **argv)
printf("Unexpected response from host/socket on ");
else
printf("%.3f second response time on ", elapsed_time);
- if(server_address[0] != '/')
- printf("port %d", server_port);
+ if(server_address[0] != '/') {
+ if (host_specified)
+ printf("host %s and port %d",
+ server_address, server_port);
+ else
+ printf("port %d", server_port);
+ }
else
printf("socket %s", server_address);
}
Something went wrong with that request. Please try again.