Ignore:
Timestamp:
06/02/15 16:58:03 (9 years ago)
Author:
sdipsl
Message:
  • send job duration in seconds. see #253
  • send project name (aka gencmip6). see #255
  • send group name incoming metrics will be pushed in. see #258
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_debug/libIGCM_debug.ksh

    r1201 r1202  
    184184#D-function IGCM_debug_sendAMQP_Metrics 
    185185#D- * Purpose: Take over AMQP C client using mail as a message recipient 
    186 #D- * One argument : Directory where metrics.json files can be found 
     186#D- * Two arguments : - Directory where metrics.json files can be found 
     187#D- *                 - Metrics Group Name. metrics will be added to this group 
    187188#D- * Attach encoded metrics.json files. 
    188189 
     
    195196    code=7100 
    196197    # Usual AMQP message to route messages on server side 
    197     encodedBody=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" |  base64 -w 0 ) 
     198    encodedBody=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"metricsGroupName\":\"${2}\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" |  base64 -w 0 ) 
    198199    # send mail 
    199200    attachmentsOptions="" 
     
    596597        genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"activity\":\"IPSL\",\"name\":\"${config_UserChoices_JobName}\",\"cumulPeriod\":\"${CumulPeriod}\",\"experiment\":\"${config_UserChoices_ExperimentName}\",\"space\":\"${config_UserChoices_SpaceName}\",\"model\":\"${config_UserChoices_TagName}\",\"startDate\":\"${config_UserChoices_DateBegin}\",\"endDate\":\"${config_UserChoices_DateEnd}\",\"login\":\"${LOGIN}\",\"centre\":\"${CENTER}\",\"machine\":\"${MASTER}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 
    597598        # RabbitMQ message body with specific fields associated message codes treated here 
    598         Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 
     599        Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"accountingProject\":\"${PROJECT}\",\"jobWarningDelay\":\"${jobWarningDelay}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 
    599600        # Fill the rabbitMQ queue (the config.card in use will be sent) 
    600601        IGCM_debug_sendAMQP activate 
     
    627628      genericSimulationID=$( echo "\"msgApplication\":\"monitoring\",\"msgProducer\":\"libigcm\",\"cumulPeriod\":\"${CumulPeriod}\",\"simuid\":\"${simuid}\",\"jobuid\":\"${jobuid}\"" ) 
    628629      # RabbitMQ message body with specific fields associated message codes treated here 
    629       Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 
     630      Body=$( echo "{${genericSimulationID},\"msgCode\":\"${code}\",\"accountingProject\":\"${PROJECT}\",\"jobWarningDelay\":\"${jobWarningDelay}\",\"msgUID\":\"$(uuidgen)\",\"msgTimestamp\":\"$( date +"%Y-%m-%dT%H:%M:%S.%N%z" )\"}" ) 
    630631      # Fill the rabbitMQ queue 
    631632      IGCM_debug_sendAMQP 
Note: See TracChangeset for help on using the changeset viewer.