I tried to create a simple alert. When a machine doesn´t respond to an icmp ping anymore I want to get an email about this event. So I created an alert, looked into the documentation and was wondering where the "command" field is located. I can see "alert type" and "description", but not "command". How can I tell the alert to execute a script file? I chose to use the EXPECT script, it is working. I also created a script with the content the documentation gave me. But it doesn´t say how the file should be named. Is it named "smtp"? What about the original "smtp" command? I already did "chmod 700 /root/smtp" but when test-executing "./smtp" it says "permission denied", even logged in as root. What did I do wrong here?
[Solved] Command execution within an alert
JPSelter · 26 oct 2009, 13:26 · 5 mensajes · 58 visitas
- Inicio del debate
Set 755 and make a absolute call, like /usr/share/pandora_server/util/yourscript.xxx Remember that if pandora is running on root user, script will be run as root, if you're running as "nobody" script will be executed as "nobody".
Ok, I´m nearly there... I found the place where to put the command, also the script (I called it /var/www/util/send_alert) is working from command line. But the email is not sent and I don´t know why. I think it has something to do with execute-permission. Where can I see what user is running pandora or the web-console? What command can I use to give permission? I already did "chown 755 /var/www/util/send_alert" but the email is still not sent. (suggestion: insert a test-button under "manage alerts" for sending alerts for tests)
Solved... I forgot to add the "_field1_ _field2_ _field3_" after the command. I guess I cannot solve my other cpuusage_all question by myself, seems more like a bug.
This works (cpu all), sure. Could be a lot of things, but in this case, it's not a bug ! ;-)
Entra en tu cuenta para publicar.
