hi everybody:
i have a problem about syslog alert command, when alert event triggered, then
execute the alert command(shell script) on cacti server.
for example, my script called "/home/test.sh",so i input this command path in syslog alert rule webpage
in normal status the command run fine, but when i want to put variable after to the script name like "/home/test.sh aaa"
the command will not be executed across cacti alert plugin. However, i can run "/home/test.sh aaa" on local cacti server successfully, why?
my shell script need bring variable to show dynamic data , how can i slove the problem?
please help, thanks!!
-----------------------
today solve the problem, my syslog plugin version is 1.21,the latest is 1.22
i check the syslog_process.php source code on version 1.22,found that line
exec_background("/bin/sh", $command); but my code is exec_background($command);
so, i modify the code and trigger /home/test.sh aaa event.
now, it works perfectly.
[sovled] syslog plugin alert command problem?
Moderators: Developers, Moderators
-
- Posts: 1
- Joined: Mon Jul 15, 2013 9:29 am
Re: [sovled] syslog plugin alert command problem?
I was able to get this to function without changing the .php file The alert command was enclosed in a back tick ....
`\usr\local\bin\test.sh '<MESSAGE>'`
`\usr\local\bin\test.sh '<MESSAGE>'`
Who is online
Users browsing this forum: No registered users and 1 guest