Skip to content

Commit

Permalink
Store MCC and MNC as tags
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkneipp committed Oct 15, 2024
1 parent c0b0fd1 commit b7e245f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/diameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1735,6 +1735,9 @@ def Answer_16777251_318(self, packet_vars, avps):
except ValueError as e:
self.logTool.log(service='HSS', level='debug', message="Error getting subscriber details for IMSI " + str(imsi), redisClient=self.redisMessaging)
self.logTool.log(service='HSS', level='debug', message=e, redisClient=self.redisMessaging)
decodedPlmn = self.DecodePLMN(plmn=plmn)
mcc = decodedPlmn[0]
mnc = decodedPlmn[1]
self.redisMessaging.sendMetric(serviceName='diameter', metricName='prom_diam_auth_event_count',
metricType='counter', metricAction='inc',
metricValue=1.0,
Expand All @@ -1746,7 +1749,7 @@ def Answer_16777251_318(self, packet_vars, avps):
metricInflux={
"measurement": "S6a_Authentication_Information_Request",
"fields": {"Result-Code": 5001},
"tags": {"IMSI": str(imsi)},
"tags": {"IMSI": str(imsi), "MCC": str(mcc), "MNC": str(mnc)},
"time": datetime.datetime.now(datetime.timezone.utc).astimezone().isoformat()
},
metricHelp='Diameter Authentication related Counters',
Expand Down

0 comments on commit b7e245f

Please sign in to comment.