Closed bmfmancini closed 3 years ago
I found out this is happening because the alert name is not being escaped properly the shell is interpreting some of the messages
each time the command is run this spits out to the console sh: line 1: User: command not found
I found extra single quotes leading and ending the command being put there by the command function
if ($alert['open_ticket'] == 'on' && strlen(read_config_option('syslog_ticket_command'))) {
if (is_executable(read_config_option('syslog_ticket_command'))) {
exec(read_config_option('syslog_ticket_command') .
" --alert-name='" . clean_up_name($alert['name']) . "'" .
" --severity='" . $alert['severity'] . "'" .
" --hostlist='" . implode(',',$hostlist) . "'" .
" --message='" . $alert['message'] . "'");
Issue was on my end sorry guys I had a single quote in the command field on the form facepalm moment
Hey guys,
I am seeing that on Syslog 3.1 while the log shows the command you input is executing the command is never actually called I made a dead-simple script to accept any input from Syslog and echo to a file
it never actually gets called
!/bin/bash
echo $@ >> /tmp/syslog.test
I have the script put in like so
I have tried with '' with and without quotes
Here is the log message
Here are the permissions of the script
No errors show up in the log
the email function does work