Pandora FMS Community

Create Email Alert

neverland · 15 nov 2007, 7:27 · 7 mensajes · 49 visitas

  1. Inicio del debate

    #!/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" quit according 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 step ps. i never do exchange server but pls confirm me if i am doing it right thank

  2. 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.

  3. 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

  4. Check out what I wrote about the CLI and all that. On the other hand, do you actually need authenthication to send the email? Is not the "mail" command enough?

  5. hi now i have tried this #!/usr/bin/expect -f set 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 <>

  6. Yes, you're doing it wrong You only have to put the path to the expect.sh That's to say: /root/SNMP-Trapinfo-1.0/blib/lib/SNMP/expect.sh Cheers Manuel

  7. thanks it works

Entra en tu cuenta para publicar.