The Prometheus plugin has only one dependency, microhttpd. To be able to compile it make sure that it is in your LD_LIBRARY_PATH
.
Currently, to compile and install the prometheus plugin one has the run the following command.
With that, the plugin will be correctly placed in the usual folder.
Due to the way in which Prometheus works, this plugin is designed to be used by the EAR Daemons, although the EARDBD should not have many issues running it too.
To have it running in the daemons, simply add it to the corresponding line in the configuration file.
This will expose the metrics on each node on a small HTTP server. You can access them normally through a browser at port 9011 (fixed for now).
In Prometheus, simply add the nodes you want to scrape in prometheus.yml with the port 9011. Make sure that the scrape interval is equal or shorter than the insertion time (NodeDaemonPowermonFreq
in the ear.conf file) since metrics only stay in the page for that duration.