Welcome to Pandora FMS Community › Forums › Community support › Create Email Alert
-
Create Email Alert
Posted by neverland on November 15, 2007 at 07:27#!/usr/bin/expect -f
set arg1 [lindex $argv 0]
set arg2 [lindex $argv 1]
set arg3 [lindex $argv 2]
set timeout 1
spawn telnet myserver.com 25
expect “220”
send “ehlo mymachine.mydomain.comr”
expect “250”
send “AUTH loginr”
expect “334”
send “2342348werhkwjernsdf78sdf3w4rwe32wer=r”
expect “334”
send “YRejewrhneruT==r”
expect “235”
send “MAIL FROM: [email protected]”
expect “Sender OK”
send “RCPT TO: $arg1r”
expect “250”
send “datar”
expect “354”
send “Subject: $arg2r”
send “$arg3 rr”
send “.r”
expect “delivery”
send “quit”
quitaccording to above file , i have saved it into /root/SNMP-Trapinfo-1.0/blib/script and set permissions for /root/SNMP-Trapinfo-1.0 with chmod 700
Anyway i already have created the mail alert on pandora agent
and i am not sure where do i should put Pandora FMS alert definition command: /root/smtp _field1_ _field2_ _field3_==>i am quite clear what to do in this stepps. i never do exchange server but pls confirm me if i am doing it right
thankneverland replied 17 years, 3 months ago 2 Members · 6 Replies -
6 Replies
-
::
Hi neverland,
You have to set up the right path in the alert definition (manage alerts, email alerts)
Bear in mind that that script code the user and the pass in Base-64 (which is needed by exchange servers), so you might want to try, firstly, by hand from the CLI and see whether you need base64 coded name/password.
-
::
hi this is what i have done
1. i set alert Conntrack New eMail 5 minutes 0 0 N/A to my bridge and it fire alert but anyway it did not send an email.
2.i am not sure if i set the right destination.
Alert configuration > Modify alert
/root/SNMP-Trapinfo-1.0/blib_field1_ _field2_ _field3_
ps. the script expect i have saved it into /root/SNMP-Trapinfo-1.0/blib -
-
::
hi now i have tried this
#!/usr/bin/expect -fset arg1 [lindex $argv 0]
set arg2 [lindex $argv 1]
set arg3 [lindex $argv 2]
set timeout 1
spawn telnet xx.xx.xx.xx 25
expect “220”
send “ehlo xx.xx.xx.xxr”
expect “250”
#send “AUTH loginr”
#expect “334”
#send “r”
#expect “334”
#send “r”
#expect “235”
send “MAIL FROM: [email protected] r”
expect “Sender OK”
send “RCPT TO: [email protected]”
expect “250”
send “datar”
expect “354”
send “Subject:Bridge.$arg2r”
send “$arg3 rr”According to the script above i execute the file as a result
sending an email to [email protected] but when i switch back to
the pandora FMS page again it when the agent alert something but the alert did not fire…maybe the mistake is “Alert configuration > Modify alert >email command: /root/SNMP-Trapinfo-1.0/blib/lib/SNMP ./expect.sh” do i type it in the right format …quite not sure i just want it to execute the expect.sh <> -
-