Unknown macro: {style}

.ia-secondary-container

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

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

The Oracle NoSQL log appender is responsible for transferring logs from the Operations server to the Oracle NoSQL key/value storage. Logs are stored in the key/value storage using the following key path:
${applicationToken}/${logSchemaVersion}/${endpointKeyHash}/${uploadTimestamp}/${counter}

where:

  • applicationToken - matches the token of the current application
  • logSchemaVersion - the version of the avro log schema used to serialize log records
  • endpointKeyHash - a key hash identifying the endpoint which produced the log record
  • uploadTimestamp - a timestamp in milliseconds when logs were uploaded to the key/value storage
  • counter - the serial number of the record

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

Creating Oracle NoSQL log appender in Admin UI

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

Creating Oracle NoSQL log appender with REST API

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

Configuration

The Oracle NoSQL log appender configuration should match the following Avro schema.

{
   "namespace":"org.kaaproject.kaa.server.appenders.oraclenosql.config.gen",
   "type":"record",
   "name":"OracleNoSqlConfig",
   "fields":[
      {
         "name":"storeName",
         "displayName":"KVStore name",
         "default":"kvstore",
         "type":"string"
      },
      {
         "name":"kvStoreNodes",
         "displayName":"KVStore nodes",
         "minRowCount":1,
         "type":{
            "type":"array",
            "items":{
               "namespace":"org.kaaproject.kaa.server.appenders.oraclenosql.config.gen",
               "type":"record",
               "name":"KvStoreNode",
               "fields":[
                  {
                     "name":"host",
                     "displayName":"Host",
                     "weight":0.75,
                     "default":"localhost",
                     "type":"string"
                  },
                  {
                     "name":"port",
                     "displayName":"Port",
                     "weight":0.25,
                     "default":5000,
                     "type":"int"
                  }
               ]
            }
         }
      },
      {
         "name":"username",
         "displayName":"Username",
         "optional":true,
         "type":[
            "string",
            "null"
         ]
      },
      {
         "name":"walletDir",
         "displayName":"Oracle Wallet directory",
         "optional":true,
         "type":[
            "string",
            "null"
         ]
      },
      {
         "name":"pwdFile",
         "displayName":"Password store file",
         "optional":true,
         "type":[
            "string",
            "null"
         ]
      },
      {
         "name":"securityFile",
         "displayName":"Security properties file",
         "optional":true,
         "type":[
            "string",
            "null"
         ]
      },
      {
         "name":"transport",
         "displayName":"KVStore communication transport",
         "optional":true,
         "type":[
            "string",
            "null"
         ]
      },
      {
         "name":"ssl",
         "displayName":"Security transport",
         "optional":true,
         "type":[
            "string",
            "null"
         ]
      },
      {
         "name":"sslCipherSuites",
         "displayName":"SSL/TLS cipher suites",
         "optional":true,
         "type":[
            "string",
            "null"
         ]
      },
      {
         "name":"sslProtocols",
         "displayName":"SSL/TLS procotols",
         "optional":true,
         "type":[
            "string",
            "null"
         ]
      },
      {
         "name":"sslHostnameVerifier",
         "displayName":"SSL/TLS hostname verifier",
         "optional":true,
         "type":[
            "string",
            "null"
         ]
      },
      {
         "name":"sslTrustStore",
         "displayName":"Java truststore file location",
         "optional":true,
         "type":[
            "string",
            "null"
         ]
      },
      {
         "name":"sslTrustStoreType",
         "displayName":"Java truststore type",
         "optional":true,
         "type":[
            "string",
            "null"
         ]
      }
   ]
}

The following configuration example matches the previous schema.

{
   "storeName":"kvstore",
   "kvStoreNodes":[
      {
         "host":"localhost",
         "port":5000
      }
   ],
   "username":null,
   "walletDir":null,
   "pwdFile":null,
   "securityFile":null,
   "transport":null,
   "ssl":null,
   "sslCipherSuites":null,
   "sslProtocols":null,
   "sslHostnameVerifier":null,
   "sslTrustStore":null,
   "sslTrustStoreType":null
}

Administration

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

curl -v -S -u devuser:devuser123 -X POST -H 'Content-Type: application/json' -d'{"pluginClassName": "org.kaaproject.kaa.server.appenders.oraclenosql.appender.OracleNoSqlLogAppender", "applicationId": 119, "applicationToken": "91786338058670361194", "jsonConfiguration": "{\"storeName\":\"kvstore\",\"kvStoreNodes\":[{\"host\":\"localhost\",\"port\":5000}],\"username\":null,\"walletDir\":null,\"pwdFile\":null,\"securityFile\":null,\"transport\":null,\"ssl\":null,\"sslCipherSuites\":null,\"sslProtocols\":null,\"sslHostnameVerifier\":null,\"sslTrustStore\":null,\"sslTrustStoreType\":null}", "description": "Sample Oracle NoSQL appender", "headerStructure": [], "name": "Oracle NoSQL appender", "maxLogSchemaVersion": 2147483647, "minLogSchemaVersion": 1, "tenantId": "70"}' "http://localhost:8080/kaaAdmin/rest/api/logAppender" | python -mjson.tool

 Example result
{
    "appenderClassName": "org.kaaproject.kaa.server.appenders.oraclenosql.appender.OracleNoSqlLogAppender",
    "applicationId": "70",
    "applicationToken": "946558468095768",
    "configuration": "{\"storeName\":\"kvstore\",\"kvStoreNodes\":[{\"host\":\"localhost\",\"port\":5000}],\"username\":null,\"walletDir\":null,\"pwdFile\":null,\"securityFile\":null,\"transport\":null,\"ssl\":null,\"sslCipherSuites\":null,\"sslProtocols\":null,\"sslHostnameVerifier\":null,\"sslTrustStore\":null,\"sslTrustStoreType\":null}",
    "createdTime": 1417107992158,
    "createdUsername": "devuser",
    "description": "Sample Oracle NoSQL appender",
    "headerStructure": [],
    "id": "167",
    "name": "Oracle NoSQL appender",
    "maxLogSchemaVersion": 2147483647, 
    "minLogSchemaVersion": 1,
    "status": "REGISTERED",
    "tenantId": "10",
    "typeName": "Oracle NoSQL"
}

Copyright © 2014-2015, CyberVision, Inc.

  • No labels