Initial import

tags/zabbix-3.4.4-2
Daniel Berteaud 7 years ago
parent 9b037219e5
commit ec245814bb
  1. 5
      tito.props
  2. 67
      zabbix-agent.init
  3. 20
      zabbix-agent.service
  4. 7
      zabbix-logrotate.in
  5. 69
      zabbix-proxy.init
  6. 18
      zabbix-proxy.service
  7. 23
      zabbix-proxy.te
  8. 69
      zabbix-server.init
  9. 17
      zabbix-server.service
  10. 34
      zabbix-server.te
  11. 1
      zabbix-tmpfile.conf
  12. 39
      zabbix-web.conf
  13. 1068
      zabbix.spec
  14. 12
      zabbix_proxy
  15. 12
      zabbix_server

@ -0,0 +1,5 @@
[buildconfig]
builder = tito.builder.GitAnnexBuilder
tagger = tito.tagger.ReleaseTagger

@ -0,0 +1,67 @@
#! /bin/sh
#
# chkconfig: - 85 15
# description: zabbix agent daemon
#
### BEGIN INIT INFO
# Provides: zabbix-agent
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: start and stop zabbix agent
# Description: Zabbix Agent
### END INIT INFO
# zabbix details
ZABBIX_AGENTD=/usr/sbin/zabbix_agentd
CONF=/etc/zabbix/zabbix_agentd.conf
PIDFILE=/var/run/zabbix-agent.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -x $ZABBIX_AGENTD ] || exit 5
[ -e $CONF ] || exit 6
RETVAL=0
case "$1" in
start)
echo -n "Starting Zabbix Agent: "
daemon $ZABBIX_AGENTD -c $CONF
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix-agent
;;
stop)
echo -n "Shutting down Zabbix Agent: "
killproc zabbix_agentd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zabbix-agent
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
status)
status zabbix_agentd
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
;;
esac
exit $RETVAL

@ -0,0 +1,20 @@
[Unit]
Description=Zabbix Monitoring Agent
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
PIDFile=/var/run/zabbix/zabbix_agentd.pid
Restart=always
User=zabbix
Group=zabbix
PrivateTmp=yes
CPUShares=512
MemoryLimit=150M
BlockIOWeight=500
InaccessibleDirectories=/home
ReadOnlyDirectories=/etc /usr
[Install]
WantedBy=multi-user.target

@ -0,0 +1,7 @@
/var/log/zabbix/zabbix_COMPONENT.log {
missingok
monthly
notifempty
compress
create 0664 zabbix zabbix
}

@ -0,0 +1,69 @@
#! /bin/sh
#
# chkconfig: - 85 15
# description: zabbix proxy daemon
#
### BEGIN INIT INFO
# Provides: zabbix
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: start and stop zabbix proxy
# Description: Zabbix Proxy
### END INIT INFO
# zabbix details
if [ -x /usr/sbin/zabbix_proxy_mysql ]; then
ZABBIX_PROXY=zabbix_proxy_mysql
elif [ -x /usr/sbin/zabbix_proxy_pgsql ]; then
ZABBIX_PROXY=zabbix_proxy_pgsql
elif [ -x /usr/sbin/zabbix_proxy_sqlite3 ]; then
ZABBIX_PROXY=zabbix_proxy_sqlite3
else
exit 5
fi
CONF=/etc/zabbix/zabbix_proxy.conf
PIDFILE=/var/run/zabbix.pid
# Source function library.
. /etc/rc.d/init.d/functions
[ -e $CONF ] || exit 6
RETVAL=0
case "$1" in
start)
echo -n "Starting Zabbix Proxy: "
daemon $ZABBIX_PROXY -c $CONF
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix-proxy
;;
stop)
echo -n "Shutting down Zabbix Proxy: "
killproc $ZABBIX_PROXY
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zabbix-proxy
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
status)
status $ZABBIX_PROXY
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
;;
esac
exit $RETVAL

@ -0,0 +1,18 @@
[Unit]
Description=Zabbix Proxy
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/usr/sbin/zabbix_proxy -c /etc/zabbix/zabbix_proxy.conf
ExecReload=/usr/sbin/zabbix_proxy -R config_cache_reload
PIDFile=/var/run/zabbix/zabbix_proxy.pid
PrivateTmp=yes
CPUShares=512
MemoryLimit=50M
BlockIOWeight=500
InaccessibleDirectories=/home
ReadOnlyDirectories=/etc /usr
[Install]
WantedBy=multi-user.target

@ -0,0 +1,23 @@
module zabbix-proxy 1.1;
require {
type var_lib_t;
type ping_t;
type initrc_t;
type unlabeled_t;
type zabbix_t;
class file { read getattr };
class sem { unix_read unix_write associate destroy };
class shm { unix_read unix_write associate destroy };
class tcp_socket { create getattr accept shutdown read };
class netlink_route_socket { create bind };
class process setrlimit;
}
#============= ping_t ==============
allow ping_t var_lib_t:file { read getattr };
allow initrc_t unlabeled_t:sem { unix_read unix_write associate destroy };
allow initrc_t unlabeled_t:shm { unix_read unix_write associate destroy };
allow unlabeled_t self:tcp_socket { create getattr accept shutdown read };
allow unlabeled_t self:netlink_route_socket { create bind };
allow zabbix_t self:process setrlimit;

