Ad Widget

Collapse

Function 'str' in beta5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • disparo
    Junior Member
    • Sep 2005
    • 29

    #1

    Function 'str' in beta5

    Just now examined changelog and founded this:

    Function 'str' will work for LOG files.

    Is it means, what zabbix can now monitor LOG files for the purpose of some strings?

    How can i do that?

    Thanks!
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    For example, trigger "Error in syslog" may look like this:

    {host:log[/var/log/syslog].str(error)}=1

    The function returns 1 if matches, 0 - otherwise.

    You may also use function regexp:

    {host:log[/var/log/syslog].regexp(error)}=1
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • [cc]smart
      Junior Member
      • May 2005
      • 25

      #3
      Old post, but still the right place...
      How do i have to define the item in the first place.
      The way i tried yields "not supported". These are my settings:

      Type: Zabbix agent
      Key: log[/var/log/messages]
      Type of Information: Log
      Status: Monitored
      Log time format: <empty>

      What am i doing wrong ?

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        The information may be useful for you: http://www.zabbix.com/manual/v1.1/tutorials.php

        Item type is incorrect. Must be ZABBIX agent (active).
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • [cc]smart
          Junior Member
          • May 2005
          • 25

          #5
          How to reactivate (change to state "monitored") an item in state "not supported" when it's provided by a template ?

          Comment

          • Alexei
            Founder, CEO
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2004
            • 5654

            #6
            Update item of the template. It would be possible to update a single item in next release.
            Alexei Vladishev
            Creator of Zabbix, Product manager
            New York | Tokyo | Riga
            My Twitter

            Comment

            • [cc]smart
              Junior Member
              • May 2005
              • 25

              #7
              The template stayed in "active" though.
              I tried the workaround of deactive, wait, activate, but it seems this was not effective to make the server retry.

              Comment

              • [cc]smart
                Junior Member
                • May 2005
                • 25

                #8
                I have retried changing state, to be sure, this time with server disabled. When i disable / enable the trigger in the template, the on in the host is not reactivated. If i got this right, the one in the host shuld get activated, too.

                Comment

                Working...