Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
ops
Overview
Overview
Details
Activity
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangwei
ops
Commits
75043999
Commit
75043999
authored
Mar 16, 2017
by
zhangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改jason日志目录配置
注销action函数里fields行。
parent
33597d53
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
cms_check_log.py
cms_log/cms_log/cms_check_log.py
+3
-1
cms_log.py
cms_log/cms_log/cms_log.py
+1
-1
cms_config_check_log.json
cms_log/cms_log/config/cms_config_check_log.json
+1
-1
No files found.
cms_log/cms_log/cms_check_log.py
View file @
75043999
...
...
@@ -18,12 +18,14 @@ def action(app):
log_infos
=
config_infos
[
"log_info"
]
for
num
in
range
(
len
(
log_infos
)):
print
num
print
log_infos
[
num
][
"project_name"
]
if
log_infos
[
num
][
"project_name"
]
==
app
:
log_file
=
log_infos
[
num
][
"log_file"
]
check_string
=
log_infos
[
num
][
"check_string"
]
if
comm
.
exist_file
(
log_file
):
new_errors
=
comm
.
analysis_log
(
log_file
,
app
,
tmp_dir
,
check_string
)
fields
=
dimensions
.
replace
(
"$project"
,
project_name
)
#
fields = dimensions.replace("$project", project_name)
# cms_post.post(ali_uid, metric_name, new_errors[0], unit, fields)
print
(
new_errors
[
0
])
break
...
...
cms_log/cms_log/cms_log.py
View file @
75043999
...
...
@@ -27,7 +27,7 @@ def check_log(project_name):
curr_secs
=
times
.
currsecs
()
Log_Change_Time
=
curr_secs
-
log_secs
fields
=
dimensions
.
replace
(
"project"
,
project_name
)
#
fields = dimensions.replace("project",project_name)
print
(
Log_Change_Time
)
#cms_post.post(ali_uid, metric_name, Log_Change_Time, unit, fields)
#strlog = '|%s|%s|%d|%s|%s|' % (ali_uid, metric_name, Log_Change_Time, unit, fields)
...
...
cms_log/cms_log/config/cms_config_check_log.json
View file @
75043999
...
...
@@ -3,7 +3,7 @@
"metric_name"
:
"check_error_log"
,
"unit"
:
"Count"
,
"dimensions"
:
"error_log_alarm=$project-log-had-new-error-info"
,
"tmp_dir"
:
"/
opt/neo/script/cms_log
/tmp"
,
"tmp_dir"
:
"/
data/script/zabbix
/tmp"
,
"log_info"
:
[
{
"project_name"
:
"nginx"
,
...
...
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