Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm-mysql-exporter
Project
Project
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
system
gm-mysql-exporter
Commits
65788d54
Commit
65788d54
authored
Oct 30, 2018
by
胡凯旋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix float /
parent
1b86c0f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
main.py
main.py
+4
-5
No files found.
main.py
View file @
65788d54
...
...
@@ -46,9 +46,9 @@ class RDSCollector(object):
for
point
in
datapoints
:
rds_name
=
rds_instances
[
point
[
'instanceId'
]]
avg_metric_family
.
add_metric
([
rds_name
],
point
[
'Average'
]
/
100
,
point
[
'timestamp'
]
/
1000
)
max_metric_family
.
add_metric
([
rds_name
],
point
[
'Maximum'
]
/
100
,
point
[
'timestamp'
]
/
1000
)
avg_metric_family
.
add_metric
([
rds_name
],
point
[
'Average'
]
/
100
.0
,
point
[
'timestamp'
]
/
1000
)
max_metric_family
.
add_metric
([
rds_name
],
point
[
'Maximum'
]
/
100
.0
,
point
[
'timestamp'
]
/
1000
)
metrics
.
extend
([
avg_metric_family
,
max_metric_family
])
for
m
in
metrics
:
...
...
@@ -61,4 +61,4 @@ def main():
time
.
sleep
(
1
)
if
__name__
==
'__main__'
:
main
()
\ No newline at end of file
main
()
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