Connector Object References

Documentation under construction...

This page shows how to reference connector objects such as sources, entries, columns and files, etc. inside the YAML document.

Source Reference

Format

A Source can be referenced either with its full path or its relative path. A relative path can be used only if the referenced source is in the same monitor and same job as the current source.

Example

      mapping:
        source: ${source::monitors.disk_controller.discovery.sources.source_discovery}
        sourceDiscovery:
          type: tableJoin
          leftTable: ${source::monitors.enclosure.collect.sources.source_chassis} # full path for a source in another monitor
          rightTable: ${source::source_enclosure} # relative path
          leftKeyColumn: 1
          rightKeyColumn: 1

Entry Reference

Format

$<columnNumber>

Example

        source(3):
          type: http
          method: GET
          executeForEachEntryOf:
            source: ${source::monitors.enclosure.discovery.sources.source(2)}
            concatMethod: list
          path: /api/rest/StorageCenter/ScChassis/$2/PowerSupplyList

Column Reference

Format

$<columnNumber>

Example

      mapping:
        # PowerSupply
        # tableID;ID;DisplayName;objectType;enclosure/controllerID;deviceType
        source: ${source::monitors.power_supply.discovery.sources.source(4)}
        attributes:
          id: $2
          __display_id: $3
          hw.parent.type: $6
          hw.parent.id: $5
          name: $3

File Reference

Format

${file::<relativeFilePath>}

Example

   criteria:
    - type: commandLine
      commandLine: /bin/sh ${file::storman-drives.sh}
      expectedResult: Hard drive
      errorMessage: No Adaptec Controller with Physical Disks attached or not enough rights to execute arcconf.

Mono-Instance Reference

Format

${attribute::<attribute-key>}

Example

 collect:
      # Collect type is multi-instance
      type: monoInstance
      sources:
        source(1):
          type: commandLine
          commandLine: /bin/sh ${file::script.sh} ${attribute::id}
          keep: ^MSHW;
          separators: ;
          selectColumns: "2,3,4,5,6,7,8,9"

Translation Table Reference

Format

${translation::<translationTable>}

Example

    collect:
      # Collect type = multi-instance
      type: multiInstance
      sources:
        source(1):
          # Source(1) = connUnitSensorTable SNMP Table
          # ID;Status;Value;
          type: snmpTable
          oid: 1.3.6.1.4.1.1588.2.1.1.1.1.22.1
          selectColumns: "ID,3,4"
          computes:
            # Translate the first column status into a PATROLStatus
            # ID;PatrolStatus;Value;
          - type: translate
            column: 2
            translationTable: ${translation::SensorStatusTranslationTable}

Awk Script Reference

Format

${awk::<script>}

Example

    monitors:
      battery:
        discovery:
          mapping:
            source: ${source::monitors.battery.discovery.sources.source(1)}
            attributes:
              name: ${awk::sprintf("%s (%s)", "Cisco", $1)}
No results.