Skip to content

Latest commit

 

History

History
190 lines (145 loc) · 4.33 KB

config_yaml.md

File metadata and controls

190 lines (145 loc) · 4.33 KB

Panoptes configuration with yaml


This document will show you how to write Panoptes configuration using YAML.

panoptes -config config.yaml

Configuration specs

The Panoptes configuration categories as follows at YAML configuration:

The below picture shows how the configurations link together.

panoptes config

Devices

The devices are defined as an array of devices including device information and the sensors / paths that we need to subscribe.

Example device configuration:

devices:
  - host: 192.168.55.3
    port: 50051
    username: admin
    password: admin
    sensors:
      - sensor1

You can see all available device config keys at configuration reference.

Sensors

The sensors are defined as a list of sensors. you can assign them to one or more devices under devices configuration.

sensors:
  sensor1:
    path: /interfaces/interface/state/counters
    mode: sample
    sampleInterval: 10
    service: juniper.gnmi
    output: console::stdout

You can see all available sensor config keys at configuration reference.

Producers

The producers are defined as a list of producers. you can assign them to one or more sensors under sensors configuration.

producers:
  kafka1:
    service: kafka
    config:
      brokers:
        - 192.168.55.10:9092
      topics:
        - interfaces
        - bgp

You can set environment variables for config keys with following format: PANOPTES_PRODUCER_{{producer_name}}_{{config_key}} For instance: PANOPTES_PRODUCER_KAFKA1_BROKERS=192.168.55.10:9092

You can see all available producer config keys at configuration reference.

Databases

The databases are defined as a list of databases. you can assign them to one or more sensors under sensors configuration.

databases:
  influxdb1:
    service: influxdb
    config:
      server: http://influxdb:8086
      bucket: mybucket

You can set environment variables for config keys with following format: PANOPTES_DATABASE_{{database_name}}_{{config_key}} For instance: PANOPTES_DATABASE_INFLUXDB1_SERVER=http://influxdb:8086

You can see all available sensor config keys at configuration reference.

Global

panoptes global config

Status

status:
  addr: "0.0.0.0:8081"

You can set environment variables for status with following format: PANOPTES_STATUS_{{key}} For instance: PANOPTES_STATUS_ADDR="0.0.0.0:8081"

You can see all available sensor config keys at configuration reference.

Discovery

discovery:
  service: "consul"
  config:
    address: "127.0.0.1:8500"

You can set environment variables for discovery with following formats: PANOPTES_DISCOVERY_SERVICE PANOPTES_DISCOVERY_{{service_name}}_{{config_keys}} For instance: PANOPTES_DISCOVERY_SERVICE=consul" PANOPTES_DISCOVERY_CONSUL_ADDRESS=127.0.0.1:8500

You can see all available sensor config keys at configuration reference.

Shards

shards:
  enabled: true
  numberOfNodes: 2
  InitializingShards: 

Logger

logger:
  level: debug
  outputPaths:
    - /var/log/panoptes
  errorOutputPaths:
    - stderr

Dialout

dialout:
  defaultOutput: console::stdout,
  services: 
  	cisco.mdt: 
      addr: 0.0.0.0:50055

Device Options

deviceOptions:
  tlsConfig:
    Enabled: false
  username: "admin"
  password: "admin"

Global

bufferSize: 20000
outputBufferSize: 10000

You can set environment variables for global parameters with following format: PANOPTES_{{global_keys}} For instance: PANOPTES_BUFFERSIZE=20000"

Watcher and vim editor

If you edit the yaml config with vim editor during running Panoptes, please add the following commands at your ~/.vimrc to prevent stopping Panoptes watcher.

set nobackup
set nowritebackup