5818960de9
- New Features and Improvements + ZBXNEXT-9000 Changed query table for ASM disk group metrics in Oracle Database plugin and Oracle by ODBC template Agent Templates + ZBXNEXT-9217 Added AWS Lambda by HTTP template Templates + ZBXNEXT-9293 Updated max supported MySQL version to 9.0 Proxy Server + ZBXNEXT-8657 Updated Zabbix health templates with new visualization Templates + ZBXNEXT-9143 Added index on auditlog recordsetid Server + ZBXNEXT-9081 Added Small Computer System Interface (SCSI) device type support to Zabbix agent 2 Smart plugin Agent + ZBXNEXT-6445 Added recovery expression for fuzzytime triggers in Linux and Windows templates, removed fuzzytime triggers from active agent templates Templates + ZBXNEXT-9201 Updated max supported MySQL version to 8.4 Proxy Server + ZBXNEXT-9225 Updated max supported TimescaleDB version to 2.15 Server + ZBXNEXT-9226 Updated max supported MariaDB version to 11.4 Proxy Server + ZBXNEXT-8868 Added discovery and template for Azure VM Scale Sets Templates - Bug Fixes + BX-24947 Fixed PHP runtime errors while processing frontend notifications Frontend + ZBX-24824 Improved loadable plugin connection broker Agent + ZBX-24583 Fixed inability to export/import web scenario with digest authentication API + ZBX-23905 Fixed double scroll in script dialogs Frontend + ZBX-18767 Fixed word breaks in flexible text input fields and trigger expressions Frontend + ZBX-24909 Fixed resolving of macro functions in the "Item value" widget Frontend + ZBX-24859 Fixed JavaScript in S3 buckets discovery rule Templates + ZBX-24617 Fixed hardcoded region in AWS by HTTP template Templates + ZBX-24524 Fixed "New values per second" statistic to include dependent items in calculation Proxy Server + ZBX-24821 Made 'execute_on' value being recorded in audit only for shell scripts Server + ZBX-23312 Fixed discovery edit form being saved incorrectly after dcheck update Frontend + ZBX-24773 Fixed duplicate item preprocessing in Kubernetes Kubelet by HTTP template Templates + ZBX-24514 Fixed standalone Zabbix server and Zabbix proxy not stopping when database is read-only Proxy Server + ZBX-23936 Fixed state and styling of readonly fields Frontend + ZBX-24520 Fixed an issue with incorrect translations used in several frontend places Frontend + ZBX-21815 Fixed issue with undefined offset for media type when it was deleted before saving the user Frontend + ZBX-24108 Fixed error in dashboard if Map widget contains map element that user doesn't have access to Frontend + ZBX-24569 Fixed old and added new items to Azure Virtual Machine template Templates + ZBX-24537 Fixed tags subfilter in Latest data kiosk mode Frontend + ZBX-24167 Fixed template linkage when item prototype collision is found Server + ZBX-23770 Improved monitoring user permissions documentation for Zabbix agent 2 Oracle plugin and Oracle by ODBC template Documentation + ZBX-24565 Removed redundant kernel header include, fixed musl compatibility issues (thanks to Alpine Linux maintainers for spotting this) + ZBX-24610 Fixed interface field appearance for discovered items without interface set Frontend + ZBX-24562 Fixed incorrect problem order in Problems by severity widget's hintbox Frontend + ZBX-23751 Fixed inability to pass an action filter condition without an "operator" property, implying a default value of "Equal" API + ZBX-21429 Prevented ability to disable all UI element access via role.update API API + ZBX-19271 Fixed inconsistent tag row rendering in different edit forms Frontend + ZBX-24539 Fixed incorrect threshold in trigger expression of Check Point Next Generation Firewall by SNMP template Templates + ZBX-24667 Fixed vm.memory.size[pused] item on Solaris Agent + ZBX-23781 Added storage volumes check in HPE iLO by HTTP template Templates + ZBX-24391 Fixed Zabbix agent to return net.tcp.socket.count result without error if IPv6 is disabled Agent + ZBX-24235 Fixed value misalignment in Item value widget Frontend + ZBX-24352 Fixed custom severity name usage in Geomap widget Frontend + ZBX-24665 Fixed potential problem with deprecated GCE Integrity feature Templates + ZBX-20993 Fixed Zabbix agent 2 MQTT plugin clientID to be generated by strict requirements Agent + ZBX-23426 Added dependent item with JavaScript preprocessing for edges SD-WAN in VMWare SD-WAN VeloCloud by HTTP template Templates + ZBX-24566 Fixed crash when expression macro is used in unsupported location Server + ZBX-24450 Fixed issue where graph could differ for data gathered from PostgreSQL and other databases Frontend + ZBX-24513 Fixed real-time export of rarely updated trends Server + ZBX-24163 Fixed submap addition in Map navigation tree widget to not append same submaps repeatedly Frontend + ZBX-23398 Fixed trigger expression constructor incorrectly showing '<' and '>' operators Frontend + ZBX-23584 Fixed error message being displayed when updating host after changing item status Frontend + ZBX-24635 Fixed datastore triggers in VMware templates Templates OBS-URL: https://build.opensuse.org/package/show/server:monitoring:zabbix/zabbix?expand=0&rev=63
122 lines
2.8 KiB
Bash
122 lines
2.8 KiB
Bash
#!/bin/bash
|
|
|
|
CMD=$1
|
|
NOHUP=${NOHUP:=$(which nohup)}
|
|
|
|
# resolve links - $0 may be a softlink
|
|
ZBXJAVAGWCTL="$0"
|
|
|
|
while [ -h "$ZBXJAVAGWCTL" ]; do
|
|
ls=$(ls -ld "$ZBXJAVAGWCTL")
|
|
link=$(expr "$ls" : '.*-> \(.*\)$')
|
|
if expr "$link" : '/.*' > /dev/null; then
|
|
ZBXJAVAGWCTL="$link"
|
|
else
|
|
ZBXJAVAGWCTL=$(dirname "$ZBXJAVAGWCTL")/"$link"
|
|
fi
|
|
done
|
|
|
|
SERVICE_NAME="zabbix-java-gateway"
|
|
JAVA=${JAVA:-java}
|
|
JAVA_OPTIONS="-server"
|
|
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix-java-gateway-log.xml"
|
|
ZABBIX_OPTIONS=${ZABBIX_OPTIONS:=}
|
|
ZABBIX_JAVA_DIR=${ZABBIX_JAVA_DIR:=$(dirname "$ZBXJAVAGWCTL")}
|
|
ZABBIX_JAVA_CONF=${ZABBIX_JAVA_CONF:=/etc/zabbix/zabbix-java-gateway.conf}
|
|
ZABBIX_JAVA_GW_PID=${ZABBIX_JAVA_GW_PID:=/run/zabbixs/zabbix-java-gateway.pid}
|
|
ZABBIX_JAVA_GW_LOGFILE=${ZABBIX_JAVA_GW_LOGFILE:=/var/log/zabbixs/zabbix-java-gateway.log}
|
|
# source configuration...
|
|
. ${ZABBIX_JAVA_CONF}
|
|
|
|
# Build classpath
|
|
CLASSPATH=$(echo $(find /usr/lib/zabbix-java-gateway/ -name "*jar" -type f -print)|sed -e 's/ /:/g')
|
|
if [ -n "$PID_FILE" ]; then
|
|
ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.pidFile=$PID_FILE"
|
|
fi
|
|
if [ -n "$LISTEN_IP" ]; then
|
|
ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.listenIP=$LISTEN_IP"
|
|
fi
|
|
if [ -n "$LISTEN_PORT" ]; then
|
|
ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.listenPort=$LISTEN_PORT"
|
|
fi
|
|
if [ -n "$START_POLLERS" ]; then
|
|
ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.startPollers=$START_POLLERS"
|
|
fi
|
|
|
|
COMMAND_LINE="$JAVA $JAVA_OPTIONS -classpath $CLASSPATH $ZABBIX_OPTIONS com.zabbix.gateway.JavaGateway"
|
|
|
|
start() {
|
|
status
|
|
if [ $? -ne 0 ]; then
|
|
echo "Starting ${SERVICE_NAME} ..."
|
|
cd "$ZBXJAVAGWCTL_DIR"
|
|
(/bin/bash -c "$COMMAND_LINE > /dev/null 2>&1 & echo \$!") > ${ZABBIX_JAVA_GW_PID}
|
|
fi
|
|
}
|
|
|
|
run() {
|
|
echo "Running ${SERVICE_NAME} ..."
|
|
cd "$ZBXJAVAGWCTL_DIR"
|
|
exec $COMMAND_LINE
|
|
}
|
|
|
|
stop() {
|
|
pid=$(cat ${ZABBIX_JAVA_GW_PID})
|
|
echo "Stopping ${SERVICE_NAME} ($pid) ..."
|
|
if kill $pid; then
|
|
rm ${ZABBIX_JAVA_GW_PID}
|
|
fi
|
|
}
|
|
|
|
restart() {
|
|
echo "Restarting ${SERVICE_NAME} ..."
|
|
stop
|
|
start
|
|
}
|
|
|
|
status() {
|
|
pid=$(get_pid)
|
|
if [ ! -z $pid ]; then
|
|
if pid_running $pid; then
|
|
echo "${SERVICE_NAME} running as pid $pid"
|
|
return 0
|
|
else
|
|
echo "Stale pid file with $pid - removing..."
|
|
rm ${ZABBIX_JAVA_GW_PID}
|
|
return 1
|
|
fi
|
|
fi
|
|
|
|
echo "${SERVICE_NAME} not running"
|
|
return 3
|
|
}
|
|
|
|
get_pid() {
|
|
cat ${ZABBIX_JAVA_GW_PID} 2> /dev/null
|
|
}
|
|
|
|
pid_running() {
|
|
kill -0 $1 2> /dev/null
|
|
}
|
|
|
|
case "$CMD" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart)
|
|
restart
|
|
;;
|
|
status)
|
|
status
|
|
;;
|
|
run)
|
|
run
|
|
;;
|
|
*)
|
|
echo "Usage $0 {start|stop|restart|status}"
|
|
RETVAL=1
|
|
esac
|