github.com/cloud-foundations/dominator@v0.0.0-20221004181915-6e4fee580046/cmd/mdbd/README.md (about)

     1  # mdbd
     2  The *mdbd* daemon is a companion to the *[dominator](../dominator/README.md)*
     3  daemon. It queries one or more Machine DataBases and provides the *dominator*
     4  with information about machines (*subs*) to manage.
     5  
     6  The daemon writes processed and filtered MDB data to a local file
     7  (`/var/lib/Dominator/mdb` by default) which the *dominator* can consume. Thus,
     8  both *mdbd* and *dominator* must run on the same machine.
     9  
    10  ## Startup
    11  *Mdbd* is started at boot time, usually by one of the provided
    12  [init scripts](../../init.d/). The *mdbd* process is baby-sat by the init
    13  script; if the process dies the init script will re-start it. It may be stopped
    14  with the command:
    15  
    16  ```
    17  service mdbd stop
    18  ```
    19  
    20  which also kills the baby-sitting init script. It may be started with the
    21  comand:
    22  
    23  ```
    24  service mdbd start
    25  ```
    26  
    27  There are many command-line flags which may change the behaviour of *mdbd*
    28  but many have defaults which should be adequate for most deployments. Built-in
    29  help is available with the command:
    30  
    31  ```
    32  mdbd -h
    33  ```
    34  
    35  ### Key configuration parameters
    36  The init script reads configuration parameters from the `/etc/default/mdbd`
    37  file. The following is the minimum likely set of parameters that will need to be
    38  configured.
    39  
    40  The `USERNAME` variable specifies the username that *mdbd* should run as.
    41  Since *mdbd* does not need root privileges, the init script runs
    42  *mdbd* as this user.
    43  
    44  ### Configuration files
    45  *Mdbd* requires "upstream" data sources. A configuration file
    46  (`/var/lib/Dominator/mdb.sources.list` by default) specifies the data sources
    47  to be collected from.
    48  
    49  To directly query AWS for all running instances in a region, you would use the
    50  following configuration file. It will query all the accounts for which you have
    51  API keys in your `~/.aws/credentials` file:
    52  
    53  ```
    54  aws-local
    55  ```
    56  
    57  An example configuration file which specifies to collect MDB data from CIS
    58  (Cloud Intelligence Service, being developed at Symantec) for the `us-east-1`
    59  cluster is:
    60  
    61  ```
    62  cis http://cis.us-east-1.aws.net:9200/aws/aws_nodes/_search?size=10000
    63  ```
    64  
    65  Since CIS is built on top of Elastic Search, the configuration is primarily an
    66  Elastic Search query.