Notifications

fastkeys

18-02-2005 10:04:43

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

balleman

21-02-2005 18:14:30

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.

A7V

28-02-2005 13:12:20

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

cantripnet

23-03-2005 19:46:17

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

balleman

24-03-2005 20:39:43

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 '/'.