nanoservice-ts comes with Grafana dashboards and Prometheus metrics out of the box. This allows you to monitor your services and get insights into their performance.


Setup

To see the metrics and logs, just follow the steps below:

git clone https://github.com/deskree-inc/nanoservice-ts.git nanoservice-ts
cd nanoservice-ts
cd infra

# Using the default settings without Logs
docker compose up -d
By default the logs are turned off to enable them, follow the steps below
  1. Navigate to the infra directory
  2. Open the docker-compose.yml file
  3. Uncomment the logging section (displat below)
  4. Save the file and run docker compose up -d
    # logging: # Log to Loki. Enable this to see logs in Grafana.
    #   driver: loki
    #   options:
    #     loki-url: "http://localhost:3100/loki/api/v1/push"
    #     loki-retries: 5
    #     loki-batch-size: 400

Grafana

You can access the Grafana dashboard by navigating to http://localhost:3000 and logging in with the default credentials:

username: admin
password: admin

The system will prompt you to change the password after logging in for the first time.

In Grafana, you will be able to see the default dashboard that displays information about workflow execuction including the number of successful and failed reqiests, CPU & Memory usage, and more.

If you enabled logs, you can also see the logs in Grafana under the Explore section.

For more information on how to use Grafana, please refer to the official documentation or check out Tutorials.