Monitoring & Logging
Molnett provides built-in tools to help you monitor the health and performance of your services and access their logs.
Application Logs
You can easily access the logs generated by your running service containers using the molnctl CLI or through the Molnett Web UI.
Using molnctl:
-
View logs for a service (all containers):
molnctl logs <your-service-name> -
View logs for a specific container within a service:
molnctl logs <your-service-name> -c <your-container-name> -
Follow (tail) logs in real-time:
molnctl logs -f <your-service-name> -
Get previous logs (if the container restarted):
molnctl logs --previous <your-service-name> -
Show timestamps:
molnctl logs --timestamps <your-service-name> -
Limit the number of log lines:
molnctl logs --tail=100 <your-service-name> # Shows the last 100 lines
Logs are typically collected from the standard output (stdout) and standard error (stderr) streams of your containers.
Web UI: The Molnett Web UI provides a user-friendly interface to view and search logs for your deployed services and their individual containers. (Describe where to find this in the UI - e.g., Service Details page -> Logs tab).
Service Metrics
Molnett collects essential metrics for your services, allowing you to understand their performance and resource utilization.
Metrics typically include:
- CPU Usage
- Memory Usage
- Network Traffic (Ingress/Egress)
- Request Counts (for published ports)
- Restart Counts
Accessing Metrics:
-
Web UI: The Molnett Web UI usually displays these metrics on the Service Details page with charts and graphs. (Describe where to find this).
-
molnctl(Potentially): There might bemolnctlcommands to fetch current metrics, although graphical representation is often preferred via the UI.# Example: (Command to be confirmed based on molnctl capabilities)
# molnctl get metrics <your-service-name>
Health Checks (Future / To Be Detailed)
(This section should be expanded based on Molnett's health check capabilities.)
Molnett may support health checks to determine the status of your application instances:
- Liveness Probes: To check if a container is running. If a liveness probe fails, Molnett might restart the container.
- Readiness Probes: To check if a container is ready to accept traffic. If a readiness probe fails, Molnett might temporarily remove the instance from load balancing.
Configuration for health checks would typically be part of your molnett.yaml service definition.
# Example in molnett.yaml (syntax to be confirmed)
# containers:
# - name: web
# ...
# liveness_probe:
# http_get:
# path: /healthz
# port: 8080
# initial_delay_seconds: 15
# period_seconds: 20
# readiness_probe:
# http_get:
# path: /ready
# port: 8080
# initial_delay_seconds: 5
# period_seconds: 10
Alerting (Future / To Be Detailed)
(This section should describe any built-in alerting capabilities or integrations with external monitoring/alerting systems.)
- Can users set up alerts based on metrics (e.g., high CPU, high error rate)?
- Does Molnett integrate with tools like Prometheus, Grafana, Datadog, etc.?
Effective monitoring and logging are crucial for maintaining healthy applications. Molnett aims to provide the essential tools out-of-the-box, with potential for more advanced integrations.