Ad Widget

Collapse

LogRT logtime format not working to column local time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brambo
    Senior Member
    • Jul 2023
    • 245

    #1

    LogRT logtime format not working to column local time

    My log item collecting is working and I grab only the log lines I want with the use of regex.
    In my latest data is have Timestamp, local time and value,

    Timestamp = 2025-01-20 07:37:17
    local time = <empty>
    value = "07:36:23 - [some item] error text"
    Code:
    07:36:23 - [some item] error text
    17:26:23 - [some item] error text
    The code above is format of the log file
    In my template item I have Log time format "hh:mm:ssppp" which still leave the local time empty, tested also with "hh:mm:ss" and still the local time column stays empty.
    How can I get the logfile time in the local time column.
    I use logRT because the machine generates a daily log file with where the log filename contains the date.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Looks OK to me. Sure there is no empty space in front of text?

    Comment

    • Brambo
      Senior Member
      • Jul 2023
      • 245

      #3
      With notepad++ view all characters active: Click image for larger version

Name:	image.png
Views:	146
Size:	18.8 KB
ID:	497456
      You can clearly see no spaces and the spaces are shown with a grayish .

      This is with windows agent 7.0.8 & 7.2.1 and Zabbix server 7.0.7

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        Encoding? just about last thing, what can be checked, then I am out of ideas..

        Comment

        • Brambo
          Senior Member
          • Jul 2023
          • 245

          #5
          I haven't specified it in the ITEMkey and the default UTF-8 is fine
          According to the manual:"
          • If encoding is not specified (or is an empty string) it is assumed to be UTF-8, the data is processed "as-is";
          But I tried it with UTF-8 no-change in output
          and UTF8 << this one gives error in codepage which was expected

          Comment

          • GetMeSomeCoffee
            Junior Member
            • Jun 2022
            • 7

            #6
            I'm currently running into the same/similar problem with the following components
            - Keyitem: logrt, log
            - Server Version: 6.0.35
            - Agent2 Version: 6.0.38
            - OS: Ubuntu 22.04
            The lines in the log in question begins like this:

            Code:
            Feb 13 07:19:22 XXXXXXX
            Feb 13 07:19:22 XXXXXXX
            Feb 13 07:19:22 XXXXXXX
            Feb 13 07:19:22 XXXXXXX
            Feb 13 07:19:22 XXXXXXX
            Feb 13 07:19:22 XXXXXXX
            Feb 13 07:19:22 XXXXXXX
            While the log fetching itself works, the extraction of the time format using the log time format
            Code:
            ppppddphh:mm:ss
            does not.

            Edit: Additionaly to logrt, i could also recreate the problem with the log item
            Last edited by GetMeSomeCoffee; 13-02-2025, 10:57.

            Comment

            Working...