Source
zbx_alerter_deserialize_email(ipc_message->data, &alertid, &mediatypeid, &eventid, &source, &object, &objectid,
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
ZBX_PTR_VECTOR_IMPL(am_source_stats_ptr, zbx_am_source_stats_t *)
static zbx_es_t es_engine;
/******************************************************************************
* *
* Purpose: executes script alert type *
* *
* Parameters: command - [IN] command for execution *
* error - [OUT] error string if function fails *
* max_error_len - [IN] length of error buffer *
* *
* Return value: SUCCEED if processed successfully, TIMEOUT_ERROR if *
* timeout occurred, SIG_ERROR if interrupted by signal or FAIL *
* otherwise *
* *
******************************************************************************/
static int execute_script_alert(const char *command, char *error, size_t max_error_len)
{
char *output = NULL;
int ret = FAIL;
if (SUCCEED == (ret = zbx_execute(command, &output, error, max_error_len, ALARM_ACTION_TIMEOUT,
ZBX_EXIT_CODE_CHECKS_ENABLED, NULL)))
{
zabbix_log(LOG_LEVEL_DEBUG, "%s output:\n%s", command, output);
zbx_free(output);
}