Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bash-init-server
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bash_public
bash-init-server
Commits
a81d3796
Commit
a81d3796
authored
Jan 09, 2020
by
白秀江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update init-monitor.sh
parent
18f20dd5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
init-monitor.sh
init-monitor.sh
+7
-0
No files found.
init-monitor.sh
View file @
a81d3796
...
...
@@ -5,9 +5,16 @@ echo ${today} start init-monitor... >> /var/log/lwby-init-monitor.log
rpm
-i
http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum
install
-y
zabbix-agent zabbix-get
a
=
$(
grep
Server
=
127.0.0.1 /etc/zabbix/zabbix_agentd.conf
)
b
=
$(
grep
ServerActive
=
127.0.0.1 /etc/zabbix/zabbix_agentd.conf
)
sed
-i
"s/Server=127.0.0.1/Server=zabbix.ibreader.com/g"
/etc/zabbix/zabbix_agentd.conf
sed
-i
"s/ServerActive=127.0.0.1/ServerActive=zabbix.ibreader.com/g"
/etc/zabbix/zabbix_agentd.conf
if
[[
!
-n
$a
]]
||
[[
!
-n
$b
]]
;
then
service zabbix-agent restart
echo
${
today
}
service zabbix-agent restart...
>>
/var/log/lwby-init-monitor.log
fi
...
...
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