@ -0,0 +1,69 @@
#! /bin/sh
#
# chkconfig: - 85 15
# description: zabbix server daemon
#
### BEGIN INIT INFO
# Provides: zabbix
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: start and stop zabbix server
# Description: Zabbix Server
### END INIT INFO
# zabbix details
if [ -x /usr/sbin/zabbix_server_mysql ]; then
ZABBIX=zabbix_server_mysql
elif [ -x /usr/sbin/zabbix_server_pgsql ]; then
ZABBIX=zabbix_server_pgsql
elif [ -x /usr/sbin/zabbix_server_sqlite3 ]; then
ZABBIX=zabbix_server_sqlite3
else
exit 5
fi
CONF=/etc/zabbix/zabbix_server.conf
PIDFILE=/var/run/zabbix.pid
# Source function library.
. /etc/rc.d/init.d/functions
[ -e $CONF ] || exit 6
RETVAL=0
case "$1" in
start)
echo -n "Starting Zabbix Server: "
daemon $ZABBIX -c $CONF
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix
;;
stop)
echo -n "Shutting down Zabbix Server: "
killproc $ZABBIX
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zabbix
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
status)
status $ZABBIX
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
;;
esac
exit $RETVAL

@ -0,0 +1,17 @@
[Unit]
Description=Zabbix Server
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
ExecReload=/usr/sbin/zabbix_server -R config_cache_reload
PIDFile=/var/run/zabbix/zabbix_server.pid
PrivateTmp=yes
MemoryLimit=500M
BlockIOWeight=500
InaccessibleDirectories=/home
ReadOnlyDirectories=/etc /usr
[Install]
WantedBy=multi-user.target

@ -0,0 +1,34 @@
module zabbix-server 1.3;
require {
type devlog_t;
type zabbix_t;
type ping_t;
type syslogd_t;
type sudo_exec_t;
type zabbix_var_lib_t;
type zabbix_var_run_t;
class process { setrlimit setpgid };
class capability { sys_resource audit_write };
class file { execute read create ioctl execute_no_trans write getattr unlink open };
class netlink_audit_socket { nlmsg_relay create };
class sock_file { create write};
class unix_dgram_socket { create connect sendto };
class dir { write remove_name add_name };
class key write;
class unix_stream_socket connectto;
}
allow ping_t zabbix_var_lib_t:file { read getattr };
allow zabbix_t devlog_t:sock_file write;
allow zabbix_t self:capability { sys_resource audit_write };
allow zabbix_t self:netlink_audit_socket { nlmsg_relay create };
allow zabbix_t self:process { setrlimit setpgid };
allow zabbix_t self:unix_dgram_socket { create connect };
allow zabbix_t self:key write;
allow zabbix_t sudo_exec_t:file { read execute open execute_no_trans };
allow zabbix_t syslogd_t:unix_dgram_socket sendto;
allow zabbix_t zabbix_var_lib_t:dir { write remove_name add_name };
allow zabbix_t zabbix_var_lib_t:file { execute read create getattr execute_no_trans write ioctl unlink open };
allow zabbix_t self:unix_stream_socket connectto;
allow zabbix_t zabbix_var_run_t:sock_file create;

@ -0,0 +1 @@
d /run/zabbix 750 zabbix zabbix

@ -0,0 +1,39 @@
#
# Zabbix monitoring system php web frontend
#
Alias /zabbix /usr/share/zabbix
<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
<IfModule mod_authz_core.c>
# Apache 2.4
Require ip 127.0.0.1
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order allow,deny
Allow from 127.0.0.1
</IfModule>
#php_admin_value post_max_size 16M
#php_admin_value max_execution_time 300
#php_admin_value max_input_time 300
#php_admin_value date.timezone "Europe/Paris"
</Directory>
<Directory ~ "^/usr/share/zabbix/(conf|api|include)/">
<files *.php>
<IfModule mod_authz_core.c>
# Apache 2.4
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</files>
</Directory>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,12 @@
#!/bin/sh
exec 2>&1
if [ -x /usr/sbin/zabbix_proxy_mysql ]; then
ZABBIX=/usr/sbin/zabbix_proxy_mysql
elif [ -x /usr/sbin/zabbix_proxy_pgsql ]; then
ZABBIX=/usr/sbin/zabbix_proxy_pgsql
elif [ -x /usr/sbin/zabbix_proxy_sqlite3 ]; then
ZABBIX=/usr/sbin/zabbix_proxy_sqlite3
else
exit 1
fi
$ZABBIX "$@"

@ -0,0 +1,12 @@
#!/bin/sh
exec 2>&1
if [ -x /usr/sbin/zabbix_server_mysql ]; then
ZABBIX=/usr/sbin/zabbix_server_mysql
elif [ -x /usr/sbin/zabbix_server_pgsql ]; then
ZABBIX=/usr/sbin/zabbix_server_pgsql
elif [ -x /usr/sbin/zabbix_server_sqlite3 ]; then
ZABBIX=/usr/sbin/zabbix_server_sqlite3
else
exit 1
fi
$ZABBIX "$@"
Loading…
Cancel
Save