Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Community discussion is present here: http://community.pbspro.org/t/pp-838-support-for-logging-via-syslog-in-pbs/591

...

  facility = //PBS_SYSLOG from pbs.conf

  serverity = //  PBS_SYSLOGSEVR from pbs.conf (by default NONE)

Methods:

    def get_log_config_values(syslog=false)

...

       a) First check if the PBS_SYSLOG & PBS_LOCALLOG are set in the pbs.conf file

       b) If the values are If PBS_SYSLOG is not set in the pbs.conf file we will set set variable PBS_SYSLOG=0 and 

       c) If  PBS_LOCALLOG is not set we will set variable PBS_LOCALLOG=1

      Therefore this will check into the local logs only (see line 3 in below table), i.e PTL will execute log_match() in local logs.


      2) Logic for whether to read local logs/ syslog we will follow this table -

...

      Note:  The error thrown will be PtlLogMatchError

     

       Return:      

      self.file_to_check (/ / file_to_check =1 for syslog, file_to_check=2 for local logs  and file_to_check=3 for both)

...

  1.  get type of syslog utility (rsyslog/syslog-ng) running on host and syslog conf file. Currently we are only supporting rsyslog
  2. get PBS_SYSLOGSEVR from pbs.conf. If it is not set throw error PBSConfigError that set PBS_SYSLOGSEVR
  3. According to utility get list_of_priorites[] (severity + facility) - get_rsyslog_priorites(), def get_syslogng_priorites()
  4. With the priorities get list_of_syslog_files[]  (if there is no list of files returned, throw PTL error) get_rsyslog_files(), get_syslogng_files()
  5. Get lines from each of the files in list_of_syslog_files[] - def get_syslog_lines()
    If no lines are returned throw PTLerror
  6. Combine and Sort lines by datetime

...