Module: check_mk
Branch: master
Commit: 328a184f21c9fcb6aa70e8812981d0d119f30ce3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=328a184f21c9fc…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Mon Jul 8 12:58:15 2013 +0200
fixing checkman mysql.connections and win_netstat
---
checkman/mysql.connections | 15 ++++++++-----
checkman/win_netstat | 52 ++++++++++++++++++++++++++------------------
2 files changed, 40 insertions(+), 27 deletions(-)
diff --git a/checkman/mysql.connections b/checkman/mysql.connections
index d17d78e..409fdf6 100644
--- a/checkman/mysql.connections
+++ b/checkman/mysql.connections
@@ -11,7 +11,7 @@ description:
the maximum number of possible parallel connections.
From these both it calculates the
maximum usage level of these connections in percent
- and matches the given warning and critical thresholds against it.
+ and matches the given {WARN} and {CRIT} thresholds against it.
This check needs the agent plugin {mk_mysql} to be installed.
Further details about this plugin and monitoring of MySQL can be
@@ -23,9 +23,12 @@ inventory:
and the MySQL daemon is running one service is being generated.
[parameters]
-dictionary..., wenn perc_used nicht enthalten, ist der Chec immer OK.
-warning (float): The maximum connection usage (in percent) that triggers
- a warning state.
-critical (float): The maximum connection usage (in percent) that triggers
- a critical state.
+perc_used: (warn, crit)
+ {warn} (float): The maximum connection usage (in percent) that triggers
+ a {WARN} state.
+
+ {crit} (float): The maximum connection usage (in percent) that triggers
+ a {CRIT} state.
+
+ If perc_used is not set, the check always returns {OK} state.
diff --git a/checkman/win_netstat b/checkman/win_netstat
index 5054aaf..bf0670d 100644
--- a/checkman/win_netstat
+++ b/checkman/win_netstat
@@ -12,15 +12,14 @@ description:
Returns {OK} state if the specified connection/listener is present,
and {CRIT} if not.
+ This check needs the agent plugin {netstat_an.bat} to be installed.
+
item:
A user defined identifier of the connection.
examples:
- # If you want to make sure some machine on 192.168.0.1 has an established
- # TCP connection to the monitored machine (192.168.0.2) on port 445 you
- # would define:
-
- # Make sure that a ...
+ # Make sure that a connection from 192.168.0.1 is established
+ # to this host (192.168.0.2) on port 445:
checks += [
( 'winsrv1', 'win_netstat', 'My Test Connection',
{
@@ -34,29 +33,40 @@ examples:
]
# Check if TCP port 80 is listening
- checkstatic_checks['tcp_connections'] = [
- ( ('win_netstat', 'HTTP Listener',
+ checks += [
+ ( 'websrv1', 'win_netstat', 'HTTP Listener',
{
'local_port': 80,
'state' : 'LISTEN',
'proto' : 'TCP'
- }),
- [], ['websrv1'] ),
+ },
+ ),
]
[parameters]
parameters (dict): A dictionary with the following keys, all of which are
optional.
- {"local_ip"} The local IP address of the connection. For listeners
- this is the IP address the process listens on. Applications that
- listen on all IP address use an asterisk {*} here. If you omit
- this parameter then the local address is being ignored.
-local_port(int): the local Port
-remote_ip(string): the remote IP address
-remote_port(int): the remote Port
-proto(string): TCP or UDP are possible values:
- The protocol used for the connection or the listener
-state(string): {ESTABLISHED}, LISTEN, TIME_WAIT, SYN_SENT, SYN_RECV,
- LAST_ACK, CLOSE_WAIT, TIME_WAIT, CLOSED, CLOSING, FIN_WAIT1, FIN_WAIT2,
- BOUND: The state of the connection or listener
+ {"local_ip"} The local IP address of the connection. For listeners
+ this is the IP address the process listens on. Applications that
+ listen on all IP address use an asterisk {*} here. If you omit
+ this parameter then any local address matches (no matter if the
+ listener is bound to * or to a specific interface or IP).
+
+ {"local_port"} The local port of the connection. For listeners
+ this is the port the process listens on.
+
+ {"remote_ip"} The remote IP address of the connection. You need
+ to give this only when monitoring connections. Omit if monitoring
+ listeners.
+
+ {"remote_port"} The remote port of the connection. You need
+ to give this only when monitoring connections. Omit if monitoring
+ listeners.
+
+ {"proto"} {TCP} or {UDP} are possible values:
+ The protocol used for the connection or the listener.
+
+ {"state"} {ESTABLISHED}, {LISTEN}, {TIME_WAIT}, {SYN_SENT},
{SYN_RECV},
+ {LAST_ACK}, {CLOSE_WAIT}, {TIME_WAIT}, {CLOSED}, {CLOSING}, {FIN_WAIT1}, {FIN_WAIT2},
+ {BOUND}: The state of the connection or listener.