[Fiware-tech-help] [FIWARE-JIRA] (HELP-12976) IMPACT: Orion subscriptions to notify cygnus

Help-Desk jira-help-desk at jira.fiware.org
Thu Nov 23 11:11:00 CET 2017



>From FIWARE JIRA - Main Help Desk ----

-------------------------------------------------------------------------------
Comments:


FW External User - Today 11:10 AM
------------------
Comment by jsalvachua at dit.upm.es : 

Hello Peter,

Ok, thanks for solving it yourself.

Joaquin 

> El 23 nov 2017, a las 14:45, Peter Theill <peter at familiohq.com> escribió:
> 
> Hi Fiware Tech,
> 
> I figured out the notification issue so close this ticket, please. 
> 
> On Thu, Nov 23, 2017 at 1:59 PM Peter Theill <peter at familiohq.com <mailto:peter at familiohq.com>> wrote:
> I have an issue sending notifications from subscriptions I've setup on Orion Object Broker.
> 
> I've setup Orion and I'm able to create entities, etc without issues.
> 
> Now I'm trying to setup a subscription so new entities will be send to cygnus.
> 
> In Orion I have an entity called "Event" and I'm trying to setup a subscription so every time a new "Event" entity is created it will notify a (cygnus ngsi) endpoint.
> 
> This is my CURL for creating a subscription
> 
> curl -X "POST" "http://staging.familiohq.com:1026/v2/subscriptions <http://staging.familiohq.com:1026/v2/subscriptions>" \
>      -H 'Accept: application/json' \
>      -H 'Fiware-ServicePath: /' \
>      -H 'Content-Type: application/json' \
>      -d $'{
>   "throttling": 1,
>   "subject": {
>     "entities": [
>       {
>         "type": "Event",
>         "idPattern": ".*"
>       }
>     ]
>   },
>   "description": "Event subscription",
>   "notification": {
>     "attrs": [
>       "location"
>     ],
>     "http": {
>       "url": "http://staging.familiohq.com <http://staging.familiohq.com/>:5050/notify"
>     },
>     "attrsformat": "legacy"
>   },
>   "expires": "2020-12-31T00:00:00.000Z"
> }'
> 
> I'm using the v2 subscriptions endpoint with the "attrsformat" = "legacy" instead of using v1 subscribeContext. Both should work according to the documentation (at http://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/installation_and_administration_guide/ngsiv2_support/index.html <http://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/installation_and_administration_guide/ngsiv2_support/index.html>).
> 
> The Orion and Cygnus docker containers seems to run as expected but when I'm listing my subscriptions using
> 
> curl "http://staging.familiohq.com:1026/v2/subscriptions <http://staging.familiohq.com:1026/v2/subscriptions>" \
>      -H 'Fiware-ServicePath: /'
> 
> I'm getting a failed status
> 
> [  {
>     "id": "5a16bb600cd43be01f108c0c",
>     "description": "Event subscription",
>     "expires": "2020-12-31T00:00:00.00Z",
>     "status": "failed",
>     "subject": {
>       "entities": [
>         {
>           "idPattern": ".*",
>           "type": "Event"
>         }
>       ],
>       "condition": {
>         "attrs": []
>       }
>     },
>     "notification": {
>       "timesSent": 3,
>       "lastNotification": "2017-11-23T12:14:04.00Z",
>       "attrs": [
>         "location"
>       ],
>       "attrsFormat": "normalized",
>       "http": {
>         "url": "http://staging.familiohq.com:5050/notify <http://staging.familiohq.com:5050/notify>"
>       },
>       "lastFailure": "2017-11-23T12:14:04.00Z"
>     },
>     "throttling": 1
>   }
> ]
> 
> Are you able to help me figure out what's causing the issue setting up the subscription or could you let me know if you need more information..
> 
> Thanks
> 
> Peter from Watcher.
> 
> 
> -- 
> Peter Theill
> CTO
> +45 6171 5096 <tel:61%2071%2050%2096>
> peter at familiohq.com <mailto:peter at familiohq.com>
> 
> Familio
> Artillerivej 86
> DK-2300 Copenhagen S
> https://familiohq.com/ <https://familiohq.com/>
> -- 
> Peter Theill
> CTO
> +45 6171 5096 <tel:61%2071%2050%2096>
> peter at familiohq.com <mailto:peter at familiohq.com>
> 
> Familio
> Artillerivej 86
> DK-2300 Copenhagen S
> https://familiohq.com/ <https://familiohq.com/>




