Ad Widget

Collapse

Prevent the LLD from running every master item update

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • markfree
    Senior Member
    • Apr 2019
    • 868

    #1

    Prevent the LLD from running every master item update

    I have an SNMP Walk item to get statistics from some devices. It runs every 1 minute and is the master item of an LLD.
    • Master item - Walk DNS Monitoring
    • Dependent LLD - Discovery of DNS Average Latency

    The SNMP table returns the statistics values without a value "name", meaning that there's no value name index. The Walk item receives a list similar to this:
    Code:
    .1.3.6.1.4.1.7779.3.1.1.2.1.3.1.1.0 = INTEGER: 0
    .1.3.6.1.4.1.7779.3.1.1.2.1.3.1.2.1.1.0 = INTEGER: 0
    .1.3.6.1.4.1.7779.3.1.1.2.1.3.1.2.2.1.0 = INTEGER: 0
    .1.3.6.1.4.1.7779.3.1.1.2.1.3.1.2.3.1.0 = INTEGER: 0
    .1.3.6.1.4.1.7779.3.1.1.2.1.3.1.3.1.1.0 = INTEGER: 0
    .1.3.6.1.4.1.7779.3.1.1.2.1.3.1.3.2.1.0 = INTEGER: 0
    .1.3.6.1.4.1.7779.3.1.1.2.1.3.1.3.3.1.0 = INTEGER: 0
    The first object ( .1.3.6.1.4.1.7779.3.1.1.2.1.3.1.1.0 ) indicates that the statistics are active. The other objects are the statistics themselves.

    The first goal is to run the LLD only when the first object is "1" (active). To do this, I can create a simple preprocessing step to validate this value.
    If the value is 1, go through. If not, discard the value.
    Click image for larger version  Name:	lld_statistics_validation.png Views:	0 Size:	9.6 KB ID:	501029

    This way, the LLD should only run when the statistics are active.

    After that, the second preprocessing step should be "SNMP walk to JSON" to convert the values into an LLD JSON. With this, the item prototypes can already be created.
    Click image for larger version  Name:	lld_statistics_to_json.png Views:	0 Size:	7.5 KB ID:	501030

    Now the hard stuff...
    Since these are host statistics that are constantly updating, the master item should have different values with each query
    .
    The SNMP table does not provide an index for value names, so, even if I add a third preprocessing step to "discard unchanged values with hearbeat", the LLD should be executed on each run of the master item because the values will be different.

    My question is: in this context, how to prevent the LLD from running every minute when statistics are active?
    Any thoughts?
    Last edited by markfree; 25-03-2025, 14:59.
Working...