whithen / fastdfs-exporter Goto Github PK
View Code? Open in Web Editor NEWfastdfs监控
fastdfs监控
grafana的dashboard
higher version of fastdfs's fdfs_monitor output:
[root@hlet-fastdfs-tracker01 src]# fdfs_monitor /etc/fdfs/client.conf
server_count=1, server_index=0
tracker server is 10.1.99.34:22122
group count: 1
Group 1:
group name = group1
disk total space = 18,251,534 MB
disk free space = 18,251,251 MB
trunk free space = 0 MB
storage server count = 2
active server count = 2
storage server port = 23000
storage HTTP port = 8888
store path count = 1
subdir count per path = 256
current write server index = 1
current trunk file id = 0
need add a line before get the storage size:
result = (re.sub(r'[^\w\s]', '', str(value)))
def formatValue(value):
try:
# 匹配join time = 2019-04-04 17:00:49
result = re.findall("(\d+-\d+-\d+ \d+:\d+:\d+)", value)
if result:
timeStamp = time.mktime(datetime.datetime.strptime(result[0], "%Y-%m-%d %H:%M:%S").timetuple())
value = float(timeStamp)
# 匹配total storage = 1007799 MB
result = (re.sub(r'[^\w\s]', '', str(value))) # 添加这一行
result = re.findall("(\d+) MB$", result)
if result: value = float(result[0]) * 1024 * 1024
# 匹配ip_addr = 10.42.3.244 ACTIVE
result = re.findall("(\d+.\d+.\d+.\d+).+[A-Z]+", value)
if result:
if "ACTIVE" in value:
value = 1
else:
value = 0
# result = re.findall("(\d+)", value)
# if result: value = float(value)
except:
raise
finally:
return value
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.