I am trying to use snmp to query a directory listing. I have added the exec line to snmp.conf ("exec list /bin/ls /pathtodirectory") and restarted the service. When I perform an snmp walk for the exec OID I can see the string returned by the exec, but it is only the first line of the ls output. Is it possible to list the entire directory as one string or return multiple strings?
Yes. In fact if you check the man page for snmpd.conf you'll discover the