Skip to content

Commit

Permalink
Merge pull request #32 from sentrysoftware/feature/issue-31-update-co…
Browse files Browse the repository at this point in the history
…nstant-references

Issue #31: Update constant references
  • Loading branch information
NassimBtk authored Feb 9, 2024
2 parents b705709 + 178b4ee commit a1b191b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ connector:
keep:
- Linux
- type: osCommand
commandLine: GLOBAL_COMMAND_LINE
commandLine: ${constant::GLOBAL_COMMAND_LINE}
expectedResult: LOOPBACK
monitors:
network:
Expand All @@ -19,7 +19,7 @@ monitors:
# Discovery
# Source(1) = output of the command ipconfig or ip
type: osCommand
commandLine: GLOBAL_COMMAND_LINE
commandLine: ${constant::GLOBAL_COMMAND_LINE}
computes:
# Process the output of one of the two commands (ifconfig or ip) through an AWK script
# DeviceID;MacAddress;IPAddress;
Expand Down Expand Up @@ -47,7 +47,7 @@ monitors:
source(1):
# Source(1) = output of the ipconfig or ip command for this interface
type: osCommand
commandLine: COLLECT_COMMAND_LINE
commandLine: ${constant::COLLECT_COMMAND_LINE}
computes:
# Process the output of one of the two commands (ifconfig or ip) to retrieve statistics about the network interface
# DeviceID;ReceivedPackets;TransmittedPackets;Errors;ReceivedBytes;TransmittedBytes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ monitors:
# Instance Table
source: ${source::monitors.enclosure.discovery.sources.source(4)}
attributes:
id: _DEVICE_ID
id: ${constant::_DEVICE_ID}
__display_id: $2
vendor: $8
model: $9
serial_number: $7
bios_version: $5
type: _ENCLOSURE_TYPE
type: ${constant::_ENCLOSURE_TYPE}
name: "${awk::sprintf(\"Enclosure: %s (%s %s)\", $2, $8, $9)}"
collect:
sources:
Expand Down Expand Up @@ -86,7 +86,7 @@ monitors:
# ValueTable = Source(2)
source: ${source::monitors.enclosure.collect.sources.source(2)}
attributes:
id: _DEVICE_ID
id: ${constant::_DEVICE_ID}
temperature:
discovery:
sources:
Expand All @@ -107,7 +107,7 @@ monitors:
id: $11
__display_id: $2
hw.parent.type: enclosure
hw.parent.id: _DEVICE_ID
hw.parent.id: ${constant::_DEVICE_ID}
name: $2
collect:
# Collect type = multi-instance
Expand Down Expand Up @@ -143,7 +143,7 @@ monitors:
__display_id: $2
sensor_location: $2
hw.parent.type: enclosure
hw.parent.id: _DEVICE_ID
hw.parent.id: ${constant::_DEVICE_ID}
name: ${awk::sprintf("%s (%s)", $2, $2)}
collect:
# Collect type = multi-instance
Expand Down Expand Up @@ -213,7 +213,7 @@ monitors:
__display_id: $2
info: ${awk::join(" ", $7, $8, $9)}
hw.parent.type: enclosure
hw.parent.id: _DEVICE_ID
hw.parent.id: ${constant::_DEVICE_ID}
name: $2
collect:
# Collect type = multi-instance
Expand Down
2 changes: 1 addition & 1 deletion src/main/connector/hardware/MIB2Switch/MIB2Switch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ monitors:
physical_address_type: MAC
device_type: $5
hw.parent.type: enclosure
hw.parent.id: _DEVICE_ID
hw.parent.id: ${constant::_DEVICE_ID}
name: ${awk::sprintf("%s (%s)", $9, $5)}
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ connector:
detection:
criteria:
- type: osCommand
commandLine: _EsxcliConstant system version get
commandLine: ${constant::_EsxcliConstant} system version get
expectedResult: "Version: [567]"
executeLocally: _ExecuteLocally
executeLocally: ${constant::_ExecuteLocally}
# Check that there are FC LUNs
- type: osCommand
commandLine: _EsxcliConstant storage core path list
commandLine: ${constant::_EsxcliConstant} storage core path list
expectedResult: "Transport: fc"
executeLocally: _ExecuteLocally
executeLocally: ${constant::_ExecuteLocally}
monitors:
lun:
discovery:
sources:
source(1):
# Get the list of LUNs from esxcli storage core path list
type: osCommand
commandLine: _EsxcliConstant storage core path list
executeLocally: _ExecuteLocally
commandLine: ${constant::_EsxcliConstant} storage core path list
executeLocally: ${constant::_ExecuteLocally}
computes:
# AWK it
# MSHW;LunName;LunInfo;NumberPaths;LunStatusInfo;
Expand Down Expand Up @@ -48,8 +48,8 @@ monitors:
source(1):
# Get the list of LUNs from esxcli storage core path list
type: osCommand
commandLine: _EsxcliConstant storage core path list
executeLocally: _ExecuteLocally
commandLine: ${constant::_EsxcliConstant} storage core path list
executeLocally: ${constant::_ExecuteLocally}
computes:
# AWK it
# MSHW;LunName;LunInfo;NumberPaths;LunStatusInfo;
Expand All @@ -75,8 +75,8 @@ monitors:
source(1):
# Get the list of SD Cards from esxcli storage core device list
type: osCommand
commandLine: _EsxcliConstant storage core device list
executeLocally: _ExecuteLocally
commandLine: ${constant::_EsxcliConstant} storage core device list
executeLocally: ${constant::_ExecuteLocally}
computes:
# AWK it
# Type;USBID;Vendor;Model;
Expand Down Expand Up @@ -105,8 +105,8 @@ monitors:
source(1):
# Get the list of SD Cards from esxcli storage core device list
type: osCommand
commandLine: _EsxcliConstant storage core device list
executeLocally: _ExecuteLocally
commandLine: ${constant::_EsxcliConstant} storage core device list
executeLocally: ${constant::_ExecuteLocally}
computes:
# AWK it
# USBID;Status;StatusInformation;
Expand Down

0 comments on commit a1b191b

Please sign in to comment.