-
Notifications
You must be signed in to change notification settings - Fork 0
/
zabbix-agent
68 lines (44 loc) · 1.39 KB
/
zabbix-agent
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
apt install zabbix-agent -y
systemctl stop zabbix-agent
cat > /etc/zabbix/zabbix_agentd.conf << 'EOF'
# This is a configuration file for Zabbix agent daemon (Unix)
# To get more information about Zabbix, visit http://www.zabbix.com
############ GENERAL PARAMETERS #################
PidFile=/run/zabbix/zabbix_agentd.pid
### Option: LogType
LogType=file
LogFile=/var/log/zabbix-agent/zabbix_agentd.log
LogFileSize=200
### Option: DebugLevel
# DebugLevel=3
LogRemoteCommands=1
##### Passive checks related
### Option: Server
Server=10.10.100.15
ServerActive=10.10.100.15
### Option: HostnameItem
# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
# Does not support UserParameters or aliases.
#
# Mandatory: no
# Default:
HostnameItem=system.hostname
HostMetadata=Linux
HostMetadataItem=system.uname
# Include=/etc/zabbix/zabbix_agentd.userparams.conf
# Include=/etc/zabbix/zabbix_agentd.conf.d/
Include=/etc/zabbix/zabbix_agentd.conf.d/*.conf
####### USER-DEFINED MONITORED PARAMETERS #######
### Option: UnsafeUserParameters
# UnsafeUserParameters=0
### Option: UserParameter
UserParameter=release,. /etc/os-release; echo "$PRETTY_NAME"
####### LOADABLE MODULES #######
### Option: LoadModulePath
# LoadModulePath=${libdir}/modules
### Option: LoadModule
# LoadModule=
EOF
systemctl enable zabbix-agent
systemctl restart zabbix-agent