Ad Widget

Collapse

template of template (user-defined macros usage)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • apostle
    Junior Member
    • Feb 2012
    • 11

    #1

    template of template (user-defined macros usage)

    Dear colleagues good afternoon.

    There's task to monitor RAID-array statuses on servers. Several arrays may exist on the server in general.

    Zabbix server and agents version is 1.8.10

    For example, I need to monitor Adaptec 3405. I didn't find another solution except to monitor it using SNMP (and SNMP-traps for events). So there're SNMP OID list with values (with 2 arrays as trivial variant):

    Code:
    Name/OID: ausArrayIndex.1; Value (Integer): 1
    Name/OID: ausArrayIndex.2; Value (Integer): 2
    Name/OID: ausArrayName.1; Value (OctetString): RAID1
    Name/OID: ausArrayName.2; Value (OctetString): Device 1
    Name/OID: ausArrayCapacity.1; Value (Integer): 476150
    Name/OID: ausArrayCapacity.2; Value (Integer): 571381
    Name/OID: ausArrayType.1; Value (Integer): raid1 (4)
    Name/OID: ausArrayType.2; Value (Integer): volume (12)
    Name/OID: ausArrayStripeSize.1; Value (Integer): -1
    Name/OID: ausArrayStripeSize.2; Value (Integer): -1
    Name/OID: ausArrayTaskStatus.1; Value (Integer): noTaskActive (3)
    Name/OID: ausArrayTaskStatus.2; Value (Integer): noTaskActive (3)
    Name/OID: ausArrayTaskCompletion.1; Value (Integer): 100
    Name/OID: ausArrayTaskCompletion.2; Value (Integer): 100
    Name/OID: ausArrayTaskPriority.1; Value (Integer): low (6)
    Name/OID: ausArrayTaskPriority.2; Value (Integer): low (6)
    Name/OID: ausArrayHostingControllerType.1; Value (Integer): physicalController (1)
    Name/OID: ausArrayHostingControllerType.2; Value (Integer): physicalController (1)
    Ideally I want to have one template to get SNMP table at whole for all arrays.
    I didn't find similar solution, so another way was used:

    * I've created paretn template AdaptecRAID with some items like this:
    item desc: Array{$ARRAYNUM}Level
    SNMP OID: .1.3.6.1.4.1.795.14.1.1000.1.1.4.{$ARRAYNUM}
    item key: ArrayLevel[*] just now, ( but I try ArrayLevel{$ARRAYNUM} and ArrayLevel[{$ARRAYNUM}] and ArrayLevel[{\$ARRAYNUM}] )
    and have defined {$ARRAYNUM} equal to 1 at template level.
    * child templates AdaptecArray1 and AdaptecArray2, which are linked to AdaptecRAID, and I have redefined macro {$ARRAYNUM} equal to 1 and 2 accordingly.

    After I'm trying to link those child templates to the host with 2 arrays and receive error of all item keys unique. By the way item descriptions and OID subsequent macro successfully.

    It may be that I follow wrong way and easiest solution exist. So please help me and give advise to solve for this situation. Thanks.
Working...