FW External User - Today 10:55 AM
------------------
Comment by peter at familiohq.com : 

Hi Fiware Tech,

I figured out the notification issue so close this ticket, please.

On Thu, Nov 23, 2017 at 1:59 PM Peter Theill <peter at familiohq.com> wrote:

> I have an issue sending notifications from subscriptions I've setup on
> Orion Object Broker.
>
> I've setup Orion and I'm able to create entities, etc without issues.
>
> Now I'm trying to setup a subscription so new entities will be send to
> cygnus.
>
> In Orion I have an entity called "Event" and I'm trying to setup a
> subscription so every time a new "Event" entity is created it will notify a
> (cygnus ngsi) endpoint.
>
> This is my CURL for creating a subscription
>
> *curl -X "POST" "http://staging.familiohq.com:1026/v2/subscriptions
> <http://staging.familiohq.com:1026/v2/subscriptions>" \*
> *     -H 'Accept: application/json' \*
> *     -H 'Fiware-ServicePath: /' \*
> *     -H 'Content-Type: application/json' \*
> *     -d $'{*
> *  "throttling": 1,*
> *  "subject": {*
> *    "entities": [*
> *      {*
> *        "type": "Event",*
> *        "idPattern": ".*"*
> *      }*
> *    ]*
> *  },*
> *  "description": "Event subscription",*
> *  "notification": {*
> *    "attrs": [*
> *      "location"*
> *    ],*
> *    "http": {*
> *      "url": "http://staging.familiohq.com
> <http://staging.familiohq.com>:5050/notify"*
> *    },*
> *    "attrsformat": "legacy"*
> *  },*
> *  "expires": "2020-12-31T00:00:00.000Z"*
> *}'*
>
> I'm using the v2 subscriptions endpoint with the "attrsformat" = "legacy"
> instead of using v1 subscribeContext. Both should work according to the
> documentation (at
> http://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/installation_and_administration_guide/ngsiv2_support/index.html
> ).
>
> The Orion and Cygnus docker containers seems to run as expected but when
> I'm listing my subscriptions using
>
> curl "http://staging.familiohq.com:1026/v2/subscriptions" \
>      -H 'Fiware-ServicePath: /'
>
> I'm getting a failed status
>
> [  {
>     "id": "5a16bb600cd43be01f108c0c",
>     "description": "Event subscription",
>     "expires": "2020-12-31T00:00:00.00Z",
> *    "status": "failed",*
>     "subject": {
>       "entities": [
>         {
>           "idPattern": ".*",
>           "type": "Event"
>         }
>       ],
>       "condition": {
>         "attrs": []
>       }
>     },
>     "notification": {
>       "timesSent": 3,
>       "lastNotification": "2017-11-23T12:14:04.00Z",
>       "attrs": [
>         "location"
>       ],
>       "attrsFormat": "normalized",
>       "http": {
>         "url": "http://staging.familiohq.com:5050/notify"
>       },
>       "lastFailure": "2017-11-23T12:14:04.00Z"
>     },
>     "throttling": 1
>   }
> ]
>
> Are you able to help me figure out what's causing the issue setting up the
> subscription or could you let me know if you need more information..
>
> Thanks
>
> Peter from Watcher.
>
>
> --
> *Peter Theill*
> CTO
> +45 6171 5096 <61%2071%2050%2096>
> peter at familiohq.com
>
> *Familio*
> Artillerivej 86
> DK-2300 Copenhagen S
> https://familiohq.com/
>
-- 
*Peter Theill*
CTO
+45 6171 5096 <61%2071%2050%2096>
peter at familiohq.com

