Ad Widget

Collapse

User macro in calculated item?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jvilimek
    Junior Member
    • Apr 2015
    • 2

    #1

    User macro in calculated item?

    Hello,
    can anybody please advise?

    I have this calculated field in a template:
    last("{$DB_CORE}:AVG_CPU",0,60)
    (it should go to host DB_CORE, grab value of the item AVG_CPU that is 60s old)

    However the field in the host AAA with this template with correctly configured MACRO (DB_CORE = dbCoreXXX) is complaining about not finding the item "AAA:{$DB_CORE}:AVG_CPU". If I change the formula to be without a macro like
    last("dbCoreXXX:AVG_CPU",0,60)
    it works...

    My setup is, that we have 3 databases (CORE, WEB,..) for several regions (EMEA, CIS,...) so the host for each database is like dbCoreEMEA. This host (via template) has items like AVG_CPU etc.

    I want to have a screen for each region, where I would be able to see all content delivery servers, databases... and summary data of them.

    So I created a template (REGION) and a host of this template (EMEA, CIS...). On hosts I have different settings (like the name of CORE db etc) in MACROs.
    In the template I have aggregated items (for content delivery servers) and this is working well. I want to add a calculated field(s) for each of the database type (CORE, WEB..) and item we want to monitor (CPU, SIZE,...).

    Questions:
    1. can I use MACROs in calculated fields to change the host according to different hosts the field is on?
    2. if not, what would be the best setup in above described case? I could have use aggregate fields, but that would mean for me to create like 3*5 = 15 new groups...

    Thanks a lot!
    JV
  • jvilimek
    Junior Member
    • Apr 2015
    • 2

    #2
    Can anyone please advise?

    Comment

    • tousland82
      Junior Member
      • Apr 2015
      • 6

      #3
      For calculated fields zabbix doesn´t allow macros.
      I read it in the zabbix documentation 2.2

      Comment

      Working...