Ad Widget

Collapse

Managing Data Queue Alerts: Separate Triggers for Zabbix Server and Zabbix Proxy

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dimkaslav
    Junior Member
    • Aug 2023
    • 2

    #1

    Managing Data Queue Alerts: Separate Triggers for Zabbix Server and Zabbix Proxy

    Hello!

    I have a separate network of PCs, the data from which is collected through a Zabbix Proxy and sent to a Zabbix Server. There are PCs whose users may be absent at the workplace today but work tomorrow. Due to this, these PCs go into sleep mode, and then the Zabbix active agent doesn't send data to the server. As a result, a trigger notifies about a data queue of more than 10 minutes. Is it possible to create 2 separate triggers that will alert about the data queue for the Zabbix Server and Zabbix Proxy separately? This way, I could raise the threshold value for data not being collected specifically on the proxy rather than in the entire Zabbix. Or perhaps there are other scenarios for collecting data from PCs?
  • Answer selected by dimkaslav at 30-08-2023, 09:19.
    dimkaslav
    Junior Member
    • Aug 2023
    • 2

    I would like to express my gratitude to everyone; I managed to resolve the issue!

    Internal checks using Zabbix [queue, 10m] were providing results for the overall queue, including the queue from the proxy server. The goal was to have the trigger activate only based on the queue from hosts directly connected to the Zabbix server, excluding data from the proxy queue. Here's how I achieved this:
    • I collected data about the proxy queue using the item zabbix[queue, 10m] on the proxy server host.
    • Using a calculated item, I subtracted the proxy queue from the overall queue, obtaining the necessary data.
    • Based on the obtained data, I set up a standard trigger for queues lasting more than 10 minutes.
    Click image for larger version

Name:	image.png
Views:	542
Size:	11.3 KB
ID:	469551
    Click image for larger version

Name:	image.png
Views:	562
Size:	12.5 KB
ID:	469550
    Thank you again for your support throughout this process!

    Comment

    • Daugava
      Junior Member
      • Jan 2023
      • 4

      #2
      Hi.

      As far as i can see, Zabbix don't store info about queue status in tables. However, you can calculate the number of inactive hosts from a proxy using SQL, make UserParamater from that and used it together with zabbix[queue] in your trigger.


      set @T= unix_timestamp()-600; -- last 10 minutes
      select count(1)
      from hosts h
      where h.proxy_hostid is not null -- hosts from proxies
      and not exists -- can't find items younger than @T
      (select 1
      from items i
      join history_uint u
      on u.itemid=i.itemid
      and u.clock>@T
      where i.hostid=h.hostid
      and i.name='Host local time' -- put your favorite item name here
      limit 1);​​
      Last edited by Daugava; 29-08-2023, 10:41.

      Comment

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

        #3
        There are internal items you can use to collect such data https://www.zabbix.com/documentation...types/internal

        Comment

        • dimkaslav
          Junior Member
          • Aug 2023
          • 2

          #4
          I would like to express my gratitude to everyone; I managed to resolve the issue!

          Internal checks using Zabbix [queue, 10m] were providing results for the overall queue, including the queue from the proxy server. The goal was to have the trigger activate only based on the queue from hosts directly connected to the Zabbix server, excluding data from the proxy queue. Here's how I achieved this:
          • I collected data about the proxy queue using the item zabbix[queue, 10m] on the proxy server host.
          • Using a calculated item, I subtracted the proxy queue from the overall queue, obtaining the necessary data.
          • Based on the obtained data, I set up a standard trigger for queues lasting more than 10 minutes.
          Click image for larger version

Name:	image.png
Views:	542
Size:	11.3 KB
ID:	469551
          Click image for larger version

Name:	image.png
Views:	562
Size:	12.5 KB
ID:	469550
          Thank you again for your support throughout this process!

          Comment

          Working...