Script monitor - Variable

Script monitor - Variable

Hi,

I need use a variable to get information about a specific host monitored in a script template of shell script method. I will go use a single template to monitor several devices.

I'm using the variable ${DeviceName} to inform the device name to command snmpwalk and occur the error below:

Follow part of script with error:

Body script:
Get="$(snmpwalk -v2c -c public ${DeviceName} .1.3.6.1.4.1.)"

Error:
getaddrinfo: .1.3.6.1.4.1. Name or service not known snmpwalk: Unknown host (.1.3.6.1.4.1.)

Is there available a variable to get the IP Address of a monitored device?

Regards.
Brito

                New to ADSelfService Plus?