<commit_before>
# Ganglia Collector

Ganglia Collector is the server which recieve data collected on each
host by the Ganglia Monitor agents.

    module.exports = []

## Configure

*   `rrdcached_user` (object|string)
    The Unix RRDtool login name or a user object (see Mecano User documentation).
*   `rrdcached_group` (object|string)
    The Unix Hue group name or a group object (see Mecano Group documentation).

Example:

```json
{
  "ryba": {
    "ganglia": {
      "rrdcached_user": {
        "name": "rrdcached", "system": true, "gid": "rrdcached", "shell": false
        "comment": "RRDtool User", "home": "/usr/lib/rrdcached"
      }
      "rrdcached_group": {
        "name": "Hue", "system": true
      }
    }
  }
}
```

    module.exports.configure = (ctx) ->
      require('masson/core/iptables').configure ctx
      ctx.config.ryba ?= {}
      ctx.config.ryba.ganglia ?= {}
      ctx.config.ryba.ganglia.rrdcached_user = name: ctx.config.ryba.rrdcached_user if typeof ctx.config.ryba.rrdcached_user is 'string'
      ctx.config.ryba.ganglia.rrdcached_user ?= {}
      ctx.config.ryba.ganglia.rrdcached_user.name ?= 'rrdcached'
      ctx.config.ryba.ganglia.rrdcached_user.system ?= true
      ctx.config.ryba.ganglia.rrdcached_user.gid = 'rrdcached'
      ctx.config.ryba.ganglia.rrdcached_user.shell = false
      ctx.config.ryba.ganglia.rrdcached_user.comment ?= 'RRDtool User'
      ctx.config.ryba.ganglia.rrdcached_user.home = '/var/rrdtool/rrdcached'
      # Group
      ctx.config.ryba.ganglia.rrdcached_group = name: ctx.config.ryba.rrdcached_group if typeof ctx.config.ryba.rrdcached_group is 'string'
      ctx.config.ryba.ganglia.rrdcached_group ?= {}
      ctx.config.ryba.ganglia.rrdcached_group.name ?= 'rrdcached'
      ctx.config.ryba.ganglia.rrdcached_group.system ?= true
      # Ports
      ctx.config.ryba.ganglia.collector_port ?= 8649
      ctx.config.ryba.ganglia.slaves_port ?= 8660
      ctx.config.ryba.ganglia.hbase_region_port ?= ctx.config.ryba.ganglia.slaves_port
      ctx.config.ryba.ganglia.nn_port ?= 8661
      ctx.config.ryba.ganglia.jt_port ?= 8662
      ctx.config.ryba.ganglia.hm_port ?= 8663
      ctx.config.ryba.ganglia.hbase_master_port ?= ctx.config.ryba.ganglia.hm_port
      ctx.config.ryba.ganglia.rm_port ?= 8664
      ctx.config.ryba.ganglia.jhs_port ?= 8666
      ctx.config.ryba.ganglia.spark_port ?= 8667

## Commands

    # module.exports.push command: 'backup', modules: 'ryba/ganglia/collector/backup'<commit_msg>simplify and standardize configure func<commit_after>
# Ganglia Collector

Ganglia Collector is the server which recieve data collected on each
host by the Ganglia Monitor agents.

    module.exports = []

## Configure

*   `rrdcached_user` (object|string)
    The Unix RRDtool login name or a user object (see Mecano User documentation).
*   `rrdcached_group` (object|string)
    The Unix Hue group name or a group object (see Mecano Group documentation).

Example:

```json
{
  "ryba": {
    "ganglia": {
      "rrdcached_user": {
        "name": "rrdcached", "system": true, "gid": "rrdcached", "shell": false
        "comment": "RRDtool User", "home": "/usr/lib/rrdcached"
      }
      "rrdcached_group": {
        "name": "Hue", "system": true
      }
    }
  }
}
```

    module.exports.configure = (ctx) ->
      require('masson/core/iptables').configure ctx
      ctx.config.ryba ?= {}
      ganglia = ctx.config.ryba.ganglia ?= {}
      ganglia.rrdcached_user = name: ctx.config.ryba.rrdcached_user if typeof ctx.config.ryba.rrdcached_user is 'string'
      ganglia.rrdcached_user ?= {}
      ganglia.rrdcached_user.name ?= 'rrdcached'
      ganglia.rrdcached_user.system ?= true
      ganglia.rrdcached_user.gid = 'rrdcached'
      ganglia.rrdcached_user.shell = false
      ganglia.rrdcached_user.comment ?= 'RRDtool User'
      ganglia.rrdcached_user.home = '/var/rrdtool/rrdcached'
      # Group
      ganglia.rrdcached_group = name: ctx.config.ryba.rrdcached_group if typeof ctx.config.ryba.rrdcached_group is 'string'
      ganglia.rrdcached_group ?= {}
      ganglia.rrdcached_group.name ?= 'rrdcached'
      ganglia.rrdcached_group.system ?= true
      # Ports
      ganglia.collector_port ?= 8649
      ganglia.slaves_port ?= 8660
      ganglia.hbase_region_port ?= ctx.config.ryba.ganglia.slaves_port
      ganglia.nn_port ?= 8661
      ganglia.jt_port ?= 8662
      ganglia.hm_port ?= 8663
      ganglia.hbase_master_port ?= ctx.config.ryba.ganglia.hm_port
      ganglia.rm_port ?= 8664
      ganglia.jhs_port ?= 8666
      ganglia.spark_port ?= 8667

## Commands

    # module.exports.push command: 'backup', modules: 'ryba/ganglia/collector/backup'
{'fraction_non_alphanumeric': 0.12430227565478746, 'fraction_numerical': 0.013739802490339202, 'mean_word_length': 3.148708815672306, 'pattern_counts': {'":': 24, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5265682', 'n_tokens_mistral': 1733, 'n_tokens_neox': 1657, 'n_words': 292}