Get Thing Events Logs

This guide will show you how you can see Thing Event logs via API.

View Events Logs

POST https://console.monogoto.io/thing/searchCDR

Headers

NameTypeDescription

YOUR_TOKEN*

String

Your authentication token

CUSTOMER_ID

String

Customer API key

Request Body

NameTypeDescription

ICCID*

String

The ICCID of your SIM

EVENT_SEVERITY

String

GREATER_OR_EQUAL_TIMESTAMP

String

LESS_TIMESTAMP

String

EVENT_DATA_TYPE

String

EVENT_MESSAGE_TYPE

String

RESULTS_LIMIT

String

{
    // Response
}

Example using cURL:

curl -X POST \
    --url "https://console.monogoto.io/thing/searchCDR" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer {TOKEN_HERE}" \
    -H "apikey: {CUSTOMER_ID}" \
    -d "{ \"ThingIdELK\": \"ThingId_ICCID_{ICCID}\", \"SeverityELK\": \"{EVENT_SEVERITY}\", \"gteTimestampELK\": \"{GREATER_OR_EAQUAL_TIMESTAMP}\", \"ltTimestampELK\": \"{LESS_THAN_TIMESTAMP}\", \"EsDataTypeELK\": \"{EVENT_DATA_TYPE}\", \"MessageTypeELK\": \"{EVENT_MESSAGE_TYPE}\", \"limit\": \"{RESULTS_LIMIT}\"}"

Please note that the above shown command needs to be replaced with information:

{TOKEN_HERE} - replace with your token

{CUSTOMER_ID} - replace with your customer ID. You may obtain Customer ID during the authentication

{ICCID} - replace with the ICCID of your SIM

{EVENT_SEVERITY} - replace with the severity of the Event you wish to be displayed

{GREATER_OR_EQUAL_TIMESTAMP} - replace with the timestamp of date/time to show greater or equal date/time Events. Please enter date/time in epoch format with milliseconds. You may use a converter that can be found following this link

{LESS_TIMESTAMP} - replace with the timestamp of date/time to show less than entered date/time Events. Please enter date/time in epoch format with milliseconds. You may use a converter that can be found following this link

{EVENT_DATA_TYPE} - replace with the Event message type to be displayed. You may find data types list following this link

{EVENT_MESSAGE_TYPE} - replace with the Event message type to be displayed

{RESULTS_LIMIT} - replace with how many results you want to be displayed. Default when not using this line is 10 results

Example of request that will show last 50 Events for our Thing:

curl -X POST \
    --url "https://console.monogoto.io/thing/searchCDR" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJhb6IkpXVCJ9.eyJSb2xlIjoiVXN4lclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYWN3NzhhMGQxYmbSI6Im4zgFkbWluIiwiQ3VzdG9tsbCwiVXNlcklkIjoiVklkXzg5Yj5Y2OGEyUtNDQThhLTEzZjA0MzJhZDE3YyINTAzgZmUtZGI51My00ZjRiLTktN2U5Yjc0ZWU1ZThlIiwiaWNzM3MjI5L2MDY3NTE2Mjl9.99aSLzP7kTgK6TZGW-xalrMu0GkW6viunt3XxbNng" \
    -H "apikey: cid_eb424686-8943a-4f4h4-9b6d-3627a666333b" \
    -d "{ \"ThingIdELK\": \"ThingId_ICCID_8912372646888991\", \"limit\": \"50\"}"

Expected result will show 50 last Events for our Thing:

{
  "totalResults": 151,
  "hits": [
    {
      "_source": {
        "EsDataType": "GGSN_AUTHENTICATE_PDP_CONTENT_RESULT",
        "Severity": "Info",
        "message": "Success authenticate_pdp_context for Thing ICCID 8912372646888991 MNO= UAB TELE2. Session ID =8993090, Allowed Bytes= 20971520",
        "Timestamp": 1609154365332,
        "MessageType": "EVENT"
      }
    },
    {
      "_source": {
        "EsDataType": "GGSN_AUTHENTICATE_PDP_CONTENT",
        "Severity": "Info",
        "message": "authenticate_pdp_context v2 for Thing=ICCID 8912372646888991 from SGSN 10.99.5.34 RAI=null . Allowed Bytes = 20971520",
        "Timestamp": 1609154365331,
        "MessageType": "EVENT"
      }
    },
    {
      "_source": {
        "EsDataType": "GGSN_DELETE_PDP_CONTENT",
        "Severity": "Info",
        "message": "delete_pdp_context for Thing=ICCID 8912372646888991, Session ID=8986961, Used bytes=18464019",
        "Timestamp": 1609154364198,
        "MessageType": "EVENT"
      }
      
      
      ...

Example request that will show only Event CDR results for our Thing:

curl -X POST \
    --url "https://console.monogoto.io/thing/searchCDR" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJhb6IkpXVCJ9.eyJSb2xlIjoiVXN4lclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYWN3NzhhMGQxYmbSI6Im4zgFkbWluIiwiQ3VzdG9tsbCwiVXNlcklkIjoiVklkXzg5Yj5Y2OGEyUtNDQThhLTEzZjA0MzJhZDE3YyINTAzgZmUtZGI51My00ZjRiLTktN2U5Yjc0ZWU1ZThlIiwiaWNzM3MjI5L2MDY3NTE2Mjl9.99aSLzP7kTgK6TZGW-xalrMu0GkW6viunt3XxbNng" -H "apikey: cid_eb424686-8943a-4f4h4-9b6d-3627a666333b" \
    -d "{ \"ThingIdELK\": \"ThingId_ICCID_8912372646888991\", \"MessageTypeELK\": \"CDR\",}"

Expected result will show only CDR Events for our Thing:

{
  "totalResults": 31,
  "hits": [
    {
      "_source": {
        "EsDataType": "DATA",
        "Severity": "Info",
        "message": "ICCID 8912372646888991 used 1440448 bytes ",
        "Timestamp": 1612339903864,
        "MessageType": "CDR"
      }
    },
    {
      "_source": {
        "EsDataType": "DATA",
        "Severity": "Info",
        "message": "ICCID 8912372646888991 used 1222281 bytes ",
        "Timestamp": 1612339856758,
        "MessageType": "CDR"
      }
    },
    {
      "_source": {
        "EsDataType": "MT_SMS",
        "Severity": "Info",
        "message": "Success. txId=ThingId_ICCID_8912372646888991_1612339830744_0.5133170465420831 SMS txId=ThingId_ICCID_8912372646888991_1612339830744_0.5133170465420831 from console to ICCID 8912372646888991",
        "Timestamp": 1612339831262,
        "MessageType": "CDR"
      }
    },
    
    ...

Example request that will show only our entered SIM open data sessions Events:

curl -X POST \
    --url "https://console.monogoto.io/thing/searchCDR" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJhb6IkpXVCJ9.eyJSb2xlIjoiVXN4lclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYWN3NzhhMGQxYmbSI6Im4zgFkbWluIiwiQ3VzdG9tsbCwiVXNlcklkIjoiVklkXzg5Yj5Y2OGEyUtNDQThhLTEzZjA0MzJhZDE3YyINTAzgZmUtZGI51My00ZjRiLTktN2U5Yjc0ZWU1ZThlIiwiaWNzM3MjI5L2MDY3NTE2Mjl9.99aSLzP7kTgK6TZGW-xalrMu0GkW6viunt3XxbNng" \
    -d "{ \"ThingIdELK\": \"ThingId_ICCID_8912372646888991\", \"EsDataTypeELK\": \"GGSN_AUTHENTICATE_PDP_CONTENT_RESULT\"}"

Expected result:

{
  "totalResults": 6,
  "hits": [
    {
      "_source": {
        "EsDataType": "GGSN_AUTHENTICATE_PDP_CONTENT_RESULT",
        "Severity": "Info",
        "message": "Success authenticate_pdp_context for Thing ICCID 8912372646888991 MNO= OMNITEL. Session ID =123456789, Allowed Bytes= 20971520, IP : 11.111.111.181",
        "Timestamp": 1649772356750,
        "MessageType": "EVENT"
      }
    },
    {
      "_source": {
        "EsDataType": "GGSN_AUTHENTICATE_PDP_CONTENT_RESULT",
        "Severity": "Info",
        "message": "Success authenticate_pdp_context for Thing ICCID 8912372646888991 MNO= OMNITEL. Session ID =123456789, Allowed Bytes= 20971520, IP : 11.111.111.181",
        "Timestamp": 1649767305888,
        "MessageType": "EVENT"
      }
    },
    ...

Example request that will show only our entered SIM closed data sessions Events:

curl -X POST \
    --url "https://console.monogoto.io/thing/searchCDR" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJhb6IkpXVCJ9.eyJSb2xlIjoiVXN4lclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYWN3NzhhMGQxYmbSI6Im4zgFkbWluIiwiQ3VzdG9tsbCwiVXNlcklkIjoiVklkXzg5Yj5Y2OGEyUtNDQThhLTEzZjA0MzJhZDE3YyINTAzgZmUtZGI51My00ZjRiLTktN2U5Yjc0ZWU1ZThlIiwiaWNzM3MjI5L2MDY3NTE2Mjl9.99aSLzP7kTgK6TZGW-xalrMu0GkW6viunt3XxbNng" \
    -d "{ \"ThingIdELK\": \"ThingId_ICCID_8912372646888991\", \"EsDataTypeELK\": \"GGSN_DELETE_PDP_CONTENT\"}"

Expected result:

{
  "totalResults": 5,
  "hits": [
    {
      "_source": {
        "EsDataType": "GGSN_DELETE_PDP_CONTENT",
        "Severity": "Info",
        "message": "delete_pdp_context for Thing=ICCID 8912372646888991, Session ID=7711111, Used bytes=1804182 IP : 11.111.111.181",
        "Timestamp": 1649767320663,
        "MessageType": "EVENT"
      }
    },
    {
      "_source": {
        "EsDataType": "GGSN_DELETE_PDP_CONTENT",
        "Severity": "Info",
        "message": "delete_pdp_context for Thing=ICCID 8912372646888991, Session ID=7711111, Used bytes=2846124 IP : 11.111.11.181",
        "Timestamp": 1649767024954,
        "MessageType": "EVENT"
      }
    },
...

Last updated