Hello friends,
I thank all of you help!
But really it takes is starting a criterion, for example.
#############################
if [ "$ arg1" -gt 2]
Then
echo "Service is OK"
fi
#############################
And starting this status or otherwise, the status it it in Dashboard green turns to red or yellow, referring to the criteria that I set.
As follows the image below. I set a criterion, but the service is still green despite being Warning regarding the criteria that define the Scritp.
Syntax Command Check_netstat_conn
-
ednaldojta
- Posts: 103
- Joined: Tue Apr 07, 2015 7:52 am
Re: Syntax Command Check_netstat_conn
You do not have the required permissions to view the files attached to this post.
Re: Syntax Command Check_netstat_conn
Ah, you'll want to add in exit codes for this. Using your example -
exit 1 - represents warning
exit 2 - represents critical
exit 3 - represents unknown
Once you update the script, it should work accordingly.
Code: Select all
#############################
if [ "$ arg1" -gt 2]
Then
echo "Service is OK"
exit 0
fi
#############################
exit 2 - represents critical
exit 3 - represents unknown
Once you update the script, it should work accordingly.
Former Nagios Employee
-
ednaldojta
- Posts: 103
- Joined: Tue Apr 07, 2015 7:52 am
Re: Syntax Command Check_netstat_conn
OK! Thank you friends for help! Already meets the desired result!
Thank you so!
To the next!
: D
Thank you so!
To the next!
: D
Re: Syntax Command Check_netstat_conn
Good to hear!
Am I good to mark this thread as resolved?
Am I good to mark this thread as resolved?
Former Nagios Employee
-
ednaldojta
- Posts: 103
- Joined: Tue Apr 07, 2015 7:52 am
Re: Syntax Command Check_netstat_conn
Yes!
And one more time! thank you!
And one more time! thank you!
Re: Syntax Command Check_netstat_conn
No problem! We're here to help.
If you need any assistance in the future, feel free to open up a new thread.
If you need any assistance in the future, feel free to open up a new thread.
Former Nagios Employee