Skip to content

Commit

Permalink
Split to dedicated redis messaging for peerLogMessaging
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkneipp committed Jan 27, 2024
1 parent 9932588 commit 30c56ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions services/diameterService.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def __init__(self):
self.redisReaderMessaging = RedisMessagingAsync(host=self.redisHost, port=self.redisPort, useUnixSocket=self.redisUseUnixSocket, unixSocketPath=self.redisUnixSocketPath)
self.redisWriterMessaging = RedisMessagingAsync(host=self.redisHost, port=self.redisPort, useUnixSocket=self.redisUseUnixSocket, unixSocketPath=self.redisUnixSocketPath)
self.redisPeerMessaging = RedisMessagingAsync(host=self.redisHost, port=self.redisPort, useUnixSocket=self.redisUseUnixSocket, unixSocketPath=self.redisUnixSocketPath)
self.redisPeerLogMessaging = RedisMessagingAsync(host=self.redisHost, port=self.redisPort, useUnixSocket=self.redisUseUnixSocket, unixSocketPath=self.redisUnixSocketPath)
self.redisMetricMessaging = RedisMessagingAsync(host=self.redisHost, port=self.redisPort, useUnixSocket=self.redisUseUnixSocket, unixSocketPath=self.redisUnixSocketPath)
self.banners = Banners()
self.logTool = LogTool(config=self.config)
Expand Down Expand Up @@ -114,7 +115,7 @@ async def logActivePeers(self):
peerConnectionStatus = peerData.get('connectionStatus', None)
if peerHost and peerConnectionStatus:
if peerConnectionStatus.lower() == 'connected':
await(self.redisMetricMessaging.sendMetric(serviceName='diameter', metricName='prom_diam_connected_state',
await(self.redisPeerLogMessaging.sendMetric(serviceName='diameter', metricName='prom_diam_connected_state',
metricType='gauge', metricAction='set',
metricLabels={'host': peerHost},
metricValue=1.0, metricHelp='Connection state of diameter peers',
Expand All @@ -123,7 +124,7 @@ async def logActivePeers(self):
prefixHostname=self.hostname,
prefixServiceName='metric'))
elif peerConnectionStatus.lower() == 'disconnected':
await(self.redisMetricMessaging.sendMetric(serviceName='diameter', metricName='prom_diam_connected_state',
await(self.redisPeerLogMessaging.sendMetric(serviceName='diameter', metricName='prom_diam_connected_state',
metricType='gauge', metricAction='set',
metricLabels={'host': peerHost},
metricValue=0.0, metricHelp='Connection state of diameter peers',
Expand Down

0 comments on commit 30c56ed

Please sign in to comment.