Automic Workload Automation

 View Only

  • 1.  AAKE - include pod name in logfile names?

    Posted Oct 07, 2024 11:09 AM
    Edited by Michael A. Lowry Oct 14, 2024 08:08 AM

    In AAKE, each AE server process runs in its own Kubernetes pod. Pods are named dynamically. They get names like ae-wp-5ff48fd795-rrnvh.

    AAKE process log files are named based on the value of the AUTOMIC_GLOBAL_LOGGING variable.

    logging=${AUTOMIC_GLOBAL_LOGGING:../temp/$$srv_log_*_##.txt}

    The documentation for ucsrv.ini describes the three special placeholders one can use:

    Full file name pattern for log file names

    • $$ is replaced by the purpose of a Process (CP or WP or JWP or DBSERVICE). No replacements in other components
    • * is replaced by the 3 digit number of a Worker Process.
    • # is replaced by the log file sequence number after the existing log files' corresponding numbers have been raised by one during startup of the component.

    Is there a way to include the pod name in the log file name? This would make it easier to find out which AE server process wrote each file.

    Note that the pod name is not mentioned anywhere in the log file.

    Correction: There are some messages that include the host name, which is the same as the pod name:

    20240918/150021.496 - 24     U02000066 Host information: Host name='jcp-ws-867d67f4dd-9qm8r', IP address='172.17.34.23'
    20240918/150021.496 - 24     U00003492 Server has been started on Host 'jcp-ws-867d67f4dd-9qm8r' ('172.17.34.23') with process ID '1'.


  • 2.  RE: AAKE - include pod name in logfile names?

    Posted Oct 14, 2024 04:46 AM

    Mike

    2 points on this.

    1. Excellent suggestion, as this is quite tricky to follow otherwise, having to look into the event stream to find the actual source is a pain.
    2. I assume you are in a "private" environment, but you are using "public" IPs, If you need to use 172 then best-practise is to use the allocated "private" range of 172.16.0.0/12 (rather than assuming /8 like days of old). I have had some interesting problems with bleed of the public into private space as you appear to be doing.

    Cheers, Andrew



    ------------------------------
    Knows a little about UIM/DXim, AE, Automic
    ------------------------------



  • 3.  RE: AAKE - include pod name in logfile names?

    Posted Oct 14, 2024 06:21 AM
    Edited by Michael A. Lowry Oct 14, 2024 06:22 AM

    @Andrew Cooper: Good catch! You had me worried there for a moment, but I confirmed that the IP addresses we are using are in 172.16.0.0/12. I think what happened was that I instinctively changed the IP addresses before posting the log excerpt, in an attempt to anonymize them. Of course this wasn't necessary. I must have been tired.



  • 4.  RE: AAKE - include pod name in logfile names?

    Posted Oct 14, 2024 10:47 AM
    Edited by Michael A. Lowry Oct 14, 2024 05:05 PM

    I noticed that the pod name is present in the log files of the AWI, so l look at the relevant line in the logback config file /usr/awi/config/logback.xml in the running pod:

    <file>${AWI_LOG_FILE_PATH:-}${HOSTNAME}_${app_name:-AWI}_LOG_00.txt</file>

    I guess logback evaluates HOSTNAME when it starts. As far as I can tell, this won't work with AUTOMIC_GLOBAL_LOGGING.

    Has anyone tried setting AWI_LOG_FILE_PATH via a ConfigMap?