Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-9167

[fiware-stackoverflow] Fiware cygnus: no data have been persisted in mongo DB

    Details

      Description

      Created question in FIWARE Q/A platform on 21-07-2015 at 15:07
      Please, ANSWER this question AT https://stackoverflow.com/questions/31540631/fiware-cygnus-no-data-have-been-persisted-in-mongo-db

      Question:
      Fiware cygnus: no data have been persisted in mongo DB

      Description:
      I am trying to use cygnus with Mongo DB, but no data have been persisted in the data base.
      Here is the notification got in cygnus:

      15/07/21 14:48:01 INFO handlers.OrionRestHandler: Starting transaction (1437482681-118-0000000000)
      15/07/21 14:48:01 INFO handlers.OrionRestHandler: Received data ({ "subscriptionId" : "55a73819d0c457bb20b1d467", "originator" : "localhost", "contextResponses" : [ { "contextElement" : { "type" : "enocean", "isPattern" : "false", "id" : "enocean:myButtonA", "attributes" : [ { "name" : "ButtonValue", "type" : "", "value" : "ON", "metadatas" : [

      { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2015-07-20T21:29:56.509293Z" }

      ] } ] }, "statusCode" :

      { "code" : "200", "reasonPhrase" : "OK" }

      } ]})
      15/07/21 14:48:01 INFO handlers.OrionRestHandler: Event put in the channel (id=1454120446, ttl=10)

      Here is my agent configuration:

      cygnusagent.sources = http-source
      cygnusagent.sinks = OrionMongoSink
      cygnusagent.channels = mongo-channel

      #=============================================

      1. source configuration
      2. channel name where to write the notification events
        cygnusagent.sources.http-source.channels = mongo-channel
      3. source class, must not be changed
        cygnusagent.sources.http-source.type = org.apache.flume.source.http.HTTPSource
      4. listening port the Flume source will use for receiving incoming notifications
        cygnusagent.sources.http-source.port = 5050
      5. Flume handler that will parse the notifications, must not be changed
        cygnusagent.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.OrionRestHandler
      6. URL target
        cygnusagent.sources.http-source.handler.notification_target = /notify
      7. Default service (service semantic depends on the persistence sink)
        cygnusagent.sources.http-source.handler.default_service = def_serv
      8. Default service path (service path semantic depends on the persistence sink)
        cygnusagent.sources.http-source.handler.default_service_path = def_servpath
      9. Number of channel re-injection retries before a Flume event is definitely discarded (-1 means infinite retries)
        cygnusagent.sources.http-source.handler.events_ttl = 10
      10. Source interceptors, do not change
        cygnusagent.sources.http-source.interceptors = ts gi
      11. TimestampInterceptor, do not change
        cygnusagent.sources.http-source.interceptors.ts.type = timestamp
      12. GroupinInterceptor, do not change
        cygnusagent.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.GroupingInterceptor$Builder
      13. Grouping rules for the GroupingInterceptor, put the right absolute path to the file if necessary
      14. See the doc/design/interceptors document for more details
        cygnusagent.sources.http-source.interceptors.gi.grouping_rules_conf_file = /home/egm_demo/usr/fiware-cygnus/conf/grouping_rules.conf
      1. ============================================
      2. OrionMongoSink configuration
      3. sink class, must not be changed
        cygnusagent.sinks.mongo-sink.type = com.telefonica.iot.cygnus.sinks.OrionMongoSink
      4. channel name from where to read notification events
        cygnusagent.sinks.mongo-sink.channel = mongo-channel
      5. FQDN/IP:port where the MongoDB server runs (standalone case) or comma-separated list of FQDN/IP:port pairs where the MongoDB replica set members run
        cygnusagent.sinks.mongo-sink.mongo_hosts = 127.0.0.1:27017
      6. a valid user in the MongoDB server (or empty if authentication is not enabled in MongoDB)
        cygnusagent.sinks.mongo-sink.mongo_username =
      7. password for the user above (or empty if authentication is not enabled in MongoDB)
        cygnusagent.sinks.mongo-sink.mongo_password =
      8. prefix for the MongoDB databases
        #cygnusagent.sinks.mongo-sink.db_prefix = kura
      9. prefix pro the MongoDB collections
        #cygnusagent.sinks.mongo-sink.collection_prefix = button
      10. true is collection names are based on a hash, false for human redable collections
        cygnusagent.sinks.mongo-sink.should_hash = false
      1. ============================================
      2. mongo-channel configuration
      3. channel type (must not be changed)
        cygnusagent.channels.mongo-channel.type = memory
      4. capacity of the channel
        cygnusagent.channels.mongo-channel.capacity = 1000
      5. amount of bytes that can be sent per transaction
        cygnusagent.channels.mongo-channel.transactionCapacity = 100

      Here is my rule :

      {
      "grouping_rules": [

      { "id": 1, "fields": [ "button" ], "regex": ".*", "destination": "kura", "fiware_service_path": "/kuraspath" }

      ]
      }

      Any ideas of what I have missed? Thanks in advance for your help!

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-23 12:05|CREATED monitor | # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-23 12:05|CREATED monitor | # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-23 15:05|UPDATED status: transition Answer| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-23 15:05|UPDATED status: transition Answer| # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-23 18:05|UPDATED status: transition Answered| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-23 18:05|UPDATED status: transition Answered| # answers= 1, accepted answer= True

          People

          • Assignee:
            frb Francisco Romero
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: