Ad Widget

Collapse

Conditional monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mackek2
    Junior Member
    • Jul 2012
    • 3

    #1

    Conditional monitoring

    I think this is pretty simple conceptually, but I can't figure out if it is technically possible.

    I only want to monitor something when the condition of another item is a value.

    Specifically, I only want to monitor interface I/O, errors, ect.. if the interface is 'up'.

    Does anyone know if this is possible? Can triggers or actions enable or disable monitoring of something?
  • Yello
    Senior Member
    • Apr 2011
    • 309

    #2
    Originally posted by mackek2
    Specifically, I only want to monitor interface I/O, errors, ect.. if the interface is 'up'.
    Is this to avoid false triggering? Assuming that is the case I'd have a trigger for when an interface is down and make any other triggers related to interface when when it is up dependent upon the interface up/down trigger. That is, they will only fire when the interface is up.

    Stopping collection, which is what you might be saying isn't a good idea.


    Regards,
    David

    Comment

    • mackek2
      Junior Member
      • Jul 2012
      • 3

      #3
      Yes, I was asking about stopping collection. Why is it considered not a good idea?

      Having even just a few switches with only a few of the ports in use most of the time, creates a fairly significant increase in items that aren't changing.

      Comment

      • Yello
        Senior Member
        • Apr 2011
        • 309

        #4
        Originally posted by mackek2
        Yes, I was asking about stopping collection. Why is it considered not a good idea?

        Having even just a few switches with only a few of the ports in use most of the time, creates a fairly significant increase in items that aren't changing.
        Well, if triggers could turn off the items feeding them with data how would collection ever restart? Without input data, even data that isn't changing much, zabbix is lifeless and inert.

        Many many items types in zabbix don't change most of the time. But also, the value of collected data doesn't only lie in whether it is forcing a trigger or not, ie. changing. The timeseries itself also has value. In your case that series would show when interfaces have been enabled/disabled over time.

        It's up to you when, how and if you collect. It's possible to do what you're asking for via the api. Were I working at your site and if I were unable to convince others of the pointlessness of the exercise my starting approach would be to have an interface up/down trigger raise an action to call an external script which would disable the other items & triggers for that interface via the api and vice versa when the interface comes back up. Of course, how the script would know that the interface is permanently down vs being down because of a legitimate issue would need to be worked out.

        There are other approaches too but I don't want to waste too much forum space on this.


        Regards,
        David

        Comment

        • mackek2
          Junior Member
          • Jul 2012
          • 3

          #5
          Hi David,

          Thanks for the help.

          When the interface goes down, I don't want to stop monitoring everything, just the things that I know can't change when an interface is down. I'll spend a few minutes seeing if I can make it work, but I guess like you suggest, it is probably not worth a whole lot of effort.

          Comment

          • blessKage
            Junior Member
            • Aug 2018
            • 2

            #6
            Hello,

            I know this is an old thread, but I'm still looking for such a approach. Maybe someone have found a solution for this 6 years after last post in this thread.
            I am looking how is it possible to create dependencies in zabbix-native way to disable tens of items (and some discovery rules/items prototypes) in a template when a trigger fires as a 'Problem'. And enable them again when it 'Recovers'.

            Thank you.

            Comment

            • blessKage
              Junior Member
              • Aug 2018
              • 2

              #7
              Server and proxies version is the latest - Zabbix 3.4.12

              Comment

              Working...