Ad Widget

Collapse

PATCH: Windows Agent side filtering of events on event source and type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dkg
    Junior Member
    • Nov 2008
    • 2

    #1

    PATCH: Windows Agent side filtering of events on event source and type

    The attached patch implements agent side filtering of event log events on the 'event source' and 'event type'.

    For this functionality the Item key eventlog parameter syntax is extended to allow two extra optional parameters that enable the user to specify a filter expression for the event source and for the event type.

    New parameter syntax:

    eventlog[<eventlog name>,<event value (description) filter expression>,<event source filter expression>,<event type filter expression>]

    This change can greatly reduce the number of events that is sent to the Zabbix server, especially when monitoring just one application or just the error events.

    This patch was made using zabbix-1.6.1.tar.gz from 2008-11-04

    To apply the patch:
    - change to the root of the zabbix source tree
    - copy the patch file to the root of the zabbix source tree
    - apply the patch with patch -p 1 -i eventlog.patch

    I have tested this patch with a stock Zabix 1.6.1 server install on CentOS 5
    and a Windows XP Professional SP2 for the Windows agent.
    Attached Files
  • gospodin.horoshiy
    Senior Member
    • Sep 2008
    • 272

    #2
    That looks really promising, thanks!
    Zbx 2.0.4 on Debian and MYSQL5 on Ubuntu Server 64bit 8.04,
    200+ Win Agents, 50+ Linux Agents, 150+ Network Devices

    Comment

    • cjwallace
      Senior Member
      • Sep 2008
      • 126

      #3
      Thanks this could be what i am looking for.

      Could you please give a real working example so i can see how to use it?

      Thanks again for creating this patch hopefully my event viewer issues take one step closer to working after this

      Comment

      • NOB
        Senior Member
        Zabbix Certified Specialist
        • Mar 2007
        • 469

        #4
        Very good

        Hi

        thanks for the patch.
        We have been waiting for it for a long time.

        While you are at it

        In my opinion, learned from a closed source Monitoring system, another
        way would be to construct an "artificial" log file line in the agent of the
        form, e.g.
        Code:
        Source: MSSQL Type: Information Event-ID: 4711 Message: the informational message
        and the pattern matching in the agent is applied to that "line".

        Depending on the existing patterns in use for the current eventlog items those could remain unchanged.

        What do the other posters think about this suggestion ?

        This way the agent is still not very smart, but the filtering can be
        implemented in a more fine-grained way on the ZABBIX server.

        Regards

        Norbert.

        Comment

        • jvella
          Junior Member
          • Sep 2008
          • 24

          #5
          Will the Patch work with Zabbix 1.6.2

          I would like to take advantage of the patch to Eventlog handling but I am running the 1.6.2 version of Zabbix. Will the patch work with this version?

          Comment

          • NOB
            Senior Member
            Zabbix Certified Specialist
            • Mar 2007
            • 469

            #6
            Originally posted by jvella
            I would like to take advantage of the patch to Eventlog handling but I am running the 1.6.2 version of Zabbix. Will the patch work with this version?
            Just try it
            The patch is rather small.
            The contents of patch files are not so difficult to understand so you could change the lines manually, if it doesn't work.

            HTH,

            Norbert.

            Comment

            • routinepursuit
              Junior Member
              • Mar 2009
              • 2

              #7
              How do I apply the patch, need noob instructions

              How do I apply the patch, need noob instructions.

              Thanks

              Comment

              • NOB
                Senior Member
                Zabbix Certified Specialist
                • Mar 2007
                • 469

                #8
                Originally posted by routinepursuit
                How do I apply the patch, need noob instructions.

                Thanks
                OK. In the patch you'll see (first line) that the patch is for 1.6.1.
                So, you have to unpack the sources for zabbix-1.6.1

                somewhere, say
                $HOME/zabbix-1.6.1
                with
                cd $HOME
                tar xzvf zabbix-1.6.1.tar.gz
                Then copy the patch file (eventlog.patch) in that directory, change
                to it with
                cd $HOME/zabbix-1.6.1
                and run the patch tool
                patch -p1 <eventlog.patch
                I am not sure, whether -p1 is right. If patch asks you which file to
                patch, try entering
                src/zabbix_agent/active.c

                If it still does not work, open the patch file with your favorite editor.
                The lines starting with @@ contain the line numbers.
                Remove the lines starting with - from the source and add the ones
                starting with a +.

                It is possible, that the patch will work with the 1.6.2 sources, but I
                didn't check it and I have implemented a different approach for us,
                so my interest in this patch is not that great

                We don't use any 1.6.x release for production purposes, yet, anyway.
                But it is recommended that you use 1.6.2 or one of the nightly builds for
                Pre-1.6.x (stable).

                HTH

                Norbert.
                Last edited by NOB; 20-03-2009, 16:41. Reason: Added more details

                Comment

                • xs-
                  Senior Member
                  Zabbix Certified Specialist
                  • Dec 2007
                  • 393

                  #9
                  Nice work!, the events feature is suddenly usable

                  @devs, will this be implemented in upstream? (pretty please with sugar on top)

                  Comment

                  • Danny
                    Junior Member
                    • May 2009
                    • 4

                    #10
                    event log filtering

                    Hi,

                    I'm running Zabbix 1.6.4 with agent 1.6.4.
                    Can anyone show an example how to get rid of these TermServDevices-Errors 1111?

                    Thanks in advance!

                    Comment

                    • jimbobjoe
                      Junior Member
                      • Dec 2007
                      • 6

                      #11
                      Was this ever included in the new agent releases

                      Was wondering if this patch was included from this time forward in the agent releases. Would be a great asset for windows event log troubleshooting.

                      Thanks
                      Jim

                      Comment

                      • claudio
                        Junior Member
                        • Aug 2009
                        • 11

                        #12
                        it has been included in the last Alpha version!
                        Last edited by claudio; 03-11-2009, 21:19.

                        Comment

                        • jimbobjoe
                          Junior Member
                          • Dec 2007
                          • 6

                          #13
                          Thanks

                          Claudio: We are testing the Alpha now. Looks solid so far in our test env. Will try the event log monitoring soon. Thanks a lot for the update.

                          Comment

                          • claudio
                            Junior Member
                            • Aug 2009
                            • 11

                            #14
                            You're welcome! Please let us know how it is going. We're going for a large deployment and I don't feel like using the Alpha version, but that feature is really a killer one for us.

                            Comment

                            • Robert Wagnon
                              Member
                              • Jan 2008
                              • 47

                              #15
                              How to use

                              How is it used? I can't find it in them manual.

                              Comment

                              Working...