Hi.
I use ZABBIX with the following script:
[ceph@ceph08 ~]$ cat /etc/zabbix/external/ceph
#!/usr/bin/python
import sys
import os
import commands
import json
import datetime
import time
#Chech arguments. If count arguments equally 1, then false.
if len(sys.argv) == 1:
print "You will need arguments!";
exit;
def generate(data,type):
JSON="{\"data\":["
for js in range(len(splits)):
JSON+="{\"{#"+type+"}\":\""+splits[js]+"\"},";
return JSON[:-1]+"]}"
if sys.argv[1] == "osd":
if len(sys.argv)==2:
splits=commands.getoutput('df | grep osd | awk {\'print
$6\'}| sed \'s/[^0-9]//g\'| sed \':a;N;$!ba;s/\\n/,/g\'').split(",")
print generate(splits,"OSD")
else:
ID=sys.argv[2]
LEVEL=sys.argv[3]
PERF=sys.argv[4]
CACHEFILE="/tmp/zabbix.ceph.osd"+ID+".cache"
CACHETTL=5
TIME=int(round(float(datetime.datetime.now().strftime("%s"))))
######CACHE FOR OPTIMIZATION PERFORMANCE#####
if os.path.isfile(CACHEFILE):
CACHETIME=int(round(os.stat(CACHEFILE).st_mtime))
else:
CACHETIME=0
if TIME-CACHETIME>CACHETTL:
if os.system('sudo ceph --admin-daemon
/var/run/ceph/ceph-osd.'+ID+'.asok perfcounters_dump >'+CACHEFILE)>0: exit
json_data=open(CACHEFILE)
data = json.load(json_data)
json_data.close()
###### PARSING ########
if LEVEL in data:
if PERF in data[LEVEL]:
try:
key=data[LEVEL][PERF].has_key("sum")
print
(data[LEVEL][PERF]["sum"])/(data[LEVEL][PERF]["avgcount"])
except AttributeError:
print data[LEVEL][PERF]
and zabbix templates:
https://dl.dropboxusercontent.com/u/575018/zbx_export_templates.xml
2014-08-11 7:42 GMT+04:00 pragya jain <[email protected]>:
> please somebody reply my question.
>
>
> On Saturday, 9 August 2014 3:34 PM, pragya jain <[email protected]>
> wrote:
>
>
>
> hi all,
>
> can somebody suggest me some external monitoring tools which can monitor
> whether the processes in ceph, such as, heartbeating, data scrubbing,
> authentication, backfilling, recovering etc. are working properly or not.
>
> Regards
> Pragya Jain
>
> _______________________________________________
> ceph-users mailing list
> [email protected]
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
>
>
> _______________________________________________
> ceph-users mailing list
> [email protected]
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
>
--
С уважением, Фасихов Ирек Нургаязович
Моб.: +79229045757
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com