SaltStack安装zabbix-agent-第九篇
# salt 'linux-node2*' state.sls zabbix.zabbix-agentlinux
-node2.example.com:
----------
ID:
/etc/yum.repos.d/epel-7.repo
Function:
file.managed
Result: True
Comment: File
/etc/yum.repos.d/epel-7.repo updated
Started:
20:33:54.907929
Duration:
14.348 ms
Changes:
----------
diff:
New file
mode:
0644
----------
ID: zabbix-agent
Function: pkg.installed
Name: zabbix22-agent
Result: True
Comment: The following packages were installed/updated: zabbix22-agent
Started: 20:33:55.228682
Duration: 20540.866 ms
Changes:
----------
zabbix22:
----------
new:
2.2.20-1.el7
old:
zabbix22-agent:
----------
new:
2.2.20-1.el7
old:
----------
ID: zabbix-agent
Function: file.managed
Name: /etc/zabbix_agentd.conf
Result: True
Comment: File /etc/zabbix_agentd.conf updated
Started: 20:34:15.771609
Duration: 34.695 ms
Changes:
----------
diff:
---
+++
@@ -78,7 +78,7 @@
# Default:
# Server=
-Server=127.0.0.1
+Server=192.168.56.11
### Option: ListenPort
# Agent will listen on this port for connections from the server.
@@ -130,7 +130,7 @@
# Default:
# Hostname=
-Hostname=Zabbix server
+Hostname=linux-node2.example.com
### Option: HostnameItem
# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
@@ -240,7 +240,7 @@
# Include=
# Include=/etc/zabbix_agentd.userparams.conf
-# Include=/etc/zabbix_agentd.conf.d/
+Include=/etc/zabbix_agentd.conf.d/
####### USER-DEFINED MONITORED PARAMETERS #######
----------
ID: zabbix_agentd.conf.d
Function: file.directory
Name: /etc/zabbix_agentd.conf.d
Result: True
Comment: Directory /etc/zabbix_agentd.conf.d updated
Started: 20:34:15.824436
Duration: 1.088 ms
Changes:
----------
/etc/zabbix_agentd.conf.d:
New Dir
----------
ID: zabbix-agent
Function: service.running
Result: True
Comment: Service zabbix-agent has been enabled, and is running
Started: 20:34:15.825810
Duration: 443.184 ms
Changes:
----------
zabbix-agent:
True
Summary
------------
Succeeded: 5 (changed=5)
Failed: 0
------------
Total states run: 5
页:
[1]