lists.netmrg.net lists.netmrg.net
NetMRG discussion and support
 
FAQ :: Search :: Memberlist :: Usergroups :: Register
Profile :: Log in to check your private messages :: Log in

Notifications

 
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support
Author Message
fastkeys
Helper


Joined: 06 Jul 2004
Posts: 12

PostPosted: Fri Feb 18, 2005 3:04 pm    Post subject: Notifications Reply with quote

Hi

I'm trying to get notifications working - but I'm having some problems.

Here is the command I've set to run:

echo WARNING on %dev_name% - %ip%. %test_name% returned %test_result%. | /bin/mail -s WARNING alex@longhill.brighton-hove.sch.uk

When I run that as user netmrg on the server that we're running netmrg on, it works fine and I get an email as expected, with no substitution.

However, when this command runs from witin NetMRG, I only get an email with subject "WARNING" and no content.

Do I need to do something with the pipe character? or is there something else I'm missing.

Cheers

Alex
Back to top
balleman
Site Admin


Joined: 20 Jan 2003
Posts: 282

PostPosted: Mon Feb 21, 2005 11:14 pm    Post subject: Reply with quote

I would try putting quotes around your message and see if that helps. If not, running the gatherer from the command line (with -m or -a) which should help give you a better picture of what's going on.
Back to top
A7V
Contributor


Joined: 18 Jun 2004
Posts: 53
Location: Lisbon, Portugal

PostPosted: Mon Feb 28, 2005 6:12 pm    Post subject: Reply with quote

It can be two things: quotes as Balleman said or echo not being run. Try this:

/bin/echo 'WARNING on %dev_name% - %ip%. %test_name% returned %test_result%.' | /bin/mail -s WARNING alex@longhill.brighton-hove.sch.uk
Back to top
cantripnet
Helper


Joined: 09 Dec 2004
Posts: 11

PostPosted: Thu Mar 24, 2005 12:46 am    Post subject: Reply with quote

I had the same problem until I added the full path to echo as well

/bin/echo "WARNING on %dev_name% - %ip%. %event_name% returned %current_value%." | mail -s NetMRG_ALERT

worked ( put the email as the parameter )

but
echo "WARNING on %dev_name% - %ip%. %event_name% returned %current_value%." | mail -s NetMRG_ALERT

just sends an empty email
Back to top
balleman
Site Admin


Joined: 20 Jan 2003
Posts: 282

PostPosted: Fri Mar 25, 2005 1:39 am    Post subject: Reply with quote

For tests and notifications, the gatherer will assume that the program it is trying to run is in the NetMRG libexec location unless the command starts with '/'.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support All times are GMT
Page 1 of 1

 



smartBlue Style © 2002 Smartor
Powered by phpBB © 2001, 2002 phpBB Group