Ad Widget

Collapse

Configure Custom intervals using Terraform

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MarcoUK
    Junior Member
    • Oct 2021
    • 26

    #1

    Configure Custom intervals using Terraform

    HI,
    I configured my item using Terraform provider https://registry.terraform.io/provid...ces/item_agent and works fine.

    Code:
    resource "zabbix_item_agent" "verify" {
    hostid = data.zabbix_template.template.id
    key = "verify.failures"
    name = "verify"
    valuetype = "unsigned"
    
    delay = "5m"
    history = "7d"
    trends = "365d"
    applications = [zabbix_application.application.id]
    
    depends_on = [
    data.zabbix_template.template
    ]
    }
    Now I see that this check start every 5 minutes but from (for each hour) 02,07.12.17,...etc is it possible to force it to start every 5 minutes but from 00.05,10,15,...etc?

    I read the doc https://www.zabbix.com/documentation..._preprocessing
    and if I understood I can set Custom intervals using variable
    Code:
    delay
    But I tried using
    Code:
    delay = "${5m}/${01-7,00:00-24:00}"
    or
    Code:
    delay = "5m/01-7,00:00-24:00"
    but it doesn't work.
    Someone used it or have any advise to how can I solved my problem?

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

    #2
    There is plenty of examples in that page .. https://www.zabbix.com/documentation...stom_intervals
    Nowhere there can I see example using any of your proposed formats...

    Comment

    • MarcoUK
      Junior Member
      • Oct 2021
      • 26

      #3
      how can I set it?

      Comment

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

        #4
        That documentation page did not help you ?
        Setting delay to "0;m/5" maybe? 0 - because you need to disable original delay and m/5 tells it to have scheduled interval of 5 minutes.

        Everythig according to api documentation..
        delay
        (required)
        string Update interval of the item. Accepts seconds or a time unit with suffix (30s,1m,2h,1d).
        Optionally one or more custom intervals can be specified either as flexible intervals or scheduling.
        Multiple intervals are separated by a semicolon.

        Comment

        • MarcoUK
          Junior Member
          • Oct 2021
          • 26

          #5
          Originally posted by cyber
          That documentation page did not help you ?
          Setting delay to "0;m/5" maybe? 0 - because you need to disable original delay and m/5 tells it to have scheduled interval of 5 minutes.

          Everythig according to api documentation..
          delay
          (required)
          string Update interval of the item. Accepts seconds or a time unit with suffix (30s,1m,2h,1d).
          Optionally one or more custom intervals can be specified either as flexible intervals or scheduling.
          Multiple intervals are separated by a semicolon.
          It works! thanks a lot!

          Comment

          Working...