LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-26-2013, 07:34 AM   #1
Rohant
Member
 
Registered: Oct 2011
Location: India, Mumbai
Distribution: RHEL, Fedora,Ubuntu, Centos, Windows XP & Windows 7
Posts: 44

Rep: Reputation: Disabled
Sending Group wise nagios sms alerts


Hi All,

We having servers in our local office which are centos 5.x 64 bit. we have implemented Nagios Core 3.2.3 for monitoring all the servers.

We having three teams System Admin, Network team & application team.

few days back we decided to nagios alerts should be send to perticular team members. means application related alerts (eg. mysql, freeswitch, perl) should be send to only application team & system admin team only. network related (ping) alerts should be send to network team & sysadmin team.

for the Email alerts i created three new contacts in contacts.cfg & three new groups those will be members of earlier created contacts.

by using "contact_groups" we achive the email alerts sending to respective teams only with "notification_interval" set to 5 minutes.

by applying above chages we are able to receive server alerts which are sent by nagios. sometimes we received only "Server's PROBLEM Service Alert" mail only but we dont received "Server's RECOVERY Service Alert" mail even after that issue got solved & some times we received both mails of "Problem" & "Recovery" for same server & same service we receive mail. if you have any suggestion on this please let me know.

Currently i am stuck with the sending nagios sms alerts to respective team. right now sms alerts which are triggred by nagios are getting delivered to all the teams.

Now i want to send sms alerts of a perticular service to respective team just like what i did for email alerts.

for sending sms alerts we having custom script which having our kannel server url. below is my command.cfg sms parameter.

==============
# 'notify-service-by-sms' command define

define command{
command_name notify-service-by-sms
command_line /usr/local/nagios/libexec/sms_send.sh "--Nagios Service Notification-- Host: $HOSTNAME$, State: $HOSTSTATE$, Service: $SERVICEDESC$, Description: $SERVICESTATE$, Time: $LONGDATETIME$"

}

# 'notify-host-by-sms' command define
define command{
command_name notify-host-by-sms
command_line /usr/local/nagios/libexec/sms_send.sh "--Nagios Host Notification-- Host:$HOSTNAME$, State: $HOSTSTATE$, Time: $LONGDATETIME$
}

==============

if possible can anyone suggest how can i send sms service alerts generated by nagios to particular groups of numbers only.

i searched but didint found anything related to my requirment. i am confused is it possible or not for this required.

Thanks.
 
Old 08-26-2013, 08:09 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
As you don't appear to be passing the $CONTACTPAGER$ to your sms_send.sh script I'm guessing that the script itself is deciding to send to all the users rather than specific individuals?

You also seem to be missing an end " in your notify-host-by-sms definition.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios not sending alerts through email lemay_jeff Linux - Networking 3 09-25-2021 12:04 AM
Sending SMS alerts to system administrators Roy@Linux Linux - Enterprise 2 06-24-2013 11:21 AM
nagios sms alerts alias kamran.ayub Linux - Server 1 06-05-2013 05:18 AM
nagios 3.40 sms alerts kamran.ayub Linux - Server 1 07-31-2012 10:29 AM
Nagios Alerts via SMS PankajRasuni Linux - Server 3 03-31-2011 01:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:31 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration