Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
Home
Help
Search
Calendar
Login
Register
Openideas.info
|
Pandora FMS
|
Community general support
|
Help for new users in Pandora FMS
|
[Solved] Command execution within an alert
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: [Solved] Command execution within an alert (Read 598 times)
0 Members and 2 Guests are viewing this topic.
JPSelter
Full Member
Karma: 0
Offline
Posts: 26
[Solved] Command execution within an alert
«
on:
October 26, 2009, 10:26:10 AM »
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?
«
Last Edit: July 21, 2010, 06:03:43 PM by darode
»
Logged
Sancho Lerena
Administrator
Expert member
Karma: 24
Offline
Posts: 1151
I can see everything... with my glasses :-)
Re: Command execution within an alert
«
Reply #1 on:
October 26, 2009, 07:36:17 PM »
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".
Logged
-- See you in the other screen.
JPSelter
Full Member
Karma: 0
Offline
Posts: 26
Re: Command execution within an alert
«
Reply #2 on:
October 27, 2009, 11:01:59 AM »
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)
Logged
JPSelter
Full Member
Karma: 0
Offline
Posts: 26
Re: Command execution within an alert
«
Reply #3 on:
October 27, 2009, 04:17:03 PM »
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.
Logged
Sancho Lerena
Administrator
Expert member
Karma: 24
Offline
Posts: 1151
I can see everything... with my glasses :-)
Re: Command execution within an alert
«
Reply #4 on:
October 28, 2009, 11:55:40 AM »
This works (cpu all), sure. Could be a lot of things, but in this case, it's not a bug ! ;-)
Logged
-- See you in the other screen.
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Pandora FMS
-----------------------------
=> Announcements and news
=> Suggestions and new feature request
=> F for Flexible... or awesome ideas using Pandora FMS
=> Community general support
===> Español / Spanish forum
===> Help for new users in Pandora FMS
===> Advanced troubleshooting and problems
===> 日本語フォーラム / Japanese forum
===> Development lists (Read only)
-----------------------------
General Category
-----------------------------
=> Epic Tunnelizer
=> Lechuga CMS
=> Sysadmin tools
=> General monitoring discussion
=> Openideas General Forums
===> Linux systems
===> Unix systems
=> Babel Enterprise
=> Integria IMS
=> phpRADmin
Loading...