Chris PeBenito 97e815
## <summary>Distributed infrastructure monitoring</summary>
Chris PeBenito 97e815
Chris PeBenito 97e815
########################################
Chris PeBenito 97e815
## <summary>
Chris PeBenito 97e815
##	Execute a domain transition to run zabbix.
Chris PeBenito 97e815
## </summary>
Chris PeBenito 97e815
## <param name="domain">
Chris PeBenito 97e815
## <summary>
Chris PeBenito 97e815
##	Domain allowed to transition.
Chris PeBenito 97e815
## </summary>
Chris PeBenito 97e815
## </param>
Chris PeBenito 97e815
#
Chris PeBenito 97e815
interface(`zabbix_domtrans',`
Chris PeBenito 97e815
	gen_require(`
Chris PeBenito 97e815
		type zabbix_t, zabbix_exec_t;
Chris PeBenito 97e815
	')
Chris PeBenito 97e815
Chris PeBenito 97e815
	domtrans_pattern($1,zabbix_exec_t,zabbix_t)
Chris PeBenito 97e815
')
Chris PeBenito 97e815
Chris PeBenito 97e815
########################################
Chris PeBenito 97e815
## <summary>
Chris PeBenito 97e815
##	Allow the specified domain to read zabbix's log files.
Chris PeBenito 97e815
## </summary>
Chris PeBenito 97e815
## <param name="domain">
Chris PeBenito 97e815
##	<summary>
Chris PeBenito 97e815
##	Domain allowed access.
Chris PeBenito 97e815
##	</summary>
Chris PeBenito 97e815
## </param>
Chris PeBenito 97e815
## <rolecap/>
Chris PeBenito 97e815
#
Chris PeBenito 97e815
interface(`zabbix_read_log',`
Chris PeBenito 97e815
	gen_require(`
Chris PeBenito 97e815
		type zabbix_log_t;
Chris PeBenito 97e815
	')
Chris PeBenito 97e815
Chris PeBenito 97e815
	logging_search_logs($1)
Chris PeBenito 97e815
	read_files_pattern($1,zabbix_log_t,zabbix_log_t)
Chris PeBenito 97e815
')
Chris PeBenito 97e815
Chris PeBenito 97e815
########################################
Chris PeBenito 97e815
## <summary>
Chris PeBenito 97e815
##	Allow the specified domain to append
Chris PeBenito 97e815
##	zabbix log files.
Chris PeBenito 97e815
## </summary>
Chris PeBenito 97e815
## <param name="domain">
Chris PeBenito 97e815
## 	<summary>
Chris PeBenito 97e815
##	Domain allowed access.
Chris PeBenito 97e815
## 	</summary>
Chris PeBenito 97e815
## </param>
Chris PeBenito 97e815
#
Chris PeBenito 97e815
interface(`zabbix_append_log',`
Chris PeBenito 97e815
	gen_require(`
Chris PeBenito 97e815
		type var_log_t, zabbix_log_t;
Chris PeBenito 97e815
	')
Chris PeBenito 97e815
Chris PeBenito 97e815
	logging_search_logs($1)
Chris PeBenito 97e815
	append_files_pattern($1,zabbix_log_t,zabbix_log_t)
Chris PeBenito 97e815
')
Chris PeBenito 97e815
Chris PeBenito 97e815
########################################
Chris PeBenito 97e815
## <summary>
Chris PeBenito 97e815
##	Read zabbix PID files.
Chris PeBenito 97e815
## </summary>
Chris PeBenito 97e815
## <param name="domain">
Chris PeBenito 97e815
##	<summary>
Chris PeBenito 97e815
##	Domain allowed access.
Chris PeBenito 97e815
##	</summary>
Chris PeBenito 97e815
## </param>
Chris PeBenito 97e815
#
Chris PeBenito 97e815
interface(`zabbix_read_pid_files',`
Chris PeBenito 97e815
	gen_require(`
Chris PeBenito 97e815
		type zabbix_var_run_t;
Chris PeBenito 97e815
	')
Chris PeBenito 97e815
Chris PeBenito 97e815
	files_search_pids($1)
Chris PeBenito 97e815
	allow $1 zabbix_var_run_t:file read_file_perms;
Chris PeBenito 97e815
')