How Linux Systems Monitor Mogilefs Storage Nodes

  

In Linux systems, the Mogilefs Distributed Storage System can be used to store images and automatically back up images. Generally, Mogilefs are stable, but if there is a problem, the picture will not display properly. This article will teach you how to monitor Mogilefs storage nodes in Linux systems.

nagios custom script monitoring can be realized specify the content, try to write a script to monitor the mogilefs system with python, when there is a storage node can not communicate alarm, so feel free to dispose of. Guaranteed trouble-free operation of the picture system:

#!/usr/bin/env python # Check mogilefs mogilestorage # Blog http://www.xitongzhijia.net/# 2011-12-13 import os import sys

hosts = ['192.168.1.51', '192.168.1.52', '192.168.1.53', '192.168.1.54', '192.168.1.55'] check="mogadm --trackers=localhost: 6001 check | Grep mogile | Awk '{print $5}'" values ​​= os.popen(check).read() i=0 for v in values.split('\ '): if v != 'OK' and v !='' : print "Critical mogielstorage%d,IP:%s is not ok" %(i+1,hosts[i]) sys.exit(1) break; i=i+1 print "OK every one is ok" Sys.exit(0)

The above is how Linux uses Nagios scripts to monitor Mogilefs. As long as Mogilefs is monitored, it will not be able to find problems after problems occur, but to kill the errors in the bud. Among them.

Copyright © Windows knowledge All Rights Reserved