Monitoring

Since room-assistant is a distributed system it quickly gets difficult to keep track of everything. To help we provide some tools for power users that wish to keep track of all their instance states without having to go to each one manually.

Metrics

room-assistant provides metrics in the Prometheus format on port 6415, path /metrics. This includes some default metrics about the general state of the application, as well as integration-specific metrics that you can explore. You can setup your Prometheus instance to scrape these endpoints like this:

scrape_configs:
  - job_name: 'room-assistant'
    metrics_path: '/metrics'
    scrape_interval: 30s
    static_configs:
      - targets:
      		- '<room-assistant-ip1>:6415'
      		- '<room-assistant-ip2>:6415'
1
2
3
4
5
6
7
8

Logging

Config Key: logger

If you want to capture the logs of all your instances in a single place you can configure additional log outputs, which will be used alongside the console output you are used to.

Elasticsearch/Kibana

Config Key: elasticsearch

room-assistant is capable of piping log output into an Elasticsearch cluster with the logstash format, which makes it searchable from Kibana. On NodeJS installations this logger requires an additional dependency, which you can install with npm install -g winston-elasticsearch.

NameTypeDefaultDescription
enabledBooleanfalseWhether room-assistant should send logs to Elasticsearch or not.
nodeStringhttp://localhost:9200The endpoint under which your Elasticsearch cluster is accessible.
authObjectObject containing either username + password or apiKey that should be used for authenticating against your Elasticsearch cluster (matches auth in the official client docsopen in new window).
indexPrefixStringroom-assistantThe prefix of the indices that will be created. The indices follow the naming format <indexPrefix>-<date>.
Example Config
logger:
  elasticsearch:
    enabled: true
    node: http://192.168.0.20:9200
1
2
3
4

Loki

Config Key: loki

You can send the room-assistant logs to an instance of Grafana Lokiopen in new window, which will allow you to collect and query logs easily from Grafanaopen in new window. On NodeJS installations this logger requires an additional dependency, which you can install with npm install -g winston-loki.

NameTypeDefaultDescription
enabledBooleanfalseWhether room-assistant should send logs to Loki or not.
hostStringhttp://localhost:3100The endpoint of your Loki instance.
Example Config
logger:
  loki:
    enabled: true
    host: http://192.168.0.20:3100
1
2
3
4