github.com/IBM-Blockchain/fabric-operator@v1.0.4/docs/prometheus.md (about) 1 # Integrate Prometheus 2 3 ## Pre request knowledge 4 - [Fabric Metric](https://hyperledger-fabric.readthedocs.io/en/release-2.2/metrics_reference.html) 5 - [Fabric Operations Service](https://hyperledger-fabric.readthedocs.io/en/release-2.2/operations_service.html?highlight=prometheus) 6 7 ## How to 8 - Setting for Operator CRDs 9 The `Operations Service` is enabled by default with prometheus for peer and orderer with fabric operator, if you want to change the config you need to override the default value via configoverride. For example: 10 ```yaml 11 spec: 12 configoverride: 13 metrics: 14 provider: prometheus 15 operations: 16 listenAddress: 0.0.0.0:9443 17 tls: 18 enabled: true 19 key: ${File} 20 cert: ${File} 21 clientAuthRequired: true 22 clientRootCas: ${Files} 23 ``` 24 - Know the network 25 Pre discussed via [PR here](https://github.com/hyperledger-labs/fabric-operator/pull/38), the reason we use this document as guidance for you to config fabric operator with prometheus is that we can't support all kinds of prometheus deployment/integration case. As [Fabric Operations Service](https://hyperledger-fabric.readthedocs.io/en/release-2.2/operations_service.html?highlight=prometheus), the way prometheus works as fabric peer or orderer enable operation service endpoint and config metric provider in config. Then prometheus should able to connect to peer or orderer to fetch the data. 26 27 - According to your network config prometheus 28  29 30 Hence there are three cases showed as sample above: 31 - Prometheus with fabric componment in same namespace. In this case, you are able to access pod port if possible. 32 - Prometheus with fabric componment in different namespace but same k8s cluster. In this case, you are able to access service port if possible. 33 - Prometheus out of k8s. In this case, you have to access ingress port.