Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zabbix
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
zabbix
Commits
ace1bacf
Commit
ace1bacf
authored
Apr 28, 2025
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added systemd unit and config for agent2
parent
04e931db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
Makefile
Makefile
+34
-1
No files found.
Makefile
View file @
ace1bacf
...
...
@@ -64,11 +64,44 @@ export ZABBIX_AGENT_CONFIG
agent2
:
tar
xf zabbix-5.4.2.tar.gz
cd
zabbix-5.4.2
&&
PATH
=
$$
PATH:
$(CURDIR)
/../go/go/bin ./configure
--prefix
=
/usr
--sysconfdir
=
/etc
--enable-agent2
--with-openssl
cd
zabbix-5.4.2
&&
PATH
=
$$
PATH:
$(CURDIR)
/../go/go/bin ./configure
--prefix
=
/usr
--sysconfdir
=
/etc
--
disable-agent
--
enable-agent2
--with-openssl
$(MAKE)
-C
zabbix-5.4.2
PATH
=
$$
PATH:
$(CURDIR)
/../go/go/bin
GOCACHE
=
/tmp/gocache
GOPATH
=
$(CURDIR)
/../go/go
$(MAKE)
-C
zabbix-5.4.2
install
PATH
=
$$
PATH:
$(CURDIR)
/../go/go/bin
GOCACHE
=
/tmp/gocache
GOPATH
=
$(CURDIR)
/../go/go
@
echo
"
$$
ZABBIX_AGENT2_SERVICE"
>
/lib/systemd/system/zabbix-agent2.service
systemctl
enable
zabbix-agent2.service
@
echo
"
$$
ZABBIX_AGENT2_CONFIG"
>>
/etc/config/zabbix
install
-v
-Dm755
zabbix_agent /usr/share/easycwmp/functions/zabbix
rm
-rf
zabbix-5.4.2
zabbix-agent2-service
:
define
ZABBIX_AGENT2_SERVICE
[Unit]
Description
=
Zabbix Agent
After
=
syslog.target network.target
[Service]
Type
=
forking
ExecStartPre
=
/usr/sbin/zabbix_agentd-configure
ExecStart
=
/usr/sbin/zabbix_agentd
ExecStartPost
=
sleep
3
PIDFile
=
/run/zabbix/zabbix_agentd.pid
Restart
=
always
RestartSec
=
100
[Install]
WantedBy
=
multi-user.target
endef
export
ZABBIX_AGENT2_SERVICE
zabbix-agent2-config
:
define
ZABBIX_AGENT2_CONFIG
config
zabbix
'agent'
option
server
''
option
serveractive
''
endef
export
ZABBIX_AGENT2_CONFIG
opi
:
sed
-e
'/^UserParameter=device\.product.*/a UserParameter=system.hw.temp,bc <<< "scale=3; `cat /sys/devices/virtual/thermal/thermal_zone0/temp`/1000"'
-i
/etc/zabbix_agentd.conf
sed
-e
'/^UserParameter=system\.hw\.temp.*/a UserParameter=system.cpu.freq.max,echo "`cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq`000"'
-i
/etc/zabbix_agentd.conf
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment