Module: check_mk
Branch: master
Commit: 26edfe6829df42d4866875db96c1cb4655f5373b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=26edfe6829df42…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Jul 5 14:52:19 2013 +0200
added new check manpage win_netstat
---
checkman/win_netstat | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/checkman/win_netstat b/checkman/win_netstat
new file mode 100644
index 0000000..da772bd
--- /dev/null
+++ b/checkman/win_netstat
@@ -0,0 +1,57 @@
+title: Established TCP Connections or TCP/UDP Listeners
+agents: windows
+catalog: os/network
+author: Mathias Kettner <mk(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ This check evaluates output of {netstat -an} command on windows
+ and checks if there are established connections or listeners
+ matching the given criteria.
+
+ Returns {OK} state if there are some and {CRITICAL} if not
+
+item:
+ Give the parameters to match against connection or listeners.
+ See {Examples} and {Parameters} for details.
+
+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:
+
+ static_checks['tcp_connections'] = [
+ ( ('win_netstat', 'My Test Connection',
+ {
+ 'local_ip' : '192.168.0.2',
+ 'local_port': 445,
+ 'remote_ip' : '192.168.0.1',
+ 'state' : 'ESTABLISHED',
+ 'proto' : 'TCP'
+ }),
+ [], ['winsrv1'] ),
+ ]
+
+ Or if you want to check if there is an HTTP listener available
+
+ static_checks['tcp_connections'] = [
+ ( ('win_netstat', 'HTTP Listener',
+ {
+ 'local_ip' : '192.168.0.2',
+ 'local_port': 80,
+ 'state' : 'LISTEN',
+ 'proto' : 'TCP'
+ }),
+ [], ['websrv1'] ),
+ ]
+
+[parameters]
+local_ip(string): the local IP address
+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