zerodha/mii-lama

Installation Process

Closed this issue · 5 comments

If you can put the following related to installation and Monitoring.

  1. Step by step installation (do we need to install Prometheus separately?)
  2. Example shows one exchange, how can we configure more?
  3. Once we implement then how to monitor that which information is going to exchange? how to debug on error? how to check request and response?

Thanks in advance

knadh commented

Hi @shethpriyank.

  1. The installation instructions are listed step-by-step here: https://github.com/zerodha/mii-lama#installation

You can follow the steps as-is and all required programs will be auto-installed (Docker containers). You needn't install anything separately.

2, 3) @mr-karan ?

2 - For now only NSE has shared their API Gateway integration and hence we've integrated it. Once we have additional API Gateways to integrate, the same can be made available in future.

3 - By checking App logs. On successful request the app logs will show a success message of pushing metrics. If there's an error, the same is logged along with the HTTP Status code and the error payload received in response.

Hi Karan, I have completed setup and trying to access but I am getting error in lama logs as given below. Though I have supplied my credentials for lama API. Pl help me in this case. do i need to pass the password as is or decrypt and supply?

mii-lama | time=2023-06-29T07:02:36.506Z level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/main.go:51 msg="failed to init nse manager" component=mii-lama error="failed to login to NSE API: HTTP request returned status code 403"

mii-lama | time=2023-06-29T12:57:37.694Z level=DEBUG source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:101 msg="fetched metrics" component=mii-lama host=192.168.11.15:9182 data="{CPU:0 Mem:0 Disk:0 Uptime:0}"
mii-lama | time=2023-06-29T12:57:37.696Z level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:73 msg="Failed to query Prometheus" component=mii-lama host=172.168.10.90:9100 metric=disk error="response contains no result data"
mii-lama | time=2023-06-29T12:57:37.697Z level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:84 msg="Failed to query Prometheus" component=mii-lama host=172.168.10.90:9100 metric=uptime error="response contains no result data"
mii-lama | time=2023-06-29T12:57:37.698Z level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:51 msg="Failed to query Prometheus" component=mii-lama host=172.168.10.90:9100 metric=cpu error="response contains no result data"
mii-lama | time=2023-06-29T12:57:37.700Z level=ERROR source=/home/runner/work/mii-lama/mii-lama/cmd/app.go:62 msg="Failed to query Prometheus" component=mii-lama host=172.168.10.90:9100 metric=memory error="response contains no result data"

do i need to pass the password

Yes, you need to provide the password as-is.

response contains no result data

For prometheus, please ensure that node-exporter is running on target hosts on port 9100 and you're able to collect data from it in Prometheus.