Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Check Current Connections
2014-04-03
- Nagios 3.x
- Nagios 4.x
- Nagios XI
44148
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Uses iproute2's ss tool to retrieve connections (Linux only).
Check the number of connections/sockets in a given state.
Uses iproute2's ss tool to retrieve connections.
Options:
-s State of connection (def: all)
(established, syn-sent, syn-recv, fin-wait-1, fin-wait-2, time-wait,
closed, close-wait, last-ack, listen, and closing)
-f Apply quoted ss expression filter
e.g. '( dst 192.168.1/24 and dport >= :1024 )'
-p Set protocol or family type (udp/tcp/inet/inet6)
-c Critical threshold as an integer
-w Warning threshold as an integer
##########
# Example: #
##########
# 1.) Critical if more than 1000 connections to port 443 are in the TCP ESTABLISHED state.
# $ ./check_connections.sh -s established '( sport = :443 )' -w 800 -c 1000
Uses iproute2's ss tool to retrieve connections.
Options:
-s State of connection (def: all)
(established, syn-sent, syn-recv, fin-wait-1, fin-wait-2, time-wait,
closed, close-wait, last-ack, listen, and closing)
-f Apply quoted ss expression filter
e.g. '( dst 192.168.1/24 and dport >= :1024 )'
-p
-c Critical threshold as an integer
-w Warning threshold as an integer
##########
# Example: #
##########
# 1.) Critical if more than 1000 connections to port 443 are in the TCP ESTABLISHED state.
# $ ./check_connections.sh -s established '( sport = :443 )' -w 800 -c 1000