Ad Widget

Collapse

Item log[]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Calimero
    Senior Member
    • Nov 2006
    • 481

    #16
    Originally posted by ashuji
    YES, this is correct hostname, I have started trying on another host, please check below command:

    # hostname
    SANDBOX2
    That's not what I'm asking (see previous posts). The system hostname is ignored by zabbix and you can set it to whatever you want.

    What is essential is that the Hostname defined in zabbix_agentd.conf and the hostname defined in zabbix (UI, DB) when creating the host match.

    And judging from the screenshot, your host is named "SANDBOX_2" in zabbix and not "SANDBOX2".
    Rename host to "SANDBOX2" in zabbix UI and it should be fine.

    Then you can restart zabbix_agentd so that you won't have to wait ~2 minutes before it tries again pulling active checks from zabbix_server.

    Comment

    • ashuji
      Member
      • Dec 2008
      • 35

      #17
      Working

      WOWwwww !

      Its working !!!!!

      Thanks a lot, just one more help,

      It has started getting lines from LOG file but showing 3 columns as blank - LOCALTIME, SOURCE & SEVERITY whlie its showing timestamp.

      Is it something related to configuration in ITEM for timestamp format.

      Please help on this ?

      Thanks & regards

      Ashwani jain
      Attached Files

      Comment

      • Calimero
        Senior Member
        • Nov 2006
        • 481

        #18
        Originally posted by ashuji
        WOWwwww !
        It has started getting lines from LOG file but showing 3 columns as blank - LOCALTIME, SOURCE & SEVERITY whlie its showing timestamp.

        Is it something related to configuration in ITEM for timestamp format.
        Source and Severity are available on Windows hosts (event log). I don't think you can get that information from a flat text file.


        The time format parameter of you item can contain a pattern to extract date/time from each log line.

        I haven't spent too much time on this (a quick look at src/zabbix_server/trapper/trapper.c : calc_timestamp) but I haven't been able to extract date/time info from my logs. But I should probably change the date/time format to make it easier to parse.

        Comment

        • ashuji
          Member
          • Dec 2008
          • 35

          #19
          Thanks

          Hi

          Thanks for you help, Log watch is working good now. I was checking the forum but could not find how to start new thread. I had another problem.

          I am using custom script to monitor a partilar API, this script returns 0 if API not running and 1 if API working successfully. One day this script failed due to disk space issue and started returning text ERROR message like 'Count not create file X : No disk space left.....' instead of numeric '1' or '0', and zabbix marked this ITEM as 'not supporeted'.

          We want zabbix to send alert mail in case any of the ITEM become 'not supported'.

          Is there any work around for this ?

          THanks & regards

          Ashwani jain

          Comment

          • chyaroslav
            Junior Member
            • Jun 2008
            • 8

            #20
            Problem with log

            I have another problem with monitoring of log files. Here is a log from agentd.log:

            25562:20090603:122438 In refresh_metrics('10.61.12.40',10051)
            25562:20090603:122438 get_active_checks('10.61.12.40',10051)
            25562:20090603:122438 Sending [ZBX_GET_ACTIVE_CHECKS
            d-tst-1
            ]
            25562:20090603:122438 Before read
            25562:20090603:122438 In parse_list_of_checks() [log[/var/adm/messages,error]:1:-1078953032
            ZBX_EOF
            ]
            25562:20090603:122438 In disable_all_metrics()
            25562:20090603:122438 Parsed [log[/var/adm/messages,error]:1:-1078953032]
            25562:20090603:122438 In add_check('log[/var/adm/messages,error]', 1, -1078953032)
            25562:20090603:122438 Parsed [ZBX_EOF]
            25562:20090603:122438 In process_active_checks('10.61.12.40',10051)
            25562:20090603:122438 In process log (/var/adm/messages,-1078953032)
            25562:20090603:122438 Cannot set postition to [-1078953032] for [/var/adm/messages] [Invalid argument]
            25562:20090603:122438 Active check [log[/var/adm/messages,error]] is not supported. Disabled.
            25562:20090603:122438 XML before sending [<req><host>ZC10c3QtMQ==</host><key>bG9nWy92YXIvYWRtL21lc3NhZ2VzLGVycm9yXQ== </key><data>WkJYX05PVFNVUFBPUlRFRA==</data><lastlogsize>LTEwNzg5NTMwMzI=</lastlogsize></req>]
            25562:20090603:122438 OK

            Comment

            • asa1985
              Junior Member
              • Sep 2010
              • 16

              #21
              Log Item not working

              I'm working with 1.8.3 Zabbix
              I am beginner in Zabbix monitoring

              Item configuret:

              Host: XXXX
              Description: rezultats
              Type: Zabbix agent (active)
              Key: log["/usr/ccc/rezultats.log","ERR","ASCII",50]
              Type of information: Log
              Update interval (in sec): 1
              Keep history (in days): 7
              Status: Active

              but this item not working.
              this item is corect configuret?

              Comment

              • colloque
                Member
                • Feb 2010
                • 72

                #22
                hello asa1985

                try it
                log[/usr/ccc/rezultats.log,'ERR','ASCII',50]

                Comment

                • asa1985
                  Junior Member
                  • Sep 2010
                  • 16

                  #23
                  hello colloque

                  I tried log[/usr/ccc/rezultats.log,'ERR','ASCII',50]
                  but didn't work again

                  maybe other solution?

                  Comment

                  • colloque
                    Member
                    • Feb 2010
                    • 72

                    #24
                    test with only syntax:

                    log[/usr/ccc/rezultats.log,'ERR',50]


                    What are your rights on the directory /usr/ccc/ and file rezultats.log ?

                    Can you access to file with the user zabbix in read ans write ?

                    Comment

                    • asa1985
                      Junior Member
                      • Sep 2010
                      • 16

                      #25
                      I tried lots of variations, but no one helped.

                      zabbix user has the right to write, read ...

                      item dos't read information from the log file.

                      Comment

                      • zalex_ua
                        Senior Member
                        Zabbix Certified Trainer
                        Zabbix Certified SpecialistZabbix Certified Professional
                        • Oct 2009
                        • 1286

                        #26
                        Originally posted by asa1985
                        item dos't read information from the log file.
                        Check 'Hostname' parameter http://www.zabbix.com/documentation/.../zabbix_agentd

                        Comment

                        Working...