Appendix B. Collecting data from source systems with Grails
This appendix covers
- The architecture of the Grails component in measurementor
- Structure of the domain objects
- Using Quartz as a job scheduler
This appendix goes into the architecture and code of the Grails data collector in the measurementor project. This will be a good chapter to read if you want to fork, contribute to, extend, or customize the project to better fit into your environment.
This appendix picks up where appendix A left off. In appendix A we talked about using Elasticsearch (EC) to index your data and Kibana to generate graphs and do ad hoc analysis of your data. Combined, these platforms are very powerful and provide a lot of out-of-the-box functionality. But there are two things missing from EC and Kibana alone:
- You need to get data to index. You could set up Logstash for that, but it would be a lot of work and you’d need access to all of your source system’s installations.
- EC is for searching data. If you want to calculate metrics based on combinations of data, you’ll have to do that somewhere else.
To accommodate for the shortcomings there’s a small Grails-based component to measurementor that reaches out to various systems via their REST-based APIs, gets the data we’ve been talking about in this book, and sends it to EC for indexing. This is custom code, so you can tweak it do whatever you want, including setting up additional dashboards with metrics you calculate yourself.