*Familio*
Artillerivej 86
DK-2300 Copenhagen S
https://familiohq.com/



------------------------
Issue id: HELP-12976
Description:
I have an issue sending notifications from subscriptions I've setup on
Orion Object Broker.

I've setup Orion and I'm able to create entities, etc without issues.

Now I'm trying to setup a subscription so new entities will be send to
cygnus.

In Orion I have an entity called "Event" and I'm trying to setup a
subscription so every time a new "Event" entity is created it will notify a
(cygnus ngsi) endpoint.

This is my CURL for creating a subscription

*curl -X "POST" "http://staging.familiohq.com:1026/v2/subscriptions
<http://staging.familiohq.com:1026/v2/subscriptions>" \*
*     -H 'Accept: application/json' \*
*     -H 'Fiware-ServicePath: /' \*
*     -H 'Content-Type: application/json' \*
*     -d $'{*
*  "throttling": 1,*
*  "subject": {*
*    "entities": [*
*      {*
*        "type": "Event",*
*        "idPattern": ".*"*
*      }*
*    ]*
*  },*
*  "description": "Event subscription",*
*  "notification": {*
*    "attrs": [*
*      "location"*
*    ],*
*    "http": {*
*      "url": "http://staging.familiohq.com
<http://staging.familiohq.com>:5050/notify"*
*    },*
*    "attrsformat": "legacy"*
*  },*
*  "expires": "2020-12-31T00:00:00.000Z"*
*}'*

I'm using the v2 subscriptions endpoint with the "attrsformat" = "legacy"
instead of using v1 subscribeContext. Both should work according to the
documentation (at
http://fiware-cygnus.readthedocs.io/en/latest/cygnus-ngsi/installation_and_administration_guide/ngsiv2_support/index.html
).

The Orion and Cygnus docker containers seems to run as expected but when
I'm listing my subscriptions using

curl "http://staging.familiohq.com:1026/v2/subscriptions" \
     -H 'Fiware-ServicePath: /'

I'm getting a failed status

[  {
    "id": "5a16bb600cd43be01f108c0c",
    "description": "Event subscription",
    "expires": "2020-12-31T00:00:00.00Z",
*    "status": "failed",*
    "subject": {
      "entities": [
        {
          "idPattern": ".*",
          "type": "Event"
        }
      ],
      "condition": {
        "attrs": []
      }
    },
    "notification": {
      "timesSent": 3,
      "lastNotification": "2017-11-23T12:14:04.00Z",
      "attrs": [
        "location"
      ],
      "attrsFormat": "normalized",
      "http": {
        "url": "http://staging.familiohq.com:5050/notify"
      },
      "lastFailure": "2017-11-23T12:14:04.00Z"
    },
    "throttling": 1
  }
]

Are you able to help me figure out what's causing the issue setting up the
subscription or could you let me know if you need more information..

Thanks

Peter from Watcher.


-- 
*Peter Theill*
CTO
+45 6171 5096 <61%2071%2050%2096>
peter at familiohq.com

*Familio*
Artillerivej 86
DK-2300 Copenhagen S
https://familiohq.com/

__________________________________________________________________________________________

You can get more information about our cookies and privacy policies on the following links:
- http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FIWARE_Privacy_Policy
- http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Cookies_Policy_FIWARE

Fiware-tech-help mailing list
Fiware-tech-help at lists.fiware.org
https://lists.fiware.org/listinfo/fiware-tech-help


[Created via e-mail received from: Peter Theill <peter at familiohq.com>]

FIWARE Chapter: 
FIWARE GEri: 

Status: Open 

---------------------
This email was generated by FIWARE JIRA following an email received into the Main Help Desk.


More information about the Fiware-tech-help mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy