ConfigurationΒΆ

All Moira microservices can use a single configuration file in YAML format.

By default, microservices will look for /etc/moira/config.yml, but you can change this location in system configuration files (pass your path as a command-line parameter) and in moira-alert/worker/moira/config.py

redis:
  host: localhost
  port: 6379
  dbid: 0 # redis database index http://redis.io/commands/select

# Base log directory for Moira API and Moira Checker microservices
worker:
  log_dir: /var/log/moira/worker
  log_level: info

api:
  port: 8081
  listen: '127.0.0.1'

# Moira microservices will send their own metrics to this address
graphite:
  uri: graphite-relay:2003
  prefix: DevOps.moira
  interval: 30

checker:
  # every trigger will be periodically checked even if no metrics arrive
  nodata_check_interval: 60 # (in seconds)
  # every trigger will be checked at most once every interval
  check_interval: 5 # (in seconds)
  # metrics older than this age will be purged after use
  metrics_ttl: 3600 # (in seconds)
  # if master is not receiving any metrics it stops nodata checks after that interval
  stop_checking_interval: 30 # (in seconds)

# Moira frontend uri, used to make links in notification templates
front:
  uri: http://localhost

notifier:
  log_file: /var/log/moira/notifier/notifier.log
  log_level: debug
  log_color: true
  sender_timeout: 10s0ms
  resending_timeout: 24:00 # 24 hours
  senders:
    - type: mail
      smtp_host: smtp.gmail.com
      smtp_port: 587
      smtp_pass: # no auth if empty
      smtp_user: # be used mail_from value if empty
      mail_from: moira@gmail.com
      insecure_tls: false
    - type: slack
      api_token: # place your token here
    - type: pushover
      api_token: # place your token here
    - type: script
      name: MyCustomScript
      exec: /bin/bash /opt/myscripts/gsm-modem.sh
    - type: twilio sms
      api_asid: # place your api sid
      api_authtoken: # place your api secret
      api_fromphone: # place phone
    - type: twilio voice
      api_asid: # place your api sid
      api_authtoken: # place your api secret
      api_fromphone: # place phone
      voiceurl: # place your voice url
    - type: telegram
      api_token: # place your token here


cache:
  log_file: /var/log/moira/cache/cache.log
  listen: ':2003' # listen on all interfaces
  retention-config: /etc/moira/cache/storage-schemas.conf
  pid: /var/run/moira-cache.pid

storage-schemas.conf is graphite carbon configuration file.

Example:

[default_1min_for_1day]
pattern = .*
retentions = 1m:1d