Monitoring Rocket.Chat with Prometheus, Loki and Grafana: when your team needs it
This page covers how to add Prometheus for metrics, Loki for logs and Grafana for dashboards and alerts to a self-hosted Rocket.Chat workspace. If staff depend on the workspace for daily work, you need a way to see its health before users report a problem, and since Rocket.Chat 8.0 the in-app log viewer is no longer available, so logs must come from a system you run. Prometheus, Loki and Grafana are separate open-source projects with separate licenses: Prometheus is Apache-2.0, while Loki and Grafana are licensed under AGPLv3 following Grafana Labs' April 20, 2021 relicensing. Each one has its own storage, upgrade cycle and operating effort, so adopting the stack means adding three services to your run book, not one.
The first decision is scope. A small internal workspace may only need basic container health checks and retained logs for incident review, while a larger deployment, or one under a formal recordkeeping or availability commitment, needs metrics history, alert routing and a tested owner for each alert. Ask who will receive alerts, outside working hours included, and whether your existing monitoring platform already covers the host and MongoDB. Prometheus is not designed for per-request accuracy, so treat its numbers as operational signals rather than records. Also confirm the retention you need for logs, since Loki keeps logs indefinitely unless retention is enabled, which affects object storage cost.
How the metrics, log and dashboard parts connect
Metrics start at the Rocket.Chat metrics endpoint and are pulled by Prometheus, which hands firing alerts to Alertmanager. Logs leave the Rocket.Chat containers through a collector such as Grafana Alloy and are written to Loki, which keeps chunks and index in object storage. Grafana reads both stores, and users reach it only through an authenticating proxy. Check that the metrics and log endpoints sit inside the trust boundary and are not exposed directly.
Metrics and logs flow into separate stores that Grafana reads behind a proxy.
Which monitoring options fit your environment
Teams running Rocket.Chat from the official compose repository can add the monitoring compose file to the same project. The team provides a host with enough capacity for Prometheus and Grafana, persistent volumes for their data and, if logs are in scope, a Loki instance and a log shipper. Keeping everything in one compose project means the monitoring containers share the Rocket.Chat network without extra routing.
- Compose files: Combine the monitoring file with the Rocket.Chat files you already use, and confirm the file names against the release you pinned.
- Prometheus settings: Check the scrape target and metrics path the compose file configures, and set retention with Prometheus flags because the default is 15 days.
- Log levels: Set the Rocket.Chat logging level through the variable your release exposes (confirm its name), and keep verbose levels off in production unless you are troubleshooting.
- Grafana access: Replace the default admin credentials, restrict the published port and serve the dashboard through your TLS reverse proxy.
- Storage: Local Prometheus storage is not clustered or replicated, so back up its volume like any other single-node database.
Check the compose layout and scrape configuration against the exact Rocket.Chat release you pinned, because file layout and settings can change between releases.
Clusters that run Rocket.Chat with the official Helm chart usually manage monitoring through the chart's values and the platform's own tooling. The team provides a cluster with storage classes, a namespace for the monitoring components and permission to create scrape resources. On OpenShift, confirm with the platform team whether the chart's monitoring component applies or whether the platform's user workload monitoring should collect the metrics instead.
- Chart values: Set monitoring and log options in the values file, and pin the chart version to the one that matches your Rocket.Chat release.
- Scrape resources: Confirm whether the chart creates a ServiceMonitor for the Rocket.Chat service and which namespaces your Prometheus Operator watches.
- Prometheus retention and history: Local Prometheus storage does not replicate, so plan remote write to long-term storage if you need history beyond the local window.
- Log collection: Choose a cluster log shipper, such as Grafana Alloy, which Grafana supports for Loki, and set the Rocket.Chat log level through chart values.
- Loki topology: Select a Loki deployment mode that fits your log volume, and note that simple scalable mode is being deprecated and removed with Loki 4.0.
Confirm the chart version, the OpenShift version and the Rocket.Chat release together before you enable any monitoring option, since each one can change which resources the chart creates.
Many organizations already run Prometheus, Alertmanager and Grafana, or another monitoring product. In that case the work is to add Rocket.Chat scrape targets, alert rules, dashboards and log pipelines to the stack you have. The team provides access to the scrape endpoints, ownership of the dashboards and a route from alerts to the on-call process.
- Scrape targets: Add the Rocket.Chat metrics endpoints to your existing Prometheus configuration or service discovery, and confirm that the endpoint requires authentication.
- Alert routing: Point Prometheus at every Alertmanager instance so Rocket.Chat alerts reach your existing grouping and silences.
- Dashboards as code: Provision Grafana data sources and dashboards from YAML or JSON files loaded at startup so they survive upgrades.
- Log levels and shipping: Agree a Rocket.Chat log level your central logging platform can index at a reasonable cost, and confirm which shipper already runs on the hosts.
- Grafana login methods: SAML, team sync and SCIM are limited to Grafana Enterprise and Grafana Cloud, so confirm which authentication method your dashboard users need.
Confirm which Rocket.Chat release and metric names your alert rules assume, because rules written for one release may need changes after an upgrade.
Prometheus, Loki and Grafana options and when each fits
This table compares the main storage, deployment and licensing choices for the three observability components around self-hosted Rocket.Chat. Read each row as a decision: the default option, the alternative, and the conditions that point toward one or the other. The main takeaway is that defaults suit a small single-host setup, while longer retention, larger log volumes and high availability each add a deliberate design step.
| Decision | Default or smaller option | Option for scale or durability | When to choose the larger option |
|---|---|---|---|
| Prometheus storage | Local storage with the default 15-day retention | Remote write to external long-term storage | When you need metric history beyond the local retention window or must keep data off a single node |
| Prometheus retention limits | Retention set by time only | Retention set by time and size | When disk growth on the Prometheus host must be capped to protect other services |
| Loki deployment mode | Monolithic mode, a single binary, for up to about 20 GB of logs per day | Simple scalable mode with separate read, write and backend targets, approaching 1 TB per day | When daily log volume exceeds the monolithic range, after confirming the mode's deprecation before Loki 4.0 and planning a move to microservices |
| Loki object storage | An S3-compatible store such as MinIO or the local filesystem, which the docs say is not typically recommended for production | A recommended cloud object store such as Amazon S3, Google Cloud Storage or Azure Blob Storage | For production retention and durability requirements, or when your platform team already operates one of the recommended stores |
| Loki retention | Retention disabled by default, so logs are kept indefinitely | retention_enabled set with global, per-tenant or per-stream rules, each at least 24 hours | Whenever logs contain personal data or your recordkeeping policy sets a maximum age |
| Grafana configuration database | SQLite 3, the default, which the docs say does not scale for production | MySQL 8.0 or later, or PostgreSQL 12 or later | For any production or high-availability deployment, with two or more active-active Grafana servers behind a load balancer |
| Grafana edition | Grafana OSS with LDAP, generic OAuth, Entra ID, Okta, GitHub, GitLab, Google OAuth, auth proxy or JWT | Grafana Enterprise, with SAML, team sync, active sync and SCIM provisioning | When your identity policy requires SAML or SCIM, or group sync must be automated; confirm licensing terms with Grafana Labs |
Setting up the monitoring stack in order
This sequence builds the monitoring stack in dependency order, so each component is verified before the next one depends on it. The result is Rocket.Chat metrics in Prometheus, alerts routed through a clustered Alertmanager, logs in Loki and dashboards in Grafana that you have tested and can restore.
Confirm the Rocket.Chat metrics endpoint and log level
Start with the application, because every other component depends on its output. Confirm that your Rocket.Chat deployment exposes its metrics endpoint and that the log level is set to a value suited to production, not debug, so logs stay useful without flooding storage. Check the relevant settings in your deployment files and in workspace administration, and confirm the endpoint is reachable only from your Prometheus network, since Grafana's hardening guidance also recommends requiring authentication on metrics endpoints. The check is a successful request to the metrics endpoint from the monitoring host, returning metric lines rather than an error or login page.
Deploy Prometheus with scrape targets and retention
Deploy Prometheus next and define scrape jobs for the Rocket.Chat endpoint, the MongoDB exporter if you use one, and the host or container metrics you need. Set retention explicitly, either by time or by size, because the default is 15 days and you should choose a value that matches your storage and recordkeeping needs. Plan for local storage to be a single node: it is not clustered or replicated, so treat its volume like any other single-node database and keep configuration in version control. The check is that each target shows as up on the Prometheus targets page and that a basic PromQL query returns recent samples.
Deploy Alertmanager in cluster mode
Deploy Alertmanager as a cluster of at least two instances using its cluster flags, so alert grouping, inhibition and silences survive the loss of one node. Point every Prometheus instance at each Alertmanager address directly rather than through a load balancer, as the Alertmanager documentation advises. Define receivers for the channels your on-call team actually uses, and confirm that alerts from Prometheus reach the cluster. The check is a test alert that appears on every Alertmanager instance and is delivered to a receiver once, not duplicated.
Deploy Loki with authentication and retention enabled
Deploy Loki with auth_enabled set to true so that every tenant is identified by the X-Scope-OrgID header, and place an authenticating reverse proxy in front of it, because Loki has no built-in authentication layer. Choose a deployment mode that matches your expected log volume, and use object storage for chunks and the index, with a production-grade store such as S3, Google Cloud Storage or Azure Blob Storage. Enable retention explicitly, since it is disabled by default and logs are otherwise kept indefinitely. The check is a query through the proxy that succeeds with a valid tenant header and is refused without one.
Ship Rocket.Chat logs with a collector and tenant headers
Deploy a log collector on the Rocket.Chat hosts or containers. Grafana Alloy is Grafana's supported shipper for Loki, and Loki also accepts Fluent Bit, Fluentd and the Docker logging driver. Configure the collector to send each log stream to Loki with the X-Scope-OrgID header that matches your tenant and to label streams by container or service, not by high-cardinality values such as user IDs. Confirm that the collector's credentials and the proxy path work end to end. The check is a LogQL query in a terminal that returns recent Rocket.Chat lines for the expected tenant and returns nothing for an unknown tenant.
Deploy Grafana with a production database and provisioned sources
Deploy Grafana with MySQL 8.0 or later or PostgreSQL 12 or later as its configuration database, since SQLite is not suitable for production or high availability. Define the Prometheus and Loki data sources, along with dashboards and alerting resources, as provisioning files loaded at startup, and keep those files in version control so the configuration can be rebuilt. Apply the security hardening recommendations for cookies, the Content Security Policy and version disclosure. Also confirm which authentication methods your edition supports, because SAML and SCIM are limited to Grafana Enterprise and Grafana Cloud. The check is that Grafana restarts cleanly with the provisioned data sources present and that both Prometheus and Loki queries return data from a dashboard.
Test alert delivery and restore dashboards
Test the stack as an operator would. Trigger a controlled alert condition on a non-production Rocket.Chat or a test rule, confirm that it reaches your receiver through the clustered Alertmanager, then stop one Alertmanager node and repeat the test. Next, remove a test dashboard or data source from a scratch Grafana instance and rebuild it from the provisioning files and database backup to confirm the restore path works. Record the results, the Grafana and Loki versions in use and the retention settings, so the next upgrade has a baseline. The check is an alert delivered once during the node failure test and a restored dashboard that renders the same panels as before.
Why the in-app log viewer is gone since 8.0 and what replaces it
From Rocket.Chat 8.0 onward, operators can no longer read server logs inside the admin interface, so log review moves to an external stack. Plan that stack before you upgrade or go live, because the team that handled log questions in the admin console will now need access to a separate system. Confirm the exact removal and any replacement settings against the Rocket.Chat 8.0 release notes for your version, since the admin console behavior is the authoritative reference here. In this design, the application writes logs to standard output or files, a shipper such as Grafana Alloy collects them, and Loki stores and serves them for queries in Grafana.
Four decisions shape that pipeline. First, choose log levels per environment: production usually needs enough detail to investigate failed logins, integration errors and upgrade problems without generating noise that inflates storage. Confirm the log level setting names in your release notes before you write them into a Compose file or Helm values. Second, set retention in Loki on purpose. Retention is disabled by default in Loki, so logs are kept indefinitely until you enable it, and the retention rule you choose should match what your security and recordkeeping owners have asked for. Third, decide who may query logs. Loki has no built-in authentication layer, so an authenticating reverse proxy such as OAuth2 Proxy or Pomerium must sit in front of it, and Grafana roles should restrict log access to the operators who need it.
The fourth decision is what the logs must never contain. Rocket.Chat messages, file names and user-supplied text can reveal personal or regulated data, and once shipped to Loki they are copied, indexed and retained under your retention rule. Ask your Rocket.Chat contact which events include message content, keep verbose debug output out of production, and test a sample of shipped log lines before go-live. Document these choices in the same runbook as your backup and access procedures, so an auditor or a new operator can see how log review works without asking the original builder.
Securing the metrics and log endpoints
Metrics and logs describe how your Rocket.Chat workspace behaves, and they can expose more than most teams expect. The cards below cover each component in the monitoring stack, from the Rocket.Chat metrics endpoint through Prometheus, Loki and Grafana, and the checks to run before the stack reaches users.
Authenticate the Rocket.Chat metrics endpoint
Rocket.Chat exposes metrics that Prometheus scrapes, so the endpoint needs a deliberate access decision rather than a default. Decide whether Prometheus reaches it over a private network or presents a credential, and confirm that the same endpoint is not reachable through the public reverse proxy. Test from outside your network that the path returns nothing useful to an anonymous caller before you add dashboards.
Limit Prometheus network scope
The Prometheus security model assumes the network and the people who can reach the server are trusted, so the server itself does not add a login layer for its web interface and API. Keep Prometheus on a private subnet, restrict who can query it, and confirm that Alertmanager and any remote write targets sit on the same controlled path. Local storage is not clustered or replicated, so treat the host as a single-node database.
Prometheus security modelFront Loki with an authenticating proxy
Loki has no built-in authentication layer, so any client that reaches its port can read or write logs. Place an authenticating reverse proxy such as nginx, HAProxy, OAuth2 Proxy or Pomerium in front of it, and decide how the proxy maps users to tenants. If you enable multi-tenancy, the X-Scope-OrgID header identifies the tenant on each request, so the proxy should set or validate that header rather than trust the client.
Loki authentication docsHarden Grafana's web layer
Grafana's hardening guidance covers cookies, page security and information exposure. Set secure and SameSite cookies, define a Content Security Policy and Trusted Types, hide the version from unauthenticated users, and require authentication on the metrics endpoint. Also verify domain checks against DNS rebinding. Run these settings on the Grafana host and confirm them with a browser-level review after each upgrade.
Grafana hardening docsMatch Grafana login options to your edition
Grafana's authentication options depend on the edition. LDAP, generic OAuth, Entra ID, Okta, GitHub, GitLab, Google OAuth, auth proxy and JWT work in all editions, while SAML, team sync, active sync and SCIM provisioning require Grafana Enterprise or Grafana Cloud. If your Rocket.Chat identity runs on SAML and your monitoring access must follow the same groups, confirm which edition you need before the design is fixed.
Grafana authentication docsKeep secrets and personal data out of logs
Logs and scrape configurations often carry tokens, connection strings and user identifiers. Review what Rocket.Chat and your log shipper write at each log level, and keep credentials in files or a secrets store instead of inline YAML. Set Loki retention deliberately, because retention is disabled by default and logs are kept until you enable it. Ask your compliance owner which fields can be stored and for how long before the first ingest.
Questions buyers ask about monitoring Rocket.Chat
What drives the cost of monitoring Rocket.Chat with Prometheus, Loki and Grafana?
The software is open source, so the cost comes from infrastructure, storage, implementation and the people who run it. Prometheus has no paid enterprise edition, and the Grafana and Loki components are also available as open-source builds. Recurring costs include the compute and disks for Prometheus, the object storage that holds Loki chunks and index, the database behind Grafana, and staff time for patching and alert tuning. Costs go up with the number of metrics and log lines retained, how long data is kept, and how many environments are monitored. Ask any partner for a quote that separates one-time setup from these recurring components, and state the retention period you expect so the storage estimate reflects it.
How long does a monitoring setup for Rocket.Chat take?
Duration depends on how many components are in scope and how much of the environment already exists. A basic Prometheus scrape of Rocket.Chat is a small task compared with a full stack that adds Loki log storage, Grafana authentication, dashboards and alert routing. The main drivers are whether object storage and a Grafana database are already available, whether your identity provider must be connected to Grafana, how many alert receivers and dashboards are needed, and how many deployment targets (Docker Compose, OpenShift or Kubernetes) must be covered. No duration figure is supplied for this work, so ask the vendor or partner to state the timeline in the written scope before work starts.
What does the work need from our own team?
Your team provides the environment, decisions and access the stack depends on. That includes a place to run Prometheus with enough disk for your retention setting, object storage for Loki if you want logs kept beyond a single host, a database for Grafana if you plan high availability, DNS and TLS for the Grafana and Loki endpoints, and an identity source for Grafana sign-in. Your team also needs to decide which alerts page people, who receives them, and how long metrics and logs are retained. Someone must own the Rocket.Chat metrics endpoint configuration, since it requires authentication and network access from Prometheus. Confirm these responsibilities in writing before work starts.
Can our team set up Rocket.Chat monitoring without a partner?
Yes, a team with Linux, container and Prometheus experience can build a basic setup using the official documentation for each component. The skills that are harder to staff are PromQL alert design, Loki label strategy, object storage sizing, and secure exposure of Grafana and Loki behind an authenticating reverse proxy, because Loki has no built-in authentication layer. Consider a partner if you need the setup reviewed by your security and compliance teams, if there is no one to own upgrades, or if the stack must be documented as evidence. Whichever path you choose, decide who owns the on-call response to alerts before the first alert rule goes live.
When do Grafana Cloud or Grafana Enterprise change the picture?
Grafana Cloud or Grafana Enterprise changes the picture when your requirements exceed what the open-source builds provide. The Grafana authentication docs state that SAML, team sync, active sync and SCIM provisioning are available only in Grafana Enterprise and Grafana Cloud, so an organization that needs SAML or SCIM for access control will need to evaluate those options. Grafana Cloud pricing starts with a free tier, a Pro tier with a 19 US dollar monthly platform fee plus usage, and an Enterprise tier with a minimum commitment of 25,000 US dollars per year, according to the Grafana pricing page. Hosting in Grafana Cloud also moves the data outside your infrastructure, which may conflict with data residency rules. Check the current pricing page before deciding.
How do upgrades of Prometheus, Loki, Grafana and Rocket.Chat affect the stack?
Each component has its own release cycle, so upgrades must be planned per component and tested together. Prometheus minor releases start every 6 weeks and generally stop receiving bug fixes after those 6 weeks, while LTS releases receive bug fixes for one year; the current LTS line is 3.13, supported until July 31, 2027. Grafana plans major releases once a year, minor releases every other month and patch releases at least monthly, with each minor release supported for 9 months. Loki's simple scalable deployment mode is being deprecated and will be removed in Loki 4.0, so check your deployment mode before planning. Rocket.Chat standard releases are supported for 6 months and LTS releases for 12 months, and unsupported versions may lose compatibility with the official mobile and desktop clients. Keep a single upgrade calendar and test dashboards and alert rules after each change.
How the monitoring work is scoped and handed over
DeployOpen deploys the monitoring stack for Rocket.Chat inside your own infrastructure, whether that is your cloud accounts, your data centers or an air-gapped network. The work is normally a fixed-scope engagement with the scope, deliverables and timeline agreed in writing before anything is built. For this topic, the written scope should name each component in the stack, where it runs, which Rocket.Chat instances and MongoDB members it watches, and who owns each piece once the engagement closes. Ask for that list in the quote, because it is the fastest way to see whether two proposals cover the same work.
The deliverables should be concrete artifacts your team can review and keep. Expect the dashboards, the alert rules and their routing to on-call channels, the retention settings for Prometheus and Loki with the reasoning behind each value, and the access model that decides who can read metrics and logs, including how Grafana users are authenticated and how Loki tenants are separated. Expect runbooks for the operating team that cover what each alert means, the first checks to run and when to escalate. Confirm with the provider whether the Grafana configuration will be delivered as provisioning files so it can be reviewed in version control, and whether the runbooks will be tested with your staff during handover.
Monitoring does not stop at handover, because Rocket.Chat, Prometheus, Loki and Grafana each receive their own upgrades. DeployOpen offers ongoing upgrades and retainers for teams that prefer not to absorb that work alone, and the scope of any retainer should be written down with the same care as the initial build. Ask whether the retainer covers version checks against the release notes, testing of dashboards and alert rules after an upgrade, and response expectations, and confirm each of these in writing rather than assuming them.
How DeployOpen delivers Rocket.Chat monitoring
DeployOpen scopes Rocket.Chat monitoring as part of the platform it runs in your infrastructure, so metrics, logs, dashboards and alerts are planned alongside the deployment rather than added afterward. Each engagement is fixed-scope, with deliverables and timelines agreed in writing before work starts.
How we scope
- Confirm which Rocket.Chat deployment method, MongoDB topology and instance count the monitoring must cover before any build work.
- Agree which metrics, log sources and retention periods the written scope includes, and which Grafana access model your teams need.
- Record the storage choices for Prometheus and Loki, including whether object storage and a long-term metrics backend are in or out of scope.
How we build
- Deploy Prometheus, Alertmanager, Loki and Grafana in your environment, using the monitoring compose file or Helm chart that matches your Rocket.Chat install.
- Configure Prometheus scrape targets, log levels and Grafana provisioning files so dashboards and data sources are defined as code.
- Test alert rules against real failure conditions, such as a stopped instance or a lagging database, and check that Alertmanager notifications reach the right teams.
How we hand over
- Deliver written configuration, dashboard and alert documentation, with the version of each component recorded for future upgrades.
- Walk your platform and security teams through access controls, log retention settings and the reverse proxy in front of Loki.
- Provide a verification checklist so your team can confirm scrape health, alert routing and log ingestion after each change.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, covering Prometheus, Loki and Grafana version changes.
- Review component end-of-life dates and patch releases on a schedule agreed in the written scope, so monitoring keeps pace with Rocket.Chat upgrades.
- Re-test authentication, dashboard access and alert delivery after infrastructure changes, and document each result for your records.

