|
|
| Author |
Message |
fastkeys Helper
Joined: 06 Jul 2004 Posts: 12
|
Posted: Fri Feb 18, 2005 3:04 pm Post subject: Notifications |
|
|
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
|
Posted: Mon Feb 21, 2005 11:14 pm Post subject: |
|
|
| 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
|
Posted: Mon Feb 28, 2005 6:12 pm Post subject: |
|
|
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
|
Posted: Thu Mar 24, 2005 12:46 am Post subject: |
|
|
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
|
Posted: Fri Mar 25, 2005 1:39 am Post subject: |
|
|
| 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 |
|
 |
|