Ad Widget

Collapse

Trying to use externalscripts with Zabbix 3.2 and SELinux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kevinwalter
    Junior Member
    • May 2017
    • 5

    #1

    Trying to use externalscripts with Zabbix 3.2 and SELinux

    Hi,

    I'm trying to get the externalscripts directory working.

    I've installed the Percona MySQL monitoring kit. But somehow the scripts show me Permission denied within Zabbix.

    When I check the SELinux log this is the message I get:
    type=AVC msg=audit(1494437335.692:229632): avc: denied { execute } for pid=8442 comm="sh" name="get_mysql_stats_wrapper.sh" dev="dm-4" ino=466 scontext=system_u:system_r:zabbix_agent_t:s0 tcontext=system_ubject_r:zabbix_script_exec_t:s0 tclass=file

    Also when starting the Zabbix agent for the first time, it crashes with Permission denied [13].

    I'm on RHEL 7.3 and using Zabbix 3.2 (Latest version)

    What to do? I've tried to make a module but that did not work.

    Kind Regards,

    Kevin
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    Originally posted by kevinwalter
    When I check the SELinux log this is the message I get:
    type=AVC msg=audit(1494437335.692:229632): avc: denied { execute } for pid=8442 comm="sh" name="get_mysql_stats_wrapper.sh" dev="dm-4" ino=466 scontext=system_u:system_r:zabbix_agent_t:s0 tcontext=system_ubject_r:zabbix_script_exec_t:s0 tclass=file


    I've tried to make a module but that did not work.
    That's correct: audit information + selinux module. Example how to create selinux module for zabbix (not for your case): https://github.com/monitoringartist/...oring/#selinux
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    Working...