gnokii
Philip Roy
philip at roysys.com.au
Tue May 6 22:00:24 CEST 2003
Susana,
I checked my command for sending an sms via gnokii and it looks similar
to the one you are using. Heres my command:
# 'service-notify-by-sms' command definition
define command{
command_name service-notify-by-sms
command_line /bin/echo -e "*Nagios*
\n$NOTIFICATIONTYPE$\n$SERVICEDESC$\n$HOSTALIAS$\n$SERVICESTATE$\n$DATET
IME$\nInfo: $OUTPUT$" | /usr/local/bin/gnokii --sendsms $CONTACTPAGER$
2>/dev/null
}
The only thing I can suggest is to make sure you test gnokii from the
command prompt as the same user that nagios is running, probably a
nagios account. You need to make sure that nagios has permissions to
access the serial port and lock file for Gnokii. Other than that the
details you have provided look fine to me.
Phil
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Tom DE BLENDE
> Sent: Monday, 5 May 2003 9:58 PM
> To: Susana Raquel Neves Reis
> Cc: nagios-users
> Subject: [Nagios-users] Re: gnokii
>
> I'm sorry, I never used gnokii. Better send things like these to the
list!
>
> Susana Raquel Neves Reis wrote:
> > Hi ,
> >
> > How can I make gnokii works on my nagios.I have my
> > gnokii running using a command prompt. I can send and
> > received a text message using the command :
> >
> > # /usr/local/bin/gnokii --sendsms <cell phone #>
> >
> >
> > - Here is my sample configuration in contacts.cfg
> > file
> >
> > # 'nagios' contact definition
> > define contact{
> > contact_name nagios
> > alias Nagios Admin
> > service_notification_period 24x7
> > host_notification_period 24x7
> > service_notification_options w,u,c,r
> > host_notification_options d,u,r
> > service_notification_commands notify-by-sms
> > host_notification_commands host-notify-by-sms
> > email root at ma.pt
> > pager 963747634
> > }
> >
> > - Here is my sample configuration of misccommands.cfg
> >
> >
> > # 'host-notify-by-sms' command definition
> > define command{
> > command_name notify-by-sms
> > command_line /usr/bin/printf "$NOTIFICATIONTYPE$:
> > $HOSTNAME$: $SERVICESTATE$ ($OUTPUT$)" | /usr/local/bin/gnokii
> > --sendsms $CONTACTPAGER$ -C0 2>/dev/null
> > }
> >
> > # 'notify-by-sms' command definition
> > define command{
> > command_name notify-by-sms
> > command_line /usr/bin/printf "$NOTIFICATIONTYPE$:
> > $HOSTNAME$: $SERVICESTATE$ ($OUTPUT$)" | /usr/local/bin/gnokii
> > --sendsms $CONTACTPAGER$ -C0 2>/dev/null
> > }
> >
> > This don't work in nagios but i don't get errors either.
> >
> >>I need to do more configurations in other files?
> >>Can you help me !!!why doesn't work?
> >
> >
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> 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
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
_______________________________________________
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