Search found 6 matches

by deelight
Mon Dec 21, 2015 6:43 pm
Forum: Open Source Nagios Projects
Topic: check_tcp via string with warnings
Replies: 10
Views: 4929

Re: check_tcp via string with warnings

My current solution looks like this: #!/bin/bash # [code]# Check TCP Response fuer NAGIOS # # by Kjell Krenz # # # Version 0.1 # # while [ $# -gt 0 ] do case $1 in -h) HOST=$2 shift 2 ;; -p) PORT=$2 shift 2 ;; -s) STRING=$2 shift 2 ;; -w) WARN=$2 shift 2 ;; -c) CRIT=$2 shift 2 ;; -m) MSG=$2 shift 2 ...
by deelight
Mon Dec 21, 2015 6:29 pm
Forum: Open Source Nagios Projects
Topic: check_tcp via string with warnings
Replies: 10
Views: 4929

Re: check_tcp via string with warnings

got it... just switched the order. The problem was, that when it was a critical value it was also a warning value so it exits already with 1. Now i have it like this: if [ $RESPONSE -lt $WARN ] then echo "OK- $RESPONSE $MSG" exit 0 elif [ $RESPONSE -ge $CRIT ] then echo "CRITICAL- $RE...
by deelight
Fri Dec 18, 2015 5:42 pm
Forum: Open Source Nagios Projects
Topic: check_tcp via string with warnings
Replies: 10
Views: 4929

Re: check_tcp via string with warnings

I build a small bash script that is working basicly... i'm just struggling with the difference between when it is a warning and a critical. if [ $RESPONSE -lt $WARN ] then echo "OK- $RESPONSE $MSG" exit 0 elif [ $RESPONSE -ge $WARN -lt $CRIT ] then echo "WARNING- $RESPONSE $MSG" ...
by deelight
Thu Dec 17, 2015 5:26 pm
Forum: Open Source Nagios Projects
Topic: check_tcp via string with warnings
Replies: 10
Views: 4929

Re: check_tcp via string with warnings

yes, i just had hoped that there would be an easyier way ... ;)
by deelight
Thu Dec 17, 2015 5:16 pm
Forum: Open Source Nagios Projects
Topic: check_tcp via string with warnings
Replies: 10
Views: 4929

Re: check_tcp via string with warnings

It's a custom tool that looks into a folder at another location and show how many file are waiting. i have no other way to monitor this.
I need, like in check_smtp to define a warning/critical on the value i get beack when i ask the port for his status.
by deelight
Wed Dec 16, 2015 6:30 pm
Forum: Open Source Nagios Projects
Topic: check_tcp via string with warnings
Replies: 10
Views: 4929

check_tcp via string with warnings

Hi Guys, i've got a problem with the check_tcp plugin and counld not find any plugin who works like i need. I'm sending a string to a port via check_tcp and get a number back, in this case 2580. On this number i need to define warning and crital values. Example: /usr/lib/nagios/plugins# ./check_tcp ...