提交 4dc258e7 authored 作者: chenshiying's avatar chenshiying

[新增] 添加skywalking 客户端定期日志删除

上级 032ad74d
# 初始化脚本步骤
服务器(10.0.120.26 192.169.201.14) /home/soft/deploy 文件夹
```shell
pscp -r -h /home/soft/deploy/server/host_ip_ca.txt /root/BJCAROOT /root
```
host_ip_ca.txt
```
10.0.120.162 root
10.0.120.7 root
10.0.120.83 root
10.0.120.186 root
10.0.120.231 root
10.0.120.146 root
10.0.120.214 root
10.0.120.198 root
10.0.120.189 root
10.0.120.218 root
10.0.120.193 root
10.0.120.221 root
10.0.120.103 root
10.0.120.61 root
10.0.120.55 root
10.0.120.161 root
10.0.120.39 root
10.0.120.158 root
10.0.120.210 root
10.0.120.84 root
10.0.120.124 root
10.0.120.151 root
10.0.120.248 root
10.0.120.237 root
10.0.120.154 root
10.0.120.89 root
10.0.120.122 root
10.0.120.147 root
10.0.120.250 root
10.0.120.18 root
10.0.120.199 root
10.0.120.192 root
10.0.120.245 root
10.0.120.58 root
10.0.120.187 root
10.0.120.36 root
10.0.120.92 root
10.0.120.130 root
10.0.120.21 root
10.0.120.127 root
10.0.120.53 root
10.0.120.242 root
10.0.120.68 root
10.0.120.225 root
10.0.120.69 root
10.0.120.116 root
10.0.120.94 root
10.0.120.212 root
10.0.120.143 root
10.0.120.44 root
10.0.120.134 root
10.0.120.184 root
10.0.120.195 root
10.0.120.16 root
10.0.120.132 root
10.0.120.35 root
10.0.120.238 root
10.0.120.104 root
10.0.120.3 root
10.0.120.247 root
10.0.120.153 root
10.0.120.152 root
10.0.120.37 root
10.0.120.128 root
10.0.120.135 root
10.0.120.190 root
10.0.120.241 root
10.0.120.88 root
10.0.120.41 root
10.0.120.121 root
10.0.120.211 root
10.0.120.172 root
10.0.120.217 root
10.0.120.51 root
10.0.120.13 root
10.0.120.198 root
10.0.120.118 root
10.0.120.189 root
```
...@@ -70,9 +70,10 @@ ...@@ -70,9 +70,10 @@
<concurrentBuild>false</concurrentBuild> <concurrentBuild>false</concurrentBuild>
<builders> <builders>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>npm install node-sass -save --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ --unsafe-perm <command>
npm install node-sass -save --sass_binary_site=http://39.100.254.140:12010/repository/node-sass/ --unsafe-perm
npm install --unsafe-perm npm install --unsafe-perm --registry=http://39.100.254.140:12010/repository/npm-all/
npm run build:prod npm run build:prod
......
#!/bin/bash
#此脚本用于添加定时任务
\cp -rf /home/soft/logs/handle_sky_agent_log.conf /home/soft/logs/handle_sky_agent_log_bak.conf
crontab -l >> /home/soft/logs/handle_sky_agent_log_bak.conf
chattr -ia /var/spool/cron
crontab /home/soft/logs/handle_sky_agent_log_bak.conf
chattr +ia /var/spool/cron
```shell
pscp -r -h /home/soft/deploy/server/host_ip_ca.txt /home/soft/logs/add_crontab_sky_agent_log.sh /home/soft/logs
pscp -r -h /home/soft/deploy/server/host_ip_ca.txt /home/soft/logs/handle_sky_agent_log.conf /home/soft/logs
pscp -r -h /home/soft/deploy/server/host_ip_ca.txt /home/soft/logs/rm_sky_agent_log.sh /home/soft/logs
pssh -h /home/soft/deploy/server/host_ip_ca.txt -i bash /home/soft/logs/add_crontab_sky_agent_log.sh
```
host_ip_ca.txt
```
10.0.120.162 root
10.0.120.7 root
10.0.120.83 root
10.0.120.186 root
10.0.120.231 root
10.0.120.146 root
10.0.120.214 root
10.0.120.198 root
10.0.120.189 root
10.0.120.218 root
10.0.120.193 root
10.0.120.221 root
10.0.120.103 root
10.0.120.61 root
10.0.120.55 root
10.0.120.161 root
10.0.120.39 root
10.0.120.158 root
10.0.120.210 root
10.0.120.84 root
10.0.120.124 root
10.0.120.151 root
10.0.120.248 root
10.0.120.237 root
10.0.120.154 root
10.0.120.89 root
10.0.120.122 root
10.0.120.147 root
10.0.120.250 root
10.0.120.18 root
10.0.120.199 root
10.0.120.192 root
10.0.120.245 root
10.0.120.58 root
10.0.120.187 root
10.0.120.36 root
10.0.120.92 root
10.0.120.130 root
10.0.120.21 root
10.0.120.127 root
10.0.120.53 root
10.0.120.242 root
10.0.120.68 root
10.0.120.225 root
10.0.120.69 root
10.0.120.116 root
10.0.120.94 root
10.0.120.212 root
10.0.120.143 root
10.0.120.44 root
10.0.120.134 root
10.0.120.184 root
10.0.120.195 root
10.0.120.16 root
10.0.120.132 root
10.0.120.35 root
10.0.120.238 root
10.0.120.104 root
10.0.120.3 root
10.0.120.247 root
10.0.120.153 root
10.0.120.152 root
10.0.120.37 root
10.0.120.128 root
10.0.120.135 root
10.0.120.190 root
10.0.120.241 root
10.0.120.88 root
10.0.120.41 root
10.0.120.121 root
10.0.120.211 root
10.0.120.172 root
10.0.120.217 root
10.0.120.51 root
10.0.120.13 root
10.0.120.198 root
10.0.120.118 root
10.0.120.189 root
```
#!/bin/bash
rm -rf /usr/local/skywalking/agent/logs/skywalking-api.log.2*
...@@ -78,11 +78,12 @@ ...@@ -78,11 +78,12 @@
<concurrentBuild>false</concurrentBuild> <concurrentBuild>false</concurrentBuild>
<builders> <builders>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>npm install node-sass -save --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ --unsafe-perm <command>
npm install node-sass -save --sass_binary_site=http://39.100.254.140:12010/repository/node-sass/ --unsafe-perm
npm install --unsafe-perm npm install --unsafe-perm --registry=http://39.100.254.140:12010/repository/npm-all/
npm install cross-env --unsafe-perm npm install cross-env --unsafe-perm --registry=http://39.100.254.140:12010/repository/npm-all/
npm run build:prod npm run build:prod
zip -r dist.zip dist zip -r dist.zip dist
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论