LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-18-2008, 08:49 AM   #1
investmentbnker75
Member
 
Registered: Oct 2007
Location: Eastern Seaboard
Distribution: CentOS
Posts: 158

Rep: Reputation: 15
Nagios plugin wont send email alerts


All, i have written a wrapper for a plugin that has issues running through nagios and sending out email alerts with a threshold is exceeded. The wrapper works fine commandline, will show as warning or critical on the nagios url, but no email alerts are sent. The definitions for the service check are set properly. But i cant figure this out. Here is the wrapper below. And before anyone asks, the original plugin needs to be run through a wrapper because of ePN issues.


#!/bin/sh
res=$(/usr/local/nagios/libexec/check_mysql -w=6 -c=800)

#result= $result | awk '{print $1}'
echo $res

STATE_OK=0
STATE_CRITICAL=2
STATE_WARNING=1

case "$res" in
*OK*) exit $STATE_OK ;;
*WARNING*) exit $STATE_WARNING ;;
*CRITICAL*) exit $STATE_CRITICAL ;;
*) exit 3 ;;
esac
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios not sending alerts through email lemay_jeff Linux - Networking 2 04-11-2005 10:28 AM
how to make a C program send email notification/alerts? eigenyeugen Programming 1 01-04-2005 08:16 PM
qmail wont send email to addresses not in my domain robmainella Linux - Software 2 02-02-2004 05:37 PM
Postfix wont send email robmainella Linux - Software 3 12-04-2003 11:05 PM
Why is my email (Smailer-Daemon) failing to be delivered (specifically Nagios Alerts) mdwillia Linux - Software 1 11-17-2003 08:16 AM


All times are GMT -5. The time now is 09:04 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration