Skip to content

Latest commit

 

History

History
226 lines (197 loc) · 5.08 KB

data-aggregation-config.md

File metadata and controls

226 lines (197 loc) · 5.08 KB
description
How to setup data sources for Daggy

Data Aggregation Config

Supported formats

Daggy supports yaml and json formats. In yaml repeated nodes can be grouped by yaml standard.

Data sources template

{% tabs %} {% tab title="YAML" %}

sources:
    host1:
        #....
    host2:
        #....
    #....
    hostN:
        #....
    

{% endtab %}

{% tab title="JSON" %}

{
    "host1" : {
    },
    "host2" : {
    },
    "hostN" : {
    }
}

{% endtab %} {% endtabs %}

Each config conatins map of hosts. Host (data source) parameters is next:

Parameter Type Description Is Requiered
type string

Type of connection to host. Daggy supportes local and ssh host connection types

Yes
commands array Array of commands for simultaneous launch Yes
connection map Connection parameters Required for ssh type
host string Host address (ip or url) Required for ssh type
reconnect boolean true, if need reconnect connection No
## Data sources types

Daggy supportes local and ssh host connection types.

Local type

{% tabs %} {% tab title="YAML" %}

sources:
  localhost:
    type: local
    commands:
      - name: pingYa
        command: ping ya.ru
        extension: log
        restart: false

{% endtab %}

{% tab title="JSON" %}

  {
  "localhost": {
    "type": "local",
    "commands": {
        "pingYa": {
            "command": "ping ya.ru",
            "extension": "log"
        }
    }
  }
  }

{% endtab %} {% endtabs %}

SSH type

{% tabs %} {% tab title="YAML" %}

remotehost:
    type: ssh
    host: 192.168.1.9
    restart: false
    connection:
      login: muxa
      key: /home/muxa/.ssh/id_rsa
    commands:
      - name: pingYa
        command: ping ya.ru
        extension: log

{% endtab %}

{% tab title="JSON" %}

{
    "localhost": {
        "type": "ssh",
        "host": "192.169.1.9",
        "restart": false,
        "connection": {
            "login": "muxa",
            "key": "/home/muxa/.ssh/id_rsa"
        },
        "commands": {
            "pingYa": {
                "command": "ping ya.ru",
                "extension": "log"
            }
        }
    }
}

{% endtab %} {% endtabs %}

SSH type additional parameters

  • host - remote host ip address or url
  • connection - map of ssh connection parameters. Includes next parameters
Connection Parameter Type Description Default value
login string ssh connection login daggy user
password string ssh connection password. If empty, daggy will expect key field
key string path to private key for ssh connection ~/.ssh/id_rsa
port integer ssh connection port 22
timeout integer limit to establish ssh connection, in seconds 2
ignoreProxy boolean if true, daggy will ignore default proxy true
strictConformance boolean if true, enable ssh protocol compatibility true
forceKill integer kill signal for remote process before connection close. If -1 no signals will be send 15 (SIGTERM)

Commands

{% tabs %} {% tab title="YAML" %}

commands:
      - name: pingYa
        command: ping ya.ru
        extension: log
        restart: false

{% endtab %}

{% tab title="JSON" %}

"commands": {
            "pingYa": {
                "command": "ping ya.ru",
                "extension": "log"
            }
        }

{% endtab %} {% endtabs %}

Each command must contain:

  • name - unique within host command identifier, using in command output file name template.
  • command - shell script
  • extension - extension for command output file
  • restart - restart command if it finished