Unknown macro: {style}


Unknown macro: { margin}
Unknown macro: {div}
Kaa releases
Unknown macro: {div}

Page tree
Skip to end of metadata
Go to start of metadata

The Couchbase log appender is responsible for transferring logs from the Operations server to the Couchbase storage. Logs are stored in document storage.

Each log document consists of the following fields:  


  • id - randomly generated UUID string
  • header - includes log's metainformation: endpointKeyHash(a key hash identifying the endpoint which produced the log record), applicationToken(matches the token of the current application), headerVersion(currently is 1), timestamp(a timestamp in milliseconds when logs were uploaded to the key/value storage)
  • event - log body (log item, received from a client)

Values are stored as serialized Generic Records using record wrapper avro schema.

Creating Couchbase log appender in Admin UI

The easiest way to create a Couchbase log appender for your application is by using Admin UI.

Creating Couchbase log appender with REST API

It is also possible to create a Couchbase log appender for your application by using REST API. The following example illustrates how to provision the Couchbase log appender via REST API.


The Couchbase log appender configuration should match the following Avro schema.

 Click here to expand...
    "namespace": "org.kaaproject.kaa.server.appenders.couchbase.config.gen",
    "type": "record",
    "name": "CouchbaseConfig",
               "name": "couchbaseServerUris", 
               "displayName": "Couchbase servers list",
               "minRowCount": 1,
               "type": {
                  "type": "array",
                  "items": {
                      "namespace": "org.kaaproject.kaa.server.appenders.couchbase.config.gen",
                      "type": "record",
                      "name": "CouchbaseServerUri",
                      "fields": [
                          {"name": "serverUri", "displayName": "Server URI", "by_default": "", "type": "string"}
        {"name": "bucket", "displayName": "Couchbase bucket name", "by_default": "default", "type": "string"},
        {"name": "password", "displayName": "Couchbase bucket password", "inputType": "password", "type": ["string", "null"]}


The following configuration example matches the previous schema.

  "couchbaseServerUris" : [ {
    "serverUri" : ""
  } ],
  "bucket" : "default",
  "password" : null


The following REST API call example illustrates how to create a new Couchbase log appender.

curl -v -S -u devuser:devuser123 -X POST -H 


 Setup Couchbase and run sample application

1.Download and install Couchbase by following link:  http://developer.couchbase.com/documentation/server/current/getting-started/installing.html#installing

2. After successful installation open http://%your_host_name%:8091/.

You should see something like that:


3.Go to Admin UI and add a Couchbase log appender to Data Collection demo application.

4.Define a url and bucket which will be used for receiving logs.

5.Go to sandbox and download binary for testing appender:

Use instruction from sandbox to run demo application.

6. Open http://%your_host_name%:8091 and choose : Data Buckets -> default -> Documents : 

If you launched Data collection demo application before it, you would be see logs from kaa server. This should seems like that:



Copyright © 2014-2015, CyberVision, Inc.

  • No labels