added mona monitoring to SAP SFTP

This commit is contained in:
Infineon\StieberD
2024-11-26 11:49:46 -07:00
parent a81d218bdb
commit 87e6f891f3
5 changed files with 200 additions and 292 deletions

View File

@ -62,9 +62,12 @@ Service SendBufferedStatus(MonaResource, StatusName, StatusValue)
MonaResource = Environment_Services("GetMonaResource")
end
Prod = Environment_Services('IsProd')
If Not(Prod) then GoSub SwapResourceNames
DateTime = SRP_DateTime('Now')
Year = SRP_Datetime("Year", DateTime)
Month = SRP_Datetime("Month", DateTime)
Year = SRP_Datetime("Year", DateTime)
Month = SRP_Datetime("Month", DateTime)
If Len(Month) EQ 1 then
Month = '0':Month
end
@ -169,3 +172,19 @@ Service SendBufferedAverageMetric(MonaResource, MetricName, MetricValue)
end service
SwapResourceNames:
// Swap out prod resource name with dev resource name
Begin Case
Case ( (MonaResource EQ 'GRP_OPENINSIGHT_MES_OP_FE_SAP_OUTBOUND') and (StatusName EQ 'SFTP-Interface-Outbound') )
MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_DEV_SAP_OUTBOUND'
StatusName = 'SFTP-Interface-Outbound-Dev'
Case ( (MonaResource EQ 'GRP_OPENINSIGHT_MES_OP_FE_SAP_INBOUND') and (StatusName EQ 'SFTP-Interface-Inbound') )
MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_DEV_SAP_INBOUND'
StatusName = 'SFTP-Interface-Inbound-Dev'
End Case
return