๐ฆ 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:
specific msisdn
responses
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:
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ยถ
ยถ
๐ค Search for SubmitSM Eventsยถ
To locate outgoing SMS submission events:
responses
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
Check what device status the applet responded back to server 1) search by requestId/simIdentifier/deviceIdentifier
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ยถ
sim consent statusยถ
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ยถ
Consent searchยถ
{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, addnamespace="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.