Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_tcp shows no output when changing desired exit state [sf#3538991] #1062

Closed
monitoring-user opened this issue Sep 24, 2013 · 0 comments
Closed

Comments

@monitoring-user
Copy link

Submitted by snednarb on 2012-06-29 16:12:41

The default exit code when a connection is refused is critical, but I only desire a warning (--refuse=warn). Also, I noticed that (--refuse=ok) returns output that gives the impression that the connection succeeded. The output should be the same "Connection refused" regardless of the desired exit code.

./check_tcp -H localhost -p 999 --refuse=crit
Connection refused
echo $?
2

./check_tcp -H localhost -p 999 --refuse=warn
echo $?
1

./check_tcp -H localhost -p 999 --refuse=ok
TCP OK - 0.000 second response time on port 999|time=0.000182s;;;0.000000;10.000000
echo $?
0

Plugin Version (-V output): v1.4.16 ( also v1.4.14 )
Plugin Name: check_tcp
Plugin Commandline showing issues: --refuse=warn | --refuse=ok
Operating System: Linux 2.6.31-14-server #48-Ubuntu SMP Fri Oct 16 15:07:34 UTC 2009 x86_64 GNU/Linux
Architecture:x64
Compiler: gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) [posix]

@sni sni self-assigned this Oct 2, 2015
@sni sni closed this as completed Oct 2, 2015
@sni sni removed their assignment Oct 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants