Skip to content

Files

Latest commit

44a3065 · Feb 2, 2021

History

History
59 lines (41 loc) · 3.67 KB

CONFIG-OPERATIONS-SERVICE-HLEXPLORER.md

File metadata and controls

59 lines (41 loc) · 3.67 KB

Configure Operations Service to Hyperledger Explorer

The Operations Service

  • The peer and the orderer host an HTTP server that offers a RESTful “operations” API. This API is unrelated to the Fabric network services and is intended to be used by operators, not administrators or “users” of the network, more at Operations Service

Sample configuration for 'fabric-samples/first-network'

  • Modify /fabric-samples/first-network/base/docker-compose-base.yaml file to add operations service per each orderrer, and each peer, and restart your fabric network in order to have operations service brodcasting metrics, and other info. Please visit provided docker-compose-base-sample.yaml sample.

  • Orderer sample configuration

    - ORDERER_OPERATIONS_LISTENADDRESS=0.0.0.0:8443  # operation RESTful API
    - ORDERER_METRICS_PROVIDER=prometheus  # prometheus will pull metrics from orderer via /metrics RESTful API
    
  • Peer sample configuration

    - CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:9443  # operation RESTful API
    - CORE_METRICS_PROVIDER=prometheus  # prometheus will pull metrics from orderer via /metrics RESTful API
    
**Note that each peer, and orderer need to have a different port, and it available  within your environment.

Setup Prometheus server locally, and configure

Setup Grafana

Setup Prometheus server and Grafana with using Docker

  • In our sample docker-compose file, we've already done configuration for Prometheus server and Grafana provisioning. If you want to custmise the configuration, please see the following files and the official instructions ( Prometheus / Grafana ).

    - app/platform/fabric/artifacts/operations/balance-transfer/prometheus.yml
    - app/platform/fabric/artifacts/operations/balance-transfer/balance-transfer-grafana-dashboard.json
    - app/platform/fabric/artifacts/operations/grafana_conf/provisioning/dashboards/dashboard.yaml
    - app/platform/fabric/artifacts/operations/grafana_conf/provisioning/datasources/datasource.yaml
    
  • After bring up services with the following command, open http://localhost:3000 in a browser. You'll be able to see the provisioned Balance Transfer, Quick Summary dashboard.

    $ cd blockchain-explorer
    $ docker-compose down -v  # Just for cleaning up the old persist docker volumes
    $ docker-compose up -d