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
a71793c7
Commit
a71793c7
authored
Apr 03, 2019
by
胡凯旋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
7ff729e7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
34 deletions
+0
-34
main2.py
main2.py
+0
-34
No files found.
main2.py
deleted
100644 → 0
View file @
7ff729e7
# -*- coding:utf-8 -*-
import
time
import
json
import
random
import
math
import
yaml
from
prometheus_client
import
start_http_server
from
prometheus_client.core
import
REGISTRY
from
exporter
import
TencentExporter
,
AliyunExporter
class
RDSCollector
(
object
):
def
__init__
(
self
):
self
.
exporter_list
=
[
# TencentExporter(),
AliyunExporter
(),
]
def
collect
(
self
):
metrics
=
[]
for
exporter
in
self
.
exporter_list
:
metrics
.
extend
(
exporter
.
export_prometheus_data
())
for
m
in
metrics
:
yield
m
def
main
():
REGISTRY
.
register
(
RDSCollector
())
start_http_server
(
7086
)
while
True
:
time
.
sleep
(
1
)
if
__name__
==
'__main__'
:
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