Ad Widget

Collapse

no alert when zabbix proxy no running

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chifong.chan
    Junior Member
    • Apr 2020
    • 2

    #1

    no alert when zabbix proxy no running

    Hi all,

    I am using Zabbix 4.4 and have setup a zabbix proxy in passive mode.

    I am facing a problem that when my zabbix proxy is dead, I have receive no alert and there's no problem(For both zabbix proxy and monitored host under this proxy) being displayed on the problem page.

    I do have the default trigger setup for agent no reachable for 5mins. but it didn't get trigger.

    Can anyone help me please to figure out what may be the problem?

    Thanks,
    Chi
  • chifong.chan
    Junior Member
    • Apr 2020
    • 2

    #2
    Originally posted by splitek
    You must add item and trigger for that.
    Look here: https://www.zabbix.com/documentation...types/internal

    zabbix[proxy,<name>,<param>]
    Information about Zabbix proxy. Integer. name: proxy name

    Valid values for param are:
    lastaccess - timestamp of last heart beat message received from proxy

    Example:
    ⇒ zabbix[proxy,"Germany",lastaccess]

    fuzzytime() trigger function can be used to check availability of proxies.
    This item is always processed by Zabbix server regardless of host location (on server or proxy).
    Or use nodata() in trigger on data from agent.
    Thanks a lot for the prompt reply. Will try on this method.

    Comment

    • petr.114
      Junior Member
      • Apr 2021
      • 6

      #3
      I made it work.
      Someone may find this helpful when searching anwers for monitoring zabbix proxy availability

      Create new item in Template App Zabbix proxy:
      Name: Last time data received from proxy
      Type: Zabbix internal
      Key: zabbix[proxy,{HOST.HOST},delay]
      Type of information: Numeric (unsigned)
      Unis: s
      Update interval: 1m
      Applications: Zabbix proxy

      Create new trigger in Template App Zabbix proxy:
      Name: {HOST.HOST} Zabbix proxy unavailable
      Severity: High
      Expression: {Template App Zabbix Proxy:zabbix[proxy,{HOST.HOST},delay].last(#1)}>60

      You may want to edit some options like update interval or time in trigger expression.
      To work everything properly, zabbix agent need to have same name as proxy itself.

      Comment

      • RaulChiarella
        Member
        • Apr 2021
        • 59

        #4
        Originally posted by petr.114
        I made it work.
        Someone may find this helpful when searching anwers for monitoring zabbix proxy availability

        Create new item in Template App Zabbix proxy:
        Name: Last time data received from proxy
        Type: Zabbix internal
        Key: zabbix[proxy,{HOST.HOST},delay]
        Type of information: Numeric (unsigned)
        Unis: s
        Update interval: 1m
        Applications: Zabbix proxy

        Create new trigger in Template App Zabbix proxy:
        Name: {HOST.HOST} Zabbix proxy unavailable
        Severity: High
        Expression: {Template App Zabbix Proxy:zabbix[proxy,{HOST.HOST},delay].last(#1)}>60

        You may want to edit some options like update interval or time in trigger expression.
        To work everything properly, zabbix agent need to have same name as proxy itself.
        YO! Man, you re a savior.
        But in my case this only worked if the HOST had the same name as the proxy in Configuration > Proxies.
        If i change the host to another name that does not match Proxy hostname the key zabbix[proxy,{HOST.HOST},lastaccess] doesnt work...

        But thanks mate! Thanks a lot!!!

        Comment

        • DRO
          Junior Member
          • Jan 2022
          • 7

          #5
          Originally posted by petr.114
          I made it work.
          Someone may find this helpful when searching anwers for monitoring zabbix proxy availability

          Create new item in Template App Zabbix proxy:
          Name: Last time data received from proxy
          Type: Zabbix internal
          Key: zabbix[proxy,{HOST.HOST},delay]
          Type of information: Numeric (unsigned)
          Unis: s
          Update interval: 1m
          Applications: Zabbix proxy

          Create new trigger in Template App Zabbix proxy:
          Name: {HOST.HOST} Zabbix proxy unavailable
          Severity: High
          Expression: {Template App Zabbix Proxy:zabbix[proxy,{HOST.HOST},delay].last(#1)}>60

          You may want to edit some options like update interval or time in trigger expression.
          To work everything properly, zabbix agent need to have same name as proxy itself.
          This is what's happening for me.. Any ideas? Obviously I don't want to hardcode a proxy name in there. I need it to be dynamic so it can be applied via the template to multiple remote proxies without having to specify the name for each. Also i use remote app proxy template since these are all remote of the server in the NOC.


          I figured it out, gotta love CASE SENSTIVE issues..
          Attached Files
          Last edited by DRO; 14-02-2022, 00:07.

          Comment

          • RaulChiarella
            Member
            • Apr 2021
            • 59

            #6
            Originally posted by DRO

            This is what's happening for me.. Any ideas? Obviously I don't want to hardcode a proxy name in there. I need it to be dynamic so it can be applied via the template to multiple remote proxies without having to specify the name for each. Also i use remote app proxy template since these are all remote of the server in the NOC.


            I figured it out, gotta love CASE SENSTIVE issues..
            Hello, sorry i didn't see it sooner.
            Glad it worked well for you!

            Comment

            • Guntis
              Junior Member
              • Mar 2019
              • 18

              #7
              It's weird that this is not included by default. Provided instructions didn't work for me, I suppose template name has changed. With little modification I got it working on latest Zabbix 6.2 version.

              1) If you haven't already - create host entry with Host name that matches zabbix proxy name, apply "Zabbix proxy health" template.

              Create new item in "Zabbix proxy health" template:
              Name: Last time data received from proxy
              Type: Zabbix internal
              Key: zabbix[proxy,{HOST.HOST},delay]
              Type of information: Numeric (unsigned)
              Unis: s
              Update interval: 1m

              Create new trigger in "Zabbix proxy health" template​:
              Name: Zabbix proxy is unavailable (missed heartbeat for 1min)
              Severity: High
              Expression: last(/Zabbix proxy health/zabbix[proxy,{HOST.HOST},delay])>60

              Trigger will fire within one minute, working great for me.

              TODO: should add another trigger for NODATA, in case item is failing to retrieve any data.

              Comment

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

                #8
                Originally posted by Guntis
                TODO: should add another trigger for NODATA, in case item is failing to retrieve any data.
                Just as a little note...
                This item is always processed by Zabbix server regardless of host location (on server or proxy).


                So if it fails, then your server is dead, not that it fails to get something from your proxy... So no need for nodata trigger...

                What concerns the "why is it not there by default".. well, your proxy name does not have to match your host name. So it is not always clear, what host you need to use and what name you need to use. And as this item is actually queried from server, then it maybe should be part of server template? And then it would be nice to have an item, that returns all your proxies and you can then use it for a discovery, to create item per proxy... But there is no such item.. There is "zabbix[cluster,discovery,nodes]" but no "zabbix[proxy,discovery,nodes]" in some reason...

                Comment

                Working...