Ad Widget

Collapse

Can an item be monitored only at certain circumstance?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ykdhan
    Junior Member
    • Jul 2020
    • 14

    #1

    Can an item be monitored only at certain circumstance?

    I am using Zabbix 5. As long as I know, there are item dependencies and trigger dependencies.
    Other than that, I am curious if I can set a condition for an item to be monitored only at that condition.

    For example, if one firewall device gives 0 ping back, then I want to start monitoring (or sending pings) to a L2 device which is above that firewall device.
    So, my L2 device will be monitored not all the time but only when I get a trigger.

    Is such functionality available in Zabbix?
  • Hernandes Martins
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Apr 2011
    • 900

    #2
    No, not condition available in item, condition just on trigger.


    Regards
    __

    Att.
    Hernandes Martins - Zabbix Trainer

    Zabbix Brazil Partner - www.luniobr.com

    Zabbix Brazil Community - www.zabbixbrasil.org

    Blog: hernandesmartins.blogspot.com.br

    Skype: hernandss
    Telegram: @MrHernandes

    Español
    Facebook: facebook.com/groups/zabbixlatam
    Telegram: https://t.me/ZabbixEspañol

    Português
    Facebook: facebook.com/groups/zabbixbrasil/
    Telegram: https://t.me/ZabbixBrasil

    Comment


    • ykdhan
      ykdhan commented
      Editing a comment
      Thank you for clarifying that.
  • ripperSK
    Member
    • Jul 2019
    • 42

    #3
    you can code an API call to enable / disable an item in a script and have this script called after specific trigger.

    Effort vs. result of this is questionable and secondly - there's no harm in collecting an item data that you just don't use.

    If you ping an IP that's unreachable - it's just item values - no harm done...

    Comment


    • ykdhan
      ykdhan commented
      Editing a comment
      I am worried about wasting cpu and memory of zabbix server.
      I need to monitor about 7000 FW devices and also keep track of L2 devices as well because some problems could come from or dependent on L2s.
      Then, I will have 14000 devices (items) to ping.
  • ripperSK
    Member
    • Jul 2019
    • 42

    #4
    then I suggest you code an API call to enable /disable a certain host after a certain trigger is fired :



    alternatively you can distribute your zabbix server load by using zabbix proxies that will ping your equipment instead of the server.

    I would only suggest that you look into monitoring via SNMP / SNMP traps - where a firewall can report if a port where L2 switch is connected went down or not.

    Comment


    • ykdhan
      ykdhan commented
      Editing a comment
      Thank you so so much! Your advice is great. I will try using zabbix proxies and if there is too much load I will code an API call.
  • ykdhan
    Junior Member
    • Jul 2020
    • 14

    #5
    ripperSK

    At this moment, I have a question related to the API call action.
    I am not sure if this is true but I have heard that Zabbix does load configurations such as item ability (enabled, disabled) with 1 minute interval.
    If this is true, even though I call an API call to enable or disable certain item, it won't apply to Zabbix server right away. There will be maximum 1 minute delay to execute the call.
    Is there a way to reduce the interval or is there a way to force-load such configuration? Would this cause another cpu load?
    Thank you!

    Comment

    • ripperSK
      Member
      • Jul 2019
      • 42

      #6
      I am unaware of such limitation or interval. If you feel like zabbix server is requesting an item that you disabled use runtime argument :

      Code:
       zabbix_server -R config_cache_reload
      this forces server to re-read all the configured items and also their enabled/disabled state. It is also available for zabbix proxy.

      secondly I advise you to enable / disable whole host using the API as it's easier for debugging purposes and immediately visible in the web interface.

      Comment


      • ykdhan
        ykdhan commented
        Editing a comment
        Awesome! This helps a lot. I will enable/disable the whole host instead of item. Thank you so much.
    Working...