Skip to content

Latest commit

 

History

History
105 lines (82 loc) · 5.6 KB

configuration.md

File metadata and controls

105 lines (82 loc) · 5.6 KB

Configuration

The configuration must be set in a YAML file located in conf/ folder from the current working directory. The file name is config.yaml. The full path is conf/config.yaml.

You can see a full example in the Example section

Main structure

Key Type Required Default Description
log LogConfiguration No None Log configurations
server ServerConfiguration No None Server configurations
internalServer ServerConfiguration No None Internal Server configurations
cachet CachetConfiguration Yes None CachetHQ configurations
targets [TargetConfiguration] Yes None Targets configurations

LogConfiguration

Key Type Required Default Description
level String No info Log level
format String No json Log format (available values are: json or text)

ServerConfiguration

Key Type Required Default Description
listenAddr String No "" Listen Address
port Integer No 8080 Listening Port

CachetConfiguration

Key Type Required Default Description
url String Yes None CachetHQ URL
apiKey String Yes None CachetHQ API Key

TargetConfiguration

Key Type Required Default Description
component TargetComponentConfiguration Yes None Target component for CachetHQ
alerts [TargetAlertConfiguration] Yes None Target prometheus alert filter
incident TargetIncidentConfiguration No None Target incident for CachetHQ

TargetComponentConfiguration

Key Type Required Default Description
name String Yes None CachetHQ Component name
groupName String No None CachetHQ Component group name in which the component is. Only required if your component is part of a group, and can be useful when you have multiple components with the same name into multiple groups.
status String Yes None CachetHQ Component status (OPERATIONAL, PERFORMANCE_ISSUES, PARTIAL_OUTAGE or MAJOR_OUTAGE)

TargetAlertConfiguration

Key Type Required Default Description
name String Required if labels are not present "" Prometheus Alert name
labels Map[String]String Required if name isn't present None Prometheus Alert labels

TargetIncidentConfiguration

Key Type Required Default Description
name String Yes None CachetHQ Incident name
content String Yes None CachetHQ Incident content
status String Yes None CachetHQ Incident status (INVESTIGATING, IDENTIFIED, WATCHING or FIXED)
public Bool No false CachetHQ Incident must be public

Example

# Log configuration
log:
  # Log level
  level: info
  # Log format
  format: text

# Server configurations
# server:
#   listenAddr: ""
#   port: 8080

# Cachet configuration
cachet:
  url: http://localhost
  apiKey: API_KEY

# Targets
targets:
  - component:
      name: COMPONENT_NAME
      status: PARTIAL_OUTAGE
    alerts:
      - name: SERVICE_OFFLINE
    # - labels:
    #     label1: value1
    # incident:
    #   name: ""
    #   content: ""
    #   status: INVESTIGATING
    #   public: true