• J
    Johautt

    Ok, we found the right way to send the body:

    {
      "name":"and",
      "arguments":[
        {
          "name":"eq",
          "arguments":[
            "active",true
          ]
        },
        {
          "name":"like",
          "arguments":[
            "message","*fallaPCI*"
          ]
        }
      ]
    }
    

    Doing the body this way, responds a 200 (ok) with the body:

    {
        "items": [
            {
                "eventType": {
                    "dataSourceId": 652,
                    "dataPointId": 13948,
                    "pointEventDetectorId": 194,
                    "duplicateHandling": 2,
                    "eventType": "DATA_POINT",
                    "eventSubtype": null,
                    "referenceId1": 13948,
                    "referenceId2": 194,
                    "systemMessage": false,
                    "rateLimited": false,
                    "publisherId": -1
                },
                "message": "fallaPCI",
                "id": 105235,
                "active": true,
                "status": "",
                "alarmLevel": "CRITICAL",
                "activeTimestamp": 1552682510905,
                "acknowledged": false,
                "comments": null,
                "acknowledgedTimestamp": 0,
                "acknowledgedByUserId": 0,
                "acknowledgedByUsername": null,
                "acknowledgedMessage": null,
                "returnToNormalTimestamp": 0
            }
        ],
        "total": 1
    }
    

    We solved all of the doubts. Thank you very much!!!

    posted in User help read more
  • J
    Johautt

    We tried with both bodies you provided, but returns a 500 error with this body:

    {
        "cause": "IndexOutOfBoundsException: Index: 1, Size: 1",
        "mangoStatusCode": -1,
        "mangoStatusName": null,
        "localizedMessage": "Internal Server Error"
    }
    

    posted in User help read more
  • J
    Johautt

    Ok @Jared-Wiltshire, thank you very much!!! Now we know how to send the 'message' filter in the endpoint '/v1/events'. In fact, the SQL console answer in the field 'MESSAGE' was 'common.default|fallaPCI|'.

    But we also want to implement the POST endpoint '/v1/events/query'. We are using this body (in this case to see which events are active):

    {
      "arguments": [
        {"active": true}
      ],
      "argumentsSize": 1,
      "name": "string",
      "nameValid": true,
      "rootNode": true
    }
    

    But it returns a status 500 (Server Error) with this body:

    {
        "cause": "RQLToSQLParseException: Unsupported operation: string",
        "mangoStatusCode": -1,
        "mangoStatusName": null,
        "localizedMessage": "Internal Server Error"
    }
    

    Can you give us an example of how to use this endpoint?

    posted in User help read more
  • J
    Johautt

    Good Morning.

    We are trying to capture the following events through the mango REST API through its 'events-rest-controller' interface:

    0_1552662737839_eventos.png

    We have done tests with the endpoint '/v1/events', with which we have been able to capture the events.

    0_1552662801382_EventsQuery.png

    We have also been able to capture executing several types of filters for this endpoint.

    This, for example, is a query to the endpoint to filter by 'acknowledged':

    0_1552662855324_EventsQueryFilter1.png

    This one is for filtering by 'active':

    0_1552662896722_EventsQueryFilter2.png

    And this last is to filter by 'alarmLevel':

    0_1552662953751_EventsQueryFilter3.png

    But when we try to filter by 'message', it does not show us any results, even though the filter has the same coincidence with the three events:

    0_1552663006866_EventsQueryFilter4.png

    We tried to consult the endpoint '/v1/events/module-defined-query' but we do not understand it, and we have always had errors in the way we fill the body.

    What we want to know is:

    1. How to filter events by message.

    2. How the endpoint '/v1/events/module-defined-query' works. We have already consulted the endpoint '/v1/events/explain-module-defined-queries', but we still do not understand it.

    3. We also are trying with '/v1/events/query'. If you can supply us information about this endpoint, it would be helpful.

    Beforehand thank you very much.

    posted in User help read more