Hello community, here is the log from the commit of package zabbix.13604 for openSUSE:Leap:15.1:Update checked in at 2020-10-04 06:22:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.1:Update/zabbix.13604 (Old) and /work/SRC/openSUSE:Leap:15.1:Update/.zabbix.13604.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "zabbix.13604" Sun Oct 4 06:22:47 2020 rev:1 rq:833968 version:3.0.31 Changes: -------- New Changes file: --- /dev/null 2020-09-10 00:27:47.435250138 +0200 +++ /work/SRC/openSUSE:Leap:15.1:Update/.zabbix.13604.new.4249/zabbix.changes 2020-10-04 06:23:13.735328488 +0200 @@ -0,0 +1,1451 @@ +------------------------------------------------------------------- +Sat Jul 18 21:23:54 UTC 2020 - Boris Manojlovic <[email protected]> + +- updated to latest release 3.0.31 + CVE-2020-15803 patch +- added zabbix-CVE-2020-15803.patch - resolves boo#1174253 +- Bug Fixes + + ZBX-17600 Fixed security vulnerability cve-2020-11800 (remote code execution) + +------------------------------------------------------------------- +Mon Dec 23 14:35:27 UTC 2019 - Boris Manojlovic <[email protected]> + +- upated to latest release 3.0.29 +- Bug Fixes + + ZBX-17101 Fixed url validation before output + + ZBX-16750 Fixed broken validation of peer certificate issuer and subject strings + in tls connect, fixed logging + + ZBX-16178 Fixed distributive can contain untracked backup file include/config.h.in~ + +------------------------------------------------------------------- +Fri May 31 13:54:16 UTC 2019 - Boris Manojlovic <[email protected]> + +- updated to latest release 3.0.28 + + ZBX-15915 Fixed linking error if round() is undefined + + ZBX-16074 Added file revision number generation for compilation on ms windows + + ZBX-11284 Removed sid url argument for form cancel buttons + + ZBX-15416 Fixed locale validation in user create and update api methods + +------------------------------------------------------------------- +Wed Apr 24 13:58:50 UTC 2019 - Boris Manojlovic <[email protected]> + +- updated to latest release 3.0.27 +- bugfix release; + + ZBX-16019 Fixed host.conn, host.ip, ipaddress and host.dns macros + expansion in global scripts + + ZBX-15674 Fixed map status to be displayed ok if there + are no problem in submaps + + ZBX-2494 Fixed sorting of items, item prototypes, lld rules and + screens to avoid deadlocks in database between server and frontend + + ZBX-10404 Fixed password being passed in plain text + in media type edit form + + ZBX-15721 Fixed escaping of control characters in json encoder + + ZBX-15937 Fixed agent startup problem in win 2008 r2 w/o sp1 by + merging zbx-15728 + + ZBX-15588 Fixed function names that are written to the log + file when using log_level_debug + + ZBX-15870 Fixed redundant jsloader loading in login page + + ZBX-15913 Fixed possible crash when sending custom alerts + + ZBX-13347 Fixed possible crash in history syncer process + when processing discovered item value + +------------------------------------------------------------------- +Wed Mar 27 10:05:47 UTC 2019 - Boris Manojlovic <[email protected]> + +- updated to latest release 3.0.26 +- bugfix release; + + ZBX-15867 fixed invalid DNS being accepted when receiving discovery + contents from Zabbix proxy + + ZBX-15552 fixed compilation with LibreSSL as OpenSSL replacement + and OpenSSL without PSK support + + ZBX-15788 fixed crash when substituting LLD macros in calculated + item formula expression + + ZBX-15670 fixed inefficient vmware eventlog downloading + + ZBX-14858 fixed processing of unlimited vmware maxQueryMetrics value + + ZBX-10496 fixed links to installation instructions in README file + + ZBX-15494 fixed handling numbers that written in scientific notation + + ZBX-15316 fixed problem with socket inheritance preventing Windows + agent from restarting under certain circumstances + +------------------------------------------------------------------- +Fri Mar 22 12:59:58 UTC 2019 - Boris Manojlovic <[email protected]> + +- added patch zabbix-3.0.25-new-m4-pgsql.patch to mitigate postgresql-devel separation into + devel and server-devel packages in openSUSE:Factory + +------------------------------------------------------------------- +Tue Jan 29 08:49:04 UTC 2019 - [email protected] + +- updated to latest release 3.0.25 +- bugfix release - bugs fixed; + + ZBX-15220 fixed displaying of last value for values received in the same second + + ZBX-15460 reset agent availability when host status changes, + e.g., when host gets disabled + + ZBX-11761 added warnings in case of TLS identity mismatch + + ZBX-15355 fixed undefined index in configuration.import API call + + ZBX-15354 fixed undefined index in API calls without "auth" parameter + + ZBX-14331 fixed error allowing users to change type of + a host interface that already has items attached + + ZBX-15313 fixed unit suffix support in calculated item expressions + + ZBX-14592 fixed calculation of SLA and availability report + when problem has negative duration + + ZBX-15156 fixed undefined offset error in host screen with web item + + ZBX-14624 fixed agent collector not releasing connection to missing/removed disk devices + + ZBX-14604 fixed displaying of the graph name on screens + + ZBX-15233 renamed fuzzytime() function description in dropdown list + + ZBX-12801 excluded zabbix_sender.dll from MS Windows builds with TLS + + ZBX-15260 improved misleading warning message when agent fails + to find log file during processing logrt[] item + + ZBX-15206 fixed deprecated net-snmp attribute + + ZBX-15238 fixed updating nextcheck time in discovery rules to + avoid overlaps between discovery executions + + ZBX-8383 updated Tomcat template for compatibility with recent Tomcat versions, + fixed constraint error when importing new data.tmpl + + ZBX-14606 removed strict-transport-security header from frontend + + ZBX-14977 fixed creation of unneeded database record if host prototype + inventory mode is disabled; fixed validation for host and host prototype inventory mode + + ZBX-15146 fixed SQL error occurred when too long IP address is attempted to be written in database + +------------------------------------------------------------------- +Tue Dec 11 01:57:13 UTC 2018 - Jan Engelhardt <[email protected]> + +- POSIX compliant scriptlets must use chown "A:B", not "A.B". +- Do not let fdupes run across common partitions/subvolumes. + +------------------------------------------------------------------- +Fri Nov 30 15:20:52 UTC 2018 - [email protected] + +- fixed spec file to required correct php version + +------------------------------------------------------------------- +Mon Nov 26 14:47:01 UTC 2018 - [email protected] + +- updated to latest release 3.0.24 +- added feature: + + ZBXNEXT-4841 removed hardcoded location for iconv.h; + thanks to Helmut Grohne for the patch + + ZBXNEXT-3047 fixed compilation errors on Windows platform + with static OpenSSL libraries + + ZBXNEXT-4836 added license information and OpenSSL linking exception to README + file, show crypto library version when started with '-V' - Bug fixes: +- bugfixes: + + ZBX-14635 fixed rare LLD failures when moving host between groups + + ZBX-13719 fixed loss of calc_fnc index in graph edit form + + ZBX-13009 fixed percentage calculation on availability reports list page + + ZBX-15132 backported daylight saving related scheduled checks fix from + ZBX-12965 BX-14899 fixed wrong net.tcp.listen values on obsolete Linux systems + + ZBX-15142 fixed time format for vmware performance counters query + + ZBX-14833 fixed selectHosts option in dservice.get API method to return + the list of hosts by IP and proxy + + ZBX-15062 fixed binary heap trying to reallocate slots on every insert + + ZBX-14805 fixed unauthorized request error when resetting + filter after enabling/disabling elements + + ZBX-14758 fixed encoding for cookie names and values + + ZBX-14691 fixed faulty behaviour of mandatory fields in Trigger expression form + + ZBX-13505 fixed link coloring in map when related trigger is not monitored + + ZBX-14953 fixed not closed connection with vmware at the end of update session via a call to Logout() + + ZBX-14966 removed the notes about sqlite from zabbix_server.conf + + ZBX-14422 fixed SQL queries being logged when accessing API, + even if debug mode is disabled + + ZBX-15027 fixed startup failures due to orphaned or zombie processes + remaining when zabbix daemon is terminated during startup + +------------------------------------------------------------------- +Tue Nov 6 15:35:12 UTC 2018 - [email protected] + +- updated to latest release 3.0.23 + + added feature: + * ZBXNEXT-4782 improve out of memory error message by adding + statistics and backtrace; improve something impossible has + just happened error message by adding backtrace +- Bug Fixes: + + ZBX-14779 extended support of system.stat[ent], system.stat[cpu,pc], + system.stat[cpu,ec] on IBM AIX to LPAR type 'dedicated' + + ZBX-14851 fixed the host visible name in the event details/messages + from server when using long utf8 text + + ZBX-14972 fixed the case where data from non-monitored VMware + services are not removed from vmware cache + + ZBX-14856 added support for OpenSSL 1.1.1 + + ZBX-14971 added note on runtime control with PID numbers larger + than 65535 to server, proxy and agentd help messages and man pages + + ZBX-14734 fixed the verification of the assignment of two web + checks with the same name from different templates to one host + + ZBX-14749 fixed cloning inherited host prototype on host + + ZBX-14663 fixed calculation of Y zero position in graph + + ZBX-14811 fixed color of the host name in the title of the Screens + + ZBX-14776 fixed sorting when changing status of media type + + ZBX-14757 fixed fields becoming writable upon form refresh + in host prototype form + + ZBX-14689 fixed updating of the Graph list of host when + selecting a group of hosts + + ZBX-14803 fixed incorrect profile update causing page + filter to sometimes show duplicate values + + ZBX-14727 fixed selection of data for trigger overview, + data overview and graphs if first drop down entry is "none" + + ZBX-14650 fixed web.page.regexp item parameters description + + ZBX-14882 fixed crash in vmware collector when receiving invalid xml + + ZBX-14853 fixed error of vmware items caused + by misconfigured vmware maxQueryMetrics parameter + + ZBX-14845 fixed filter in triggers status page not + being reset when navigating from dashboard and host inventory + +------------------------------------------------------------------- +Tue Sep 25 15:03:32 UTC 2018 - Jan Engelhardt <[email protected]> + +- Update descriptions and also trim marketing wording. + +------------------------------------------------------------------- +Tue Sep 25 09:06:17 UTC 2018 - Jan Engelhardt <[email protected]> ++++ 1254 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:Leap:15.1:Update/.zabbix.13604.new.4249/zabbix.changes New: ---- README.SUSE apache2-zabbix.conf rn3.0.0.html zabbix-3.0.20-jsLoader-fix.patch zabbix-3.0.25-new-m4-pgsql.patch zabbix-3.0.31.tar.gz zabbix-CVE-2020-15803.patch zabbix-agentd.firewall zabbix-agentd.init.d zabbix-agentd.service zabbix-bash-completion-3.0-1.0.tar.gz zabbix-java-gateway.firewall zabbix-java-gateway.init.d zabbix-java-gateway.service zabbix-java-gateway.sh zabbix-proxy.firewall zabbix-proxy.init.d zabbix-proxy.service zabbix-rpmlintrc zabbix-server.firewall zabbix-server.init.d zabbix-server.service zabbix-tmpfiles.conf zabbix.changes zabbix.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ zabbix.spec ++++++ ++++ 988 lines (skipped) ++++++ README.SUSE ++++++ zabbix-phpfrontend: To enable zabbix frontend in apache type in console: # a2enflag ZABBIX or if you want to remove it from apache configuration type in console: # a2enflag -d ZABBIX # service apache2 restart or reload if apache restart is too disrupting ++++++ apache2-zabbix.conf ++++++ # please read how to enable zabbix frontend in # /usr/share/doc/packages/zabbix24-phpfrontend/README.SUSE <IfDefine ZABBIX> Alias /zabbix "/usr/share/zabbix/" <Directory "/usr/share/zabbix/"> Options Indexes MultiViews AllowOverride None <IfModule mod_authz_core.c> # Apache 2.4 Require all granted </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order allow,deny Allow from 127.0.0.1 Allow from 192.168.0.0/16 Allow from 10.0.0.0/8 Allow from ::1 </IfModule> </Directory> <DirectoryMatch "/usr/share/zabbix/(conf/|include/)> <IfModule mod_authz_core.c> # Apache 2.4 Require all denied </IfModule> <IfModule !mod_authz_core.c> Order deny,allow Deny from all </IfModule> </DirectoryMatch> </IfDefine> <IfDefine !ZABBIX> Redirect 403 /zabbix </IfDefine> ++++++ rn3.0.0.html ++++++ ++++ 965 lines (skipped) ++++++ zabbix-3.0.20-jsLoader-fix.patch ++++++ --- frontends/php/jsLoader.php.orig 2018-08-19 03:49:17.819869688 -0400 +++ frontends/php/jsLoader.php 2018-08-19 03:50:55.849869688 -0400 @@ -286,7 +286,7 @@ exit; } -header('Content-Type: application/javascript; charset=UTF-8'); +header('Content-Type: text/javascript; charset=UTF-8'); // breaks if "zlib.output_compression = On" // header('Content-length: '.$jsLength); header('Cache-Control: public, must-revalidate'); ++++++ zabbix-3.0.25-new-m4-pgsql.patch ++++++ ++++ 614 lines (skipped) ++++++ zabbix-CVE-2020-15803.patch ++++++ Index: frontends/php/include/classes/screens/CScreenUrl.php =================================================================== --- frontends/php/include/classes/screens/CScreenUrl.php.orig 2020-04-27 17:10:48.000000000 +0200 +++ frontends/php/include/classes/screens/CScreenUrl.php 2020-07-18 23:31:10.194774417 +0200 @@ -29,18 +29,10 @@ class CScreenUrl extends CScreenBase { public function get() { // prevent from resolving macros in configuration page if ($this->mode != SCREEN_MODE_PREVIEW && $this->mode != SCREEN_MODE_SLIDESHOW) { - return $this->getOutput( - CHtmlUrlValidator::validate($this->screenitem['url'], false) - ? new CIFrame($this->screenitem['url'], $this->screenitem['width'], $this->screenitem['height'], - 'auto') - : makeMessageBox(false, [[ - 'type' => 'error', - 'message' => _s('Provided URL "%1$s" is invalid.', $this->screenitem['url']) - ]] - ) - ); + return $this->getOutput($this->prepareElement()); } - elseif ($this->screenitem['dynamic'] == SCREEN_DYNAMIC_ITEM && $this->hostid == 0) { + + if ($this->screenitem['dynamic'] == SCREEN_DYNAMIC_ITEM && $this->hostid == 0) { return $this->getOutput((new CTableInfo())->setNoDataMessage(_('No host selected.'))); } @@ -54,14 +46,28 @@ class CScreenUrl extends CScreenBase { $this->screenitem['url'] = $url ? $url : $this->screenitem['url']; - return $this->getOutput( - CHtmlUrlValidator::validate($this->screenitem['url'], false) - ? new CIFrame($this->screenitem['url'], $this->screenitem['width'], $this->screenitem['height'], 'auto') - : makeMessageBox(false, [[ - 'type' => 'error', - 'message' => _s('Provided URL "%1$s" is invalid.', $this->screenitem['url']) - ]] - ) - ); + return $this->getOutput($this->prepareElement()); + } + + /** + * @return CTag + */ + public function prepareElement() { + if (CHtmlUrlValidator::validate($this->screenitem['url'], false)) { + $item = new CIFrame($this->screenitem['url'], $this->screenitem['width'], $this->screenitem['height'], + 'auto' + ); + + if (ZBX_IFRAME_SANDBOX !== false) { + $item->setAttribute('sandbox', ZBX_IFRAME_SANDBOX); + } + + return $item; + } + + return makeMessageBox(false, [[ + 'type' => 'error', + 'message' => _s('Provided URL "%1$s" is invalid.', $this->screenitem['url']) + ]]); } } ++++++ zabbix-agentd.firewall ++++++ ## Name: zabbix-agentd ## Description: Opens ports for zabbix-agentd # space separated list of allowed TCP ports TCP="10050" # space separated list of allowed UDP ports UDP="" # space separated list of allowed RPC services RPC="" # space separated list of allowed IP protocols IP="" # space separated list of allowed UDP broadcast ports BROADCAST="" ++++++ zabbix-agentd.init.d ++++++ #!/bin/sh # # /etc/init.d/zabbix-agentd # and its symbolic link # /(usr/)sbin/rczabbix-agentd # ### BEGIN INIT INFO # Provides: zabbix-agentd # Required-Start: $network $remote_fs $syslog # Should-Start: $time # Required-Stop: $syslog $remote_fs # Should-Stop: $time ypbind smtp # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: ZABBIX agentd # Description: Start ZABBIX agentd ### END INIT INFO # Check for missing binaries (stale symlinks should not happen) # Note: Special treatment of stop for LSB conformance ZABBIX_AGENTD_BIN=/usr/sbin/zabbix-agentd test -x $ZABBIX_AGENTD_BIN || { echo "$ZABBIX_AGENTD_BIN not installed"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } # Check for existence of needed config file and read it ZABBIX_AGENTD_CONFIG=/etc/zabbix/zabbix-agentd.conf test -r $ZABBIX_AGENTD_CONFIG || { echo "$ZABBIX_AGENTD_CONFIG not existing"; if [ "$1" = "stop" ]; then exit 0; else exit 6; fi; } # Get pid file name from config PidFile=$(grep ^PidFile $ZABBIX_AGENTD_CONFIG|cut -d "=" -f 2) # Source LSB init functions # providing start_daemon, killproc, pidofproc, # log_success_msg, log_failure_msg and log_warning_msg. # This is currently not used by UnitedLinux based distributions and # not needed for init scripts for UnitedLinux only. If it is used, # the functions from rc.status should not be sourced or used. #. /lib/lsb/init-functions # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v be verbose in local rc status and clear it afterwards # rc_status -v -r ditto and clear both the local and overall rc status # rc_status -s display "skipped" and exit with status 3 # rc_status -u display "unused" and exit with status 3 # rc_failed set local and overall rc status to failed # rc_failed <num> set local and overall rc status to <num> # rc_reset clear both the local and overall rc status # rc_exit exit appropriate to overall rc status # rc_active checks whether a service is activated by symlinks . /etc/rc.status # Reset status of this service rc_reset # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error # 2 - invalid or excess argument(s) # 3 - unimplemented feature (e.g. "reload") # 4 - user had insufficient privileges # 5 - program is not installed # 6 - program is not configured # 7 - program is not running # 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl) # # Note that starting an already running service, stopping # or restarting a not-running service as well as the restart # with force-reload (in case signaling is not supported) are # considered a success. case "$1" in start) echo -n "Starting zabbix agentd " ## Start daemon with startproc(8). If this fails ## the return value is set appropriately by startproc. if [ ! -d $(dirname $PidFile) ]; then install -dm0770 $(dirname $PidFile) 2> /dev/null chown root.zabbix $(dirname $PidFile) fi /sbin/startproc -u zabbix -g zabbix -p $PidFile $ZABBIX_AGENTD_BIN # Remember status and be verbose rc_status -v ;; stop) echo -n "Shutting down zabbix agentd " ## Stop daemon with killproc(8) and if this fails ## killproc sets the return value according to LSB. /sbin/killproc -p $PidFile -TERM $ZABBIX_AGENTD_BIN # Remember status and be verbose rc_status -v ;; try-restart|condrestart) ## Do a restart only if the service was active before. ## Note: try-restart is now part of LSB (as of 1.9). ## RH has a similar command named condrestart. if test "$1" = "condrestart"; then echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" fi $0 status if test $? = 0; then $0 restart else rc_reset # Not running is not a failure. fi # Remember status and be quiet rc_status ;; restart) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop $0 start # Remember status and be quiet rc_status ;; force-reload) ## Signal the daemon to reload its config. Most daemons ## do this on signal 1 (SIGHUP). ## If it does not support it, restart the service if it ## is running. echo -n "Reload service zabbix agentd " ## if it supports it: /sbin/killproc -p $PidFile -HUP $ZABBIX_AGENTD_BIN #touch /var/run/zabbix/zabbix-agentd.pid rc_status -v ## Otherwise: #$0 try-restart #rc_status ;; reload) ## Like force-reload, but if daemon does not support ## signaling, do nothing (!) # If it supports signaling: echo -n "Reload service zabbix agentd " /sbin/killproc -p $PidFile -HUP $ZABBIX_AGENTD_BIN #touch /var/run/zabbix/zabbix-agentd.pid rc_status -v ## Otherwise if it does not support reload: #rc_failed 3 #rc_status -v ;; status) echo -n "Checking for service zabbix agentd " ## Check status with checkproc(8), if process is running ## checkproc will return with exit status 0. # Return value is slightly different for the status command: # 0 - service up and running # 1 - service dead, but /var/run/ pid file exists # 2 - service dead, but /var/lock/ lock file exists # 3 - service not running (unused) # 4 - service status unknown :-( # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) # NOTE: checkproc returns LSB compliant status values. /sbin/checkproc -p $PidFile $ZABBIX_AGENTD_BIN # NOTE: rc_status knows that we called this init script with # "status" option and adapts its messages accordingly. rc_status -v ;; probe) ## Optional: Probe for the necessity of a reload, print out the ## argument to this init script which is required for a reload. ## Note: probe is not (yet) part of LSB (as of 1.9) test $ZABBIX_AGENTD_CONFIG -nt $PidFile && echo reload ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" exit 1 ;; esac rc_exit ++++++ zabbix-agentd.service ++++++ [Unit] Description=Zabbix Monitor Agent After=syslog.target network.target [Service] Type=simple ExecStart=/usr/sbin/zabbix-agentd -f User=zabbix Group=zabbix PrivateTmp=yes [Install] WantedBy=multi-user.target ++++++ zabbix-java-gateway.firewall ++++++ ## Name: zabbix-java-gateway ## Description: Opens ports for zabbix-java-gateway # space separated list of allowed TCP ports TCP="10052" # space separated list of allowed UDP ports UDP="" # space separated list of allowed RPC services RPC="" # space separated list of allowed IP protocols IP="" # space separated list of allowed UDP broadcast ports BROADCAST="" ++++++ zabbix-java-gateway.init.d ++++++ #!/bin/sh # # /etc/init.d/zabbix-java-gateway # and its symbolic link # /(usr/)sbin/rczabbix-java-gateway # ### BEGIN INIT INFO # Provides: zabbix-java-gateway # Required-Start: $network $remote_fs $syslog # Should-Start: $time # Required-Stop: $syslog $remote_fs # Should-Stop: $time ypbind smtp # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: ZABBIX java gateway # Description: Start ZABBIX java jmx gateway ### END INIT INFO . /etc/rc.status # Reset status of this service rc_reset case "$1" in start) echo -n "Starting zabbix java gateway " /usr/bin/zabbix-java-gateway start # Remember status and be verbose rc_status -v ;; stop) echo -n "Shutting down zabbix java gateway " /usr/bin/zabbix-java-gateway stop # Remember status and be verbose rc_status -v ;; restart) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop $0 start # Remember status and be quiet rc_status ;; status) echo -n "Checking for service zabbix java gateway " ## Check status with checkproc(8), if process is running ## checkproc will return with exit status 0. # Return value is slightly different for the status command: # 0 - service up and running # 1 - service dead, but /var/run/ pid file exists # 2 - service dead, but /var/lock/ lock file exists # 3 - service not running (unused) # 4 - service status unknown :-( # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) # NOTE: checkproc returns LSB compliant status values. /usr/bin/zabbix-java-gateway status # NOTE: rc_status knows that we called this init script with # "status" option and adapts its messages accordingly. rc_status -v ;; reload) # make rpmlint happy ;; *) echo "Usage: $0 {start|stop|status|reload|restart}" exit 1 ;; esac rc_exit ++++++ zabbix-java-gateway.service ++++++ [Unit] Description=Zabbix Server After=syslog.target network.target [Service] Type=simple ExecStart=/usr/bin/zabbix-java-gateway run User=zabbixs PrivateTmp=yes [Install] WantedBy=multi-user.target ++++++ zabbix-java-gateway.sh ++++++ #!/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 ++++++ zabbix-proxy.firewall ++++++ ## Name: zabbix-proxy ## Description: Opens ports for zabbix-proxy # space separated list of allowed TCP ports TCP="10051" # space separated list of allowed UDP ports UDP="" # space separated list of allowed RPC services RPC="" # space separated list of allowed IP protocols IP="" # space separated list of allowed UDP broadcast ports BROADCAST="" ++++++ zabbix-proxy.init.d ++++++ #!/bin/sh # # /etc/init.d/zabbix-proxy # and its symbolic link # /(usr/)sbin/rczabbix-proxy # ### BEGIN INIT INFO # Provides: zabbix-proxy # Required-Start: $network $remote_fs $syslog # Should-Start: $time # Required-Stop: $syslog $remote_fs # Should-Stop: $time ypbind smtp # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: ZABBIX proxy # Description: Start ZABBIX proxy ### END INIT INFO # Check for missing binaries (stale symlinks should not happen) # Note: Special treatment of stop for LSB conformance ZABBIX_PROXY_BIN=/usr/sbin/zabbix-proxy test -x $ZABBIX_PROXY_BIN || { echo "$ZABBIX_PROXY_BIN not installed"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } # Check for existence of needed config file and read it ZABBIX_PROXY_CONFIG=/etc/zabbix/zabbix-proxy.conf test -r $ZABBIX_PROXY_CONFIG || { echo "$ZABBIX_PROXY_CONFIG not existing"; if [ "$1" = "stop" ]; then exit 0; else exit 6; fi; } # Get PidFile from config PidFile=$(grep ^PidFile $ZABBIX_PROXY_CONFIG|cut -d "=" -f 2) # Source LSB init functions # providing start_daemon, killproc, pidofproc, # log_success_msg, log_failure_msg and log_warning_msg. # This is currently not used by UnitedLinux based distributions and # not needed for init scripts for UnitedLinux only. If it is used, # the functions from rc.status should not be sourced or used. #. /lib/lsb/init-functions # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v be verbose in local rc status and clear it afterwards # rc_status -v -r ditto and clear both the local and overall rc status # rc_status -s display "skipped" and exit with status 3 # rc_status -u display "unused" and exit with status 3 # rc_failed set local and overall rc status to failed # rc_failed <num> set local and overall rc status to <num> # rc_reset clear both the local and overall rc status # rc_exit exit appropriate to overall rc status # rc_active checks whether a service is activated by symlinks . /etc/rc.status # Reset status of this service rc_reset # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error # 2 - invalid or excess argument(s) # 3 - unimplemented feature (e.g. "reload") # 4 - user had insufficient privileges # 5 - program is not installed # 6 - program is not configured # 7 - program is not running # 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl) # # Note that starting an already running service, stopping # or restarting a not-running service as well as the restart # with force-reload (in case signaling is not supported) are # considered a success. case "$1" in start) echo -n "Starting zabbix proxy " ## Start daemon with startproc(8). If this fails ## the return value is set appropriately by startproc. mkdir -p `dirname $PidFile` 2> /dev/null chown zabbixs.zabbixs `dirname $PidFile` /sbin/startproc -u zabbixs -g zabbixs -p $PidFile $ZABBIX_PROXY_BIN # Remember status and be verbose rc_status -v ;; stop) echo -n "Shutting down zabbix proxy " ## Stop daemon with killproc(8) and if this fails ## killproc sets the return value according to LSB. /sbin/killproc -p $PidFile -TERM $ZABBIX_PROXY_BIN # Remember status and be verbose rc_status -v ;; try-restart|condrestart) ## Do a restart only if the service was active before. ## Note: try-restart is now part of LSB (as of 1.9). ## RH has a similar command named condrestart. if test "$1" = "condrestart"; then echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" fi $0 status if test $? = 0; then $0 restart else rc_reset # Not running is not a failure. fi # Remember status and be quiet rc_status ;; restart) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop $0 start # Remember status and be quiet rc_status ;; force-reload) ## Signal the daemon to reload its config. Most daemons ## do this on signal 1 (SIGHUP). ## If it does not support it, restart the service if it ## is running. echo -n "Reload service zabbix proxyd " ## if it supports it: /sbin/killproc -p $PidFile -HUP $ZABBIX_PROXY_BIN #touch /var/run/zabbix/zabbix-proxy.pid rc_status -v ## Otherwise: #$0 try-restart #rc_status ;; reload) ## Like force-reload, but if daemon does not support ## signaling, do nothing (!) # If it supports signaling: echo -n "Reload service zabbix proxyd " /sbin/killproc -p $PidFile -HUP $ZABBIX_PROXY_BIN #touch /var/run/zabbix/zabbix-proxy.pid rc_status -v ## Otherwise if it does not support reload: #rc_failed 3 #rc_status -v ;; status) echo -n "Checking for service zabbix proxyd " ## Check status with checkproc(8), if process is running ## checkproc will return with exit status 0. # Return value is slightly different for the status command: # 0 - service up and running # 1 - service dead, but /var/run/ pid file exists # 2 - service dead, but /var/lock/ lock file exists # 3 - service not running (unused) # 4 - service status unknown :-( # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) # NOTE: checkproc returns LSB compliant status values. /sbin/checkproc -p $PidFile $ZABBIX_PROXY_BIN # NOTE: rc_status knows that we called this init script with # "status" option and adapts its messages accordingly. rc_status -v ;; probe) ## Optional: Probe for the necessity of a reload, print out the ## argument to this init script which is required for a reload. ## Note: probe is not (yet) part of LSB (as of 1.9) test $ZABBIX_PROXY_CONFIG -nt $PidFile && echo reload ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" exit 1 ;; esac rc_exit ++++++ zabbix-proxy.service ++++++ [Unit] Description=Zabbix Proxy After=syslog.target network.target [Service] Type=simple ExecStart=/usr/sbin/zabbix-proxy -f User=zabbixs PrivateTmp=yes [Install] WantedBy=multi-user.target ++++++ zabbix-rpmlintrc ++++++ # do we really need to register user... addFilter("non-standard-gid.*zabbix"); addFilter("non-standard-uid /var/(run|log)/zabbix zabbix") # upgrade script for database addFilter("spurious-executable-perm .*/usr/share/doc/packages/zabbix24-server/dbpatches/([12]).([0-9])/mysql/upgrade") addFilter("doc-file-dependency .*/usr/share/doc/packages/zabbix24-server/dbpatches/[12].[0-9]/mysql/upgrade /bin/bash") # upstream ... addFilter("incorrect-fsf-address"); # no manuall pages for init scripts... addFilter("W: no-manual-page-for-binary rczabbix-.*"); # this package is used on sle 11 so no go addFilter("W: suse-obsolete-insserv-requirement"); ++++++ zabbix-server.firewall ++++++ ## Name: zabbix-server ## Description: Opens ports for zabbix-server # space separated list of allowed TCP ports TCP="10051" # space separated list of allowed UDP ports UDP="" # space separated list of allowed RPC services RPC="" # space separated list of allowed IP protocols IP="" # space separated list of allowed UDP broadcast ports BROADCAST="" ++++++ zabbix-server.init.d ++++++ #!/bin/sh # # /etc/init.d/zabbix-server # and its symbolic link # /(usr/)sbin/rczabbix-server # ### BEGIN INIT INFO # Provides: zabbix-server # Required-Start: $network $remote_fs $syslog # Should-Start: $time mysql postgresql # Required-Stop: $syslog $remote_fs # Should-Stop: $time ypbind smtp # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: ZABBIX server # Description: Start ZABBIX server ### END INIT INFO # Check for missing binaries (stale symlinks should not happen) # Note: Special treatment of stop for LSB conformance ZABBIX_SERVER_BIN=/usr/sbin/zabbix-server test -x $ZABBIX_SERVER_BIN || { echo "$ZABBIX_SERVER_BIN not installed"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } # Check for existence of needed config file and read it ZABBIX_SERVER_CONFIG=/etc/zabbix/zabbix-server.conf test -r $ZABBIX_SERVER_CONFIG || { echo "$ZABBIX_SERVER_CONFIG not existing"; if [ "$1" = "stop" ]; then exit 0; else exit 6; fi; } # Get pid file name from config PidFile=$(grep ^PidFile $ZABBIX_SERVER_CONFIG|cut -d "=" -f 2) # Source LSB init functions # providing start_daemon, killproc, pidofproc, # log_success_msg, log_failure_msg and log_warning_msg. # This is currently not used by UnitedLinux based distributions and # not needed for init scripts for UnitedLinux only. If it is used, # the functions from rc.status should not be sourced or used. #. /lib/lsb/init-functions # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v be verbose in local rc status and clear it afterwards # rc_status -v -r ditto and clear both the local and overall rc status # rc_status -s display "skipped" and exit with status 3 # rc_status -u display "unused" and exit with status 3 # rc_failed set local and overall rc status to failed # rc_failed <num> set local and overall rc status to <num> # rc_reset clear both the local and overall rc status # rc_exit exit appropriate to overall rc status # rc_active checks whether a service is activated by symlinks . /etc/rc.status # Reset status of this service rc_reset # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error # 2 - invalid or excess argument(s) # 3 - unimplemented feature (e.g. "reload") # 4 - user had insufficient privileges # 5 - program is not installed # 6 - program is not configured # 7 - program is not running # 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl) # # Note that starting an already running service, stopping # or restarting a not-running service as well as the restart # with force-reload (in case signaling is not supported) are # considered a success. case "$1" in start) echo -n "Starting zabbix server " ## Start daemon with startproc(8). If this fails ## the return value is set appropriately by startproc. if [ ! -d $(dirname $PidFile) ]; then install -dm0770 $(dirname $PidFile) 2> /dev/null chown root.zabbixs $(dirname $PidFile) fi # start as zabbixd user to mitigate security issue with # agent reading zabbix server configuration /sbin/startproc -u zabbixs -g zabbixs -p $PidFile $ZABBIX_SERVER_BIN # Remember status and be verbose rc_status -v ;; stop) echo -n "Shutting down zabbix server " ## Stop daemon with killproc(8) and if this fails ## killproc sets the return value according to LSB. /sbin/killproc -p $PidFile -TERM $ZABBIX_SERVER_BIN # Remember status and be verbose rc_status -v ;; try-restart|condrestart) ## Do a restart only if the service was active before. ## Note: try-restart is now part of LSB (as of 1.9). ## RH has a similar command named condrestart. if test "$1" = "condrestart"; then echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" fi $0 status if test $? = 0; then $0 restart else rc_reset # Not running is not a failure. fi # Remember status and be quiet rc_status ;; restart) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop $0 start # Remember status and be quiet rc_status ;; force-reload) ## Signal the daemon to reload its config. Most daemons ## do this on signal 1 (SIGHUP). ## If it does not support it, restart the service if it ## is running. echo -n "Reload service zabbix server " ## if it supports it: /sbin/killproc -p $PidFile -HUP $ZABBIX_SERVER_BIN #touch /var/run/zabbix/zabbix-server.pid rc_status -v ## Otherwise: #$0 try-restart #rc_status ;; reload) ## Like force-reload, but if daemon does not support ## signaling, do nothing (!) # If it supports signaling: echo -n "Reload service zabbix server " /sbin/killproc -p $PidFile -HUP $ZABBIX_SERVER_BIN #touch /var/run/zabbix/zabbix-server.pid rc_status -v ## Otherwise if it does not support reload: #rc_failed 3 #rc_status -v ;; status) echo -n "Checking for service zabbix server " ## Check status with checkproc(8), if process is running ## checkproc will return with exit status 0. # Return value is slightly different for the status command: # 0 - service up and running # 1 - service dead, but /var/run/ pid file exists # 2 - service dead, but /var/lock/ lock file exists # 3 - service not running (unused) # 4 - service status unknown :-( # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) # NOTE: checkproc returns LSB compliant status values. /sbin/checkproc -p $PidFile $ZABBIX_SERVER_BIN # NOTE: rc_status knows that we called this init script with # "status" option and adapts its messages accordingly. rc_status -v ;; probe) ## Optional: Probe for the necessity of a reload, print out the ## argument to this init script which is required for a reload. ## Note: probe is not (yet) part of LSB (as of 1.9) test $ZABBIX_SERVER_CONFIG -nt $PidFile && echo reload ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" exit 1 ;; esac rc_exit ++++++ zabbix-server.service ++++++ [Unit] Description=Zabbix Server After=syslog.target network.target [Service] Type=simple ExecReload=/usr/sbin/zabbix-server -R config_cache_reload ExecStart=/usr/sbin/zabbix-server -f User=zabbixs PrivateTmp=yes [Install] WantedBy=multi-user.target ++++++ zabbix-tmpfiles.conf ++++++ D /var/run/zabbix 0770 root zabbix -
