Skip to main content

Hyperledger API

Overview​

Hyperledger Exporter is a tool exploiting the Hyperledger Fabric built-in APIs.

The Centreon Monitoring Connector Hyperledger API aims to collect relative metrics about channels and processing.

Pack assets​

Monitored objects​

  • Hyperledger private subnets / Channels

Monitored metrics​

Metric nameDescription
channel.ledger.transaction.countNumber of processed transaction
channel.gossip.membership.total.peers.known.countTotal known peers
channel.gossip.state.height.countCurrent ledger height
channel.ledger.blockchain.height.countHeight of the chain in blocks

Setup​

  1. Install the Centreon package on every Centreon poller expected to monitor Hyperledger API ressources:
yum install centreon-plugin-Blockchain-Hyperledger-Exporter
  1. On the Centreon Web interface, install the Hyperledger API Centreon Monitoring Connector on the Configuration > Monitoring Connector Manager page

Configuration​

Host configuration​

  • Log into Centreon and add a new Host through "Configuration > Hosts".
  • Fill the "Name", "Alias" & "IP Address / DNS" fields according to your Hyperledger node settings
  • Apply the Blockchain-Hyperledger-Exporter-custom template and configure all the mandatory Macros:
MandatoryNameDescription
xEXPORTERAPIPORTPort used by the Hyperledger Exporter (Default: '80')
xEXPORTERPROTOProtocol used by the Hyperledger Exporter (Default: 'http')
XEXPORTERAPIURLPATHURL to access the Hyperledger Exporter (Default: '/')
TIMEOUTTimeout (Default: '10')
EXTRAOPTIONSAny extra option you may want to add to every command_line (eg. a --verbose flag)

Troubleshooting​

UNKNOWN: Can't connect to ...​

This error message means that the Centreon Plugin couldn't successfully connect to the Hyperledger API. Check that no third party device (such as a firewall) is blocking the request.

UNKNOWN: Cannot decode json response​

This error message means that the Centreon Plugin couldn't successfully connect to the Hyperledger Exporter API. Check that no third party device (such as a firewall) is blocking the request. A proxy connection may also be necessary to connect to the API. This can be done by using this option in the command: --proxyurl='http://proxy.mycompany:8080'.