Notification scripting question

Mihai Tanasescu mihai at duras.ro
Thu Mar 15 23:18:32 CET 2007


Hello,


Thanks for the advice...I can't believe it was so simple (the script and 
selecting text based on the number passed as a parameter).



Dinçer Kavraal wrote:

> Hi,
> I have two distinct suggestions out this problem.
>
> First, you could define a bash/perl/c or any other language basis 
> (embedded perl or c is suggested for speed issues - if you have a less 
> notification frequency of 10 notifs in a minute) script. Then, 
> certainly, you are passing the mobile number as a parametre. So you 
> could select a text inside that script. At last that script will be 
> the trigger for SMS. So notification scipt will be your new bash (or 
> other) script.
>
> Second, you could define "n" (which is the number of different texts) 
> different SMS notification commands in (etc/misccommands in old 
> versions, and etc/command.etc in nagios 2.x). But you have to say 
> that, this person will be notified with this command for each.
>
> I hope it is a bit picturable. If you have questions, I can be more 
> clear on this.
>
> Dincer
>
> 2007/3/15, Mihai Tanasescu <mihai at duras.ro <mailto:mihai at duras.ro> >:
>
>     Hello,
>
>
>     I've just installed Nagios on a machine for the first time and
>     have read
>     a little throught the docs and I'm now starting to get the hang of it.
>
>     From what I've read, for check_commands I can define a way to pass
>     arguments at runtime by using "command
>     parameter_1!parameter2....!parameter_n" if I state $ARG1$...$ARGn$ in
>     the definition part.
>
>     Is there anything like that for the notification commands ?
>
>     What I'd like to do is send personalized notifications based on the
>     contact specified in my configuration.
>     I'm trying to call gammu/gnokii to send an SMS with different texts
>     depending on who's being notified and I'd like to avoid if
>     possible the
>     definition of each and every particular notification command.
>
>     Is there any way to do this (something like specify in the
>     notification
>     command just script-name "Custom Text" "mobile number" ) ?
>     Or do I have to create specific entries for each one of them ?
>
>
>
>
>     -------------------------------------------------------------------------
>
>     Take Surveys. Earn Cash. Influence the Future of IT
>     Join SourceForge.net's Techsay panel and you'll get the chance to
>     share your
>     opinions on IT & business topics through brief surveys-and earn cash
>     http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>     <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
>     _______________________________________________
>     Nagios-users mailing list
>     Nagios-users at lists.sourceforge.net
>     <mailto:Nagios-users at lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/nagios-users
>     <https://lists.sourceforge.net/lists/listinfo/nagios-users>
>     ::: Please include Nagios version, plugin version (-v) and OS when
>     reporting any issue.
>     ::: Messages without supporting info will risk being sent to /dev/null
>
>
>------------------------------------------------------------------------
>
>-------------------------------------------------------------------------
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>opinions on IT & business topics through brief surveys-and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Nagios-users mailing list
>Nagios-users at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/nagios-users
>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
>::: Messages without supporting info will risk being sent to /dev/null
>



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list