...
Code Block |
---|
#! META
name: ssh-show-version-for-humidifier
description: run "show version" over SSH hoping to find the ACME Humidifier
type: interrogation
requires:
#! REMOTE::SSH
show version
#! PARSER::AWK
BEGIN {
}
# Sample line from the output of "show version" on the ACME Humidifier:
# This ACME Humidifier is running AOS 9.14.11
/ACME Humidifier/ {
writeTag("vendor", "acme")
writeTag("product", "humidifier")
writeTag("os.name", "AOS")
writeTag("os.version", $NF) # We get the last element in the line for the os version info
}
END {
}
|
...