Skip to content

๐Ÿšฆ Troubleshooting SIA Flows with Grafana Lokiยถ

This guide provides practical queries and tips for investigating SIA-related flows using Grafana with Loki as the log backend.

Using Grafana Loki for Log Analysis

All queries below are intended for use in the Grafana Explore UI, with Loki as the data source. Adjust namespaces or labels as needed for your environment.


๐Ÿ“ฑ Search for Distinct msisdn_registers SMS Messagesยถ

Use this query to find logs related to msisdn_registers SMS events:

{app="sms-service"} |= "023001" |= "Pdu DeliverSM arrived"

specific msisdn

{app="sms-service"} |= "023001" |= "Pdu DeliverSM arrived" |= "[hashedMsisdn]"

responses

{app="sms-service"} |= "Pdu DeliverSM arrived" |= "[hashedMsisdn]"

What does this do?

This query filters logs from the sms-service application containing both the code 023001 and the phrase Pdu DeliverSM arrived, which typically indicates an incoming SMS for MSISDN registration.


๐Ÿ†• Search for MSISDN Creationsยถ

To find logs where new MSISDNs are created:

{app="sim-service"} |= "Generating new AppletDetails with mnoId"

MSISDN Creation Events

This query helps you identify when the system generates new applet details, signaling the creation of a new MSISDN.

Search for non delivered statusesยถ

{app=~"sms-service"} |= "\"deliveryStatus\":" != "\"deliveryStatus\":\"DELIVRD\""
ยถ

๐Ÿ“ค Search for SubmitSM Eventsยถ

To locate outgoing SMS submission events:

{app="sms-service"} |= "023012" |= "SubmitSM"

responses

{app="sms-service"} |= "023012" |= "Successfully sent NATIVE" 

SubmitSM Events

This query finds logs where the sms-service is submitting SMS messages, filtered by the code 023012 and the keyword SubmitSM.

search what happend with request/response at sia-apiยถ

This whill give you the userKey so you can track the user in sia-service logs from beginning to end

{app="sia-service"} |= `{hashedMsisdn}` |= "userKey"

Check what device status the applet responded back to server 1) search by requestId/simIdentifier/deviceIdentifier

{app="sia-service"} |= "{requestId}"
2) check nearby logs for "Processing approval for". There you will find "ackStatus";

Searching callback status for customer 68934ae47e1ba56952d2eddcยถ

{app="sia-service"} |= `Sending callback for Customer ID: 68934ae47e1ba56952d2eddc`
{app=~"sia-service"} |= `Callback successful for Customer ID: 68934aa97e1ba56952d2ed98`
{app=~"sia-service"} |= `Callback failed for Customer ID: 68934aa97e1ba56952d2ed98`

search for specific callback responsesยถ

{app="sia-service"}
|= "VALIDATE_RESPONSE"
|~ "responseStatus=(NOT_AVAILABLE|VALID)"

statuses: UICC_SESSION_TERMINATED_BY_USER 16 BACKWARD_MOVE_IN_THE_UICC_SESSION_REQUESTED_BY_USER 17 NO_RESPONSE_FROM_USER 18 (ignore) TERMINAL_CURRENTLY_UNABLE_TO_PROCESS_COMMAND 32 (device busy or not available)

{app=~"sia-service"} |= `Received SimConsentResponse: SimConsentResponse`
{app=~"sia-service"} |= `Received SimConsentResponse: SimConsentResponse` |= `ackStatus=16`

search all statuses that are not common:

{app=~"sia-service"}
|= "Received SimConsentResponse"
|= "ackStatus="
!= "ackStatus=0"
!= "ackStatus=16"
!= "ackStatus=17"
!= "ackStatus=18"

Delivery errorsยถ

{app="sia-service"} |= `Sending callback for Customer ID: 68934ae47e1ba56952d2eddc`
{app=~"sim-service|sms-service|sia-service"} |= `379665710F2245D6C49D2C3C7C92C00828A1766FE82DD34AEDF1B122E0F105DD` |= `consent`

Check if TCP request was received from appletยถ

{app=~"sim-service"} |= `0247DCDCFF7543AB2177E5F7B4DD231C2C524BDB75D5432A3268CB6C72018A3B` |= `Received TCP request: `

๐Ÿ› ๏ธ Additional Tipsยถ

  • Namespace Filtering:
    If your logs are separated by Kubernetes namespace, add namespace="sms-service" or the relevant namespace label to your queries.
  • Time Range:
    Always set an appropriate time range in Grafana to avoid missing relevant logs.
  • Exporting Results:
    Use Grafana's export features to save query results for further analysis or sharing.

Sensitive Data

Be cautious when sharing logs externally, as they may contain sensitive information such as MSISDNs or internal identifiers.