Salt installation Zabbix

Source: Internet
Author: User

States file:

[email protected] base]# cat Top.sls
Base
‘*‘:
-Init.env_init
[email protected] base]# cat Init/env_init.sls
Include
-Init.zabbix_agent

[email protected] base]# cat Init/zabbix_agent.sls
Zabbix-agent:
Pkg.installed:
-Name:zabbix22-agent

File.managed:
-Name:/etc/zabbix_agentd.conf
-Source:salt://init/files/zabbix_agentd.conf
-Tmplate:jinjia
-Defaults:
Server: {{pillar[' zabbix-agent ' [' Zabbix-server ']}}
-Require:
-Pkg:zabbix-agent

Service.running:
-Enable:true
-Watch:
-Pkg:zabbix-agent
-File:zabbix-agent

[email protected] pillar]# cat Base/top.sls
Base
‘*‘:
-Zabbix
[email protected] pillar]# cat Base/zabbix.sls
Zabbix-agent:
zabbix-server:192.168.1.65

[Email protected] files]# Grep-ev "^$|^#" zabbix_agentd.conf
Pidfile=/var/run/zabbix/zabbix_agentd.pid
Logfile=/var/log/zabbix/zabbix_agentd.log
Logfilesize=0
Server={{server}}
serveractive=127.0.0.1
Hostname=zabbix Server
include=/etc/zabbix_agentd.conf.d/

No such file will be error-activated at startup:

Mkdri/etc/zabbix_agentd.conf.d

Perform:

[[email protected] ~]# Salt ' * ' state.highstate test=true

[[email protected] ~]# Salt ' * ' state.highstate

Salt installation Zabbix

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.