![]() |
![]() |
Subject: | Monitor/ZenPack for CEPH? |
Author: | [Not Specified] |
Posted: | 2014-06-13 15:01 |
Has anyone done anything with Ceph storage for zenpack or monitoring templates of any kind From everything I can tell, it's all about ceph -s command and parsing the output. It uses json or xml and I'm not fluent in setting up parsing in Zenoss, so I'm looking for anyone that may have some insight to this.
Thanks!
Subject: | Can you give some example |
Author: | Chris Hubbard |
Posted: | 2014-06-13 15:09 |
Can you give some example output from the ceph -s command
I have a JSON parser that takes simple JSON and makes it parsable for bash scripts. Then you could use an external command wrapper and parse the output in Nagios style..
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
Subject: | example |
Author: | [Not Specified] |
Posted: | 2014-06-13 16:06 |
sudo ceph -s -f json
{"health":{"summary":[],"timechecks":{"epoch":378,"round":8590,"round_status":"finished","mons":[{"name":"server","skew":"0.000000","latency":"0.000000","health":"HEALTH_OK"},{"name":"server2","skew":"-0.000000","latency":"0.001118","health":"HEALTH_OK"},{"name":"server3","skew":"-0.000000","latency":"0.001112","health":"HEALTH_OK"}]},"health":{"health_services":[{"mons":[{"name":"server","kb_total":559023808,"kb_used":1932676,"kb_avail":528701292,"avail_percent":94,"last_updated":"2014-06-13 13:55:23.871746","health":"HEALTH_OK"},{"name":"server2","kb_total":559023808,"kb_used":849444,"kb_avail":529784524,"avail_percent":94,"last_updated":"2014-06-13 13:56:20.958761","health":"HEALTH_OK"},{"name":"server3","kb_total":559023808,"kb_used":837984,"kb_avail":529795984,"avail_percent":94,"last_updated":"2014-06-13 13:55:24.522550","health":"HEALTH_OK"}]}]},"overall_status":"HEALTH_OK","detail":[]},"fsid":"b4a2e007-b2da-4f84-91ce-101a955e01ae","election_epoch":378,"quorum":[0,1,2],"quorum_names":["server","server2","server3"],"monmap":{"epoch":8,"fsid":"b4a2e007-b2da-4f84-91ce-101a955e01ae","modified":"2014-01-29 10:46:50.311925","created":"0.000000","mons":[{"rank":0,"name":"server","addr":"10.208.48.32:6789\/0"},{"rank":1,"name":"server2","addr":"10.208.48.33:6789\/0"},{"rank":2,"name":"server3","addr":"10.208.48.34:6789\/0"}]},"osdmap":{"osdmap":{"epoch":1867,"num_osds":72,"num_up_osds":72,"num_in_osds":"72","full":"false","nearfull":"false"}},"pgmap":{"pgs_by_state":[{"state_name":"active+clean","count":2568}],"version":129453,"num_pgs":2568,"data_bytes":802,"bytes_used":22994964480,"bytes_avail":143932904484864,"bytes_total":143955899449344},"mdsmap":{"epoch":1,"up":0,"in":0,"max":1,"by_rank":[]}}
[s-zenoss@server ~]$ sudo ceph -s
cluster b4a2e007-b2da-4f84-91ce-101a955e01ae
health HEALTH_OK
monmap e8: 3 mons at {server=10.208.48.32:6789/0,server2=10.208.48.33:6789/0,server3=10.208.48.34:6789/0}, election epoch 378, quorum 0,1,2 server,server2,server3
osdmap e1867: 72 osds: 72 up, 72 in
pgmap v129453: 2568 pgs: 2568 active+clean; 802 bytes data, 21929 MB used, 130 TB / 130 TB avail
mdsmap e1: 0/0/1 up
Subject: | Json Parser |
Author: | Jan Garaj |
Posted: | 2014-06-14 10:59 |
You can transform "ceph -s -f json" output to standard Zenoss json format and then you can use Zenoss JSON parser http://wiki.zenoss.org/JSON_Parser. Data related to cluster can be easy parsed. Problem can be with data for nodes. You can hardcode node metrics in cluster template or standard solution is that you create another "component" template for cluster components - nodes.
Devops Monitoring Expert advice:
Dockerize/automate/monitor all the things.
DevOps stack:
Docker / Kubernetes / Mesos / Zabbix / Zenoss / Grafana / Puppet / Ansible / Vagrant / Terraform /
Elasticsearch
Subject: | json parser |
Author: | [Not Specified] |
Posted: | 2014-06-16 15:58 |
I haven't actually found the json parser, nor how to implement the parser into my environment. I only have auto, cacti, nagios, and the other zenoss specific parsers in my drop down menu. If i had the json parser, it seems easy enough to format it with json and have it parse it out very easily. I just can't seem to find the parser or how to implement it into zenoss.
Subject: | Json Parser |
Author: | Jan Garaj |
Posted: | 2014-06-16 16:26 |
Yep, JSON parser is only in newer versions. Anyway you can download and use it:
http://dev.zenoss.org/trac/browser/tags/zenoss-4.2.5/Products/ZenRRD/par... - just download/upload and restart Zenoss.
Devops Monitoring Expert advice:
Dockerize/automate/monitor all the things.
DevOps stack:
Docker / Kubernetes / Mesos / Zabbix / Zenoss / Grafana / Puppet / Ansible / Vagrant / Terraform /
Elasticsearch
< |
Previous Cannot install ZenPack |
Next Monitor/ZenPack for CEPH? |
> |