Ad Widget

Collapse

Issue not alerting when proxy goes down?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • killmasta93
    Member
    • Oct 2019
    • 45

    #1

    Issue not alerting when proxy goes down?

    Hi,
    I was wondering if someone else has had this issue before, Currently I have zabbix proxy on Site B But when Site B goes down with the proxy i dont get an alert it just shows unknown. Currently running 5.0.2 Zabbix

    I already tried these tutorials but didnt seem to work. not sure what i missed?





    Thank you

  • NilsA
    Senior Member
    • Sep 2020
    • 102

    #2
    In my configuration my Zabbix server is monitoring each Zabbix proxy in the different networks. This is the workaround I have implemented for this problem.

    Since the hosts of the remote network are monitored by the proxy, the server waits for information from the proxy. If the connection is down, no information can come in of course.
    This makes sense, because the hosts might not be offline only because the connection to the remote network is down.

    Comment

    • killmasta93
      Member
      • Oct 2019
      • 45

      #3
      Thanks for the reply, the issue is that when the proxy goes down instead of alerting me it just shows hosts as unknown so not sure how you configured yours?

      Comment

      • NilsA
        Senior Member
        • Sep 2020
        • 102

        #4
        I just apply the template "Template App Zabbix Proxy" and my own template for Zabbix agent hosts "Basic Monitoring Template" to it.

        I added an item and a new trigger to the Zabbix Proxy application template to see how many processes are runnning of Zabbix Proxy (item key is "proc.num[zabbix_proxy]"). The trigger expression is "{proc.num[zabbix_proxy].last()}=0 or {proc.num[zabbix_proxy].nodata(3m)}=1".

        My "Basic Monitoring Template" has a Zabbix Agent item with the key "agent.ping" and the trigger expression is "{agent.ping.nodata(2m)}=1".

        So when a proxy loses connection or, for whatever reason, the service stops running, I will see it on my dashboard.
        You might want to check out some other dashboard functions if you are still on the default one. I recommend at least one map with a "host group elements" element for each remote location and whatever else is most important for you.

        Comment

        • Hamardaban
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • May 2019
          • 2713

          #5
          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
          delay - how long collected values are unsent, calculated as "proxy delay" (difference between the current proxy time and the timestamp of the oldest unsent value on proxy) + ("current server time" - "proxy lastaccess")

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

          fuzzytime() trigger function can be used to check availability of proxies.
          This item is always p
          Last edited by Hamardaban; 18-11-2020, 19:07.

          Comment

          • killmasta93
            Member
            • Oct 2019
            • 45

            #6
            Originally posted by NilsA
            I just apply the template "Template App Zabbix Proxy" and my own template for Zabbix agent hosts "Basic Monitoring Template" to it.

            I added an item and a new trigger to the Zabbix Proxy application template to see how many processes are runnning of Zabbix Proxy (item key is "proc.num[zabbix_proxy]"). The trigger expression is "{proc.num[zabbix_proxy].last()}=0 or {proc.num[zabbix_proxy].nodata(3m)}=1".

            My "Basic Monitoring Template" has a Zabbix Agent item with the key "agent.ping" and the trigger expression is "{agent.ping.nodata(2m)}=1".

            So when a proxy loses connection or, for whatever reason, the service stops running, I will see it on my dashboard.
            You might want to check out some other dashboard functions if you are still on the default one. I recommend at least one map with a "host group elements" element for each remote location and whatever else is most important for you.

            Thanks for the reply is there a possibility you can attach the pictures? of the config? because i see other options like type units it be nice to see the picture of the config
            Last edited by killmasta93; 02-12-2020, 23:08.

            Comment

            • NilsA
              Senior Member
              • Sep 2020
              • 102

              #7
              Here you go:
              Click image for larger version

Name:	item.PNG
Views:	4958
Size:	33.6 KB
ID:	415273

              Comment

              • jvedman
                Junior Member
                • Apr 2021
                • 1

                #8
                After several failed attempts at getting this set up for myself, I thought I would share what I think is the correct solution from start to finish:

                1. You have to create an item on a host. I suppose you could do that on your Zabbix server itself, but I created them on systems being monitored by each proxy I wanted alerts about:
                Key Fields:
                Name: [Customer] Zabbix Proxy Online
                Type: Zabbix Internal
                Key: zabbix[proxy,"proxyName",lastaccess]
                Units: s [seconds]
                Applications: General

                2. After creating the item, create a trigger on the same host:
                Key fields:
                Severity: I set all of mine to high
                Problem Expression: Use the Add and Select buttons to find the Item you just created
                Use the Function drop-down to select fuzzytime
                Last of (t): I set to 120 for most of mine, though I did get some false alerts for one location and used 180 there
                Result: = 0
                OK Event Generation: Recovery Expression:
                Essentially the same as the Problem Expression except (make sure you pick fuzzytime again!):
                Last of (t): 60
                Result: = 1

                3. Test by stopping the proxy service that you want to monitor.

                After that, you should be able to easily create you action against that trigger.

                I tried to attach images of the item and trigger, but I'm not sure if that worked or not.

                Good luck!

                Comment

                • markfree
                  Senior Member
                  • Apr 2019
                  • 868

                  #9
                  This kind of item key doesn't seem ideal for Proxy availability check, but it works.
                  Collecting proxy data using zabbix internal key "zabbix[proxy,...,lastaccess]" results in a
                  timestamp of last heart beat message received
                  , not in proxy's last heartbeat age.

                  For example, "lastaccess" parameter collects this data:
                  Click image for larger version  Name:	proxy_raw_timestamp.png Views:	0 Size:	4.4 KB ID:	438271

                  If using an item's unit of seconds (s), those timestamp values are automatically converted to years, months and so on.
                  Click image for larger version  Name:	proxy_converted_timestamp.png Views:	0 Size:	6.7 KB ID:	438272

                  When using proxy key with "lastaccess" parameter, "fuzzytime()" function actually works and you are able to receive alerts when there's an unavailable proxy.
                  Something like this:
                  Code:
                  fuzzytime(/Zabbix Proxy/zabbix[proxy,"unique",delay],60)=1
                  But keep in mind that, custom event names and operational data might display a weird value.
                  Click image for larger version  Name:	proxy_wrong_data.png Views:	0 Size:	6.8 KB ID:	438273

                  If changing item key parameter to "delay", data is more consistent with actual proxy's heartbeat.
                  It seems that, when using "delay" parameter, values represent the real proxy's last seen time.
                  Click image for larger version  Name:	proxy_raw_seen_graph.png Views:	0 Size:	9.1 KB ID:	438275

                  This way, the trigger should be changed like this:
                  Code:
                  last(/unique/zabbix[proxy,"{HOST.HOST}",delay],#1)>=60
                  And event values are more consistent as well.

                  Click image for larger version  Name:	proxy_better_data.png Views:	0 Size:	6.8 KB ID:	438274

                  I could not find any out-of-the-box template with some kind of "proxy.ping" item, though. Not sure why...
                  Last edited by markfree; 19-01-2022, 23:42. Reason: Copy-paste mistake. Ajusted trigget function to use "last()"

                  Comment

                  Working...