Re: How can i monitor Hyperledger Fabric metrics?


Santiago Figueroa Lorenzo
 

Dear Tong,

I appreciate your response.

Following your recommendatios i enabled the operation for the variables in each node and right now it works fine (see first image).

Other points to consider:
  • To include HFB nodes, prometheus, alertmanager, nodeexporter, cadvisor, grafana, pushgateway, caddy in the same docker network
  • To add a hostname to each HFB node in order to map in prometheus
  • To use curl (e.g. curl localhost:HFBnode_port/logspec) to troubleshoot
  • To query via http://HFBnode_ip: HFBnode_port/metrics (see second image) to verify the metrics previously to synchronize with grafana.
Thanks again,

Santiago.

image.png

image.png

On Fri, May 22, 2020 at 4:00 PM email4tong@... <email4tong@...> wrote:
Santiago,
   You basically just need to enable the operation port for both peer and orderer node like this

For orderer node:
ORDERER_OPERATIONS_LISTENADDRESS=<<Nodename or Node IP>>:<<portNumber>>
ORDERER_OPERATIONS_TLS_ENABLED=false
ORDERER_METRICS_PROVIDER=prometheus

for peer:
CORE_OPERATIONS_LISTENADDRESS= <<Nodename or Node IP>>:<<portNumber>>
CORE_OPERATIONS_TLS_ENABLED=false
CORE_METRICS_PROVIDER=prometheus


If you enable the tls for operation, then you will have to deal with tls cert. I suggest that you leave it false for testing first, make sure it is working, then secure it.

If you use minifabric (https://github.com/litong01/minifabric) to setup a fabric network which takes less than 3 minutes if you have a clean docker env, you get a working fabric network and health and metrics service enabled automatically.

Cheers

Tong.

On Friday, May 22, 2020, 9:42:11 AM EDT, Santiago Figueroa Lorenzo <santiagofigueroalorenzo@...> wrote:


Hi fabric experts,

I have deployed an HFB network and then I ran the dockprom, a monitoring solution for Docker hosts and containers with Prometheus and Grafana. Right now i can mononitoring the status of HFB Nodes (see image), however i need to go deeper, i.e., i need to monitoring the prometheus metrics defined by HFB in the documentation (e.g., consensus_etcdraft_active_nodes, consensus_etcdraft_cluster_size and so on). 


Someone has experience setting up HFB metrics at prometheus.


Thanks,


Santiago.


image.png

Join {fabric@lists.hyperledger.org to automatically receive all group messages.