📄 extending
字号:
title Extending the Agentdescription You can extend the snmp agent to have it return informationdescription that you yourself define.token execinfo run a simple command using exec()info arguments: [oid] name /path/to/executable argumentsquestion 1 The OID where the results table should be display [default=extTable]question 2 The "name" to associate with this command when displaying the results.question 3 The path to the program to be run.question 4 The arguments to pass to $3token passinfo Run a command that intepretes the request for an entire tree.info The pass program defined here will get called for allinfo requests below a certain point in the mib tree. It is theninfo responsible for returning the right data beyond that point.info #info arguments: miboid programinfo #info example: pass .1.3.6.1.4.1.2021.255 /path/to/local/passtestinfo #info See the snmpd.conf manual page for further information.info #info Consider using "pass_persist" for a performance increase.question 1 The OID where the script should take control ofquestion 2 The path to the program that should be called token pass_persistinfo Run a persistant process that intepretes the request for an entire tree.info The pass program defined here will get called for allinfo requests below a certain point in the mib tree. It is theninfo responsible for returning the right data beyond that point.info The pass_persist scripts must be able to stay running and accept inputinfo from stdin.info #info arguments: miboid programinfo #info example: pass_persist .1.3.6.1.4.1.2021.255 /path/to/local/pass_persisttestinfo #info See the snmpd.conf manual page for further information.steal passtoken proxyinfo Proxy requests to an external agent running somewhere elseinfo This passes all requests for a certain point of the mib tree toinfo an external agent using snmp requests and then returning theinfo results to the caller that spoke to our agent.info arguments: [snmpcmd args] host oid [remoteoid]question 1 Enter the "snmpcmd" arguments that specify how to talk to the remote hostquestion 2 The host you want to pass the requests toqusetion 3 The oid that we should pass beyondquestion 4 The oid of the remote site that we should talk to if different from $3 token shinfo run a simple command using system()info arguments: [oid] name command argumentsinfo similar to exec, but implemented using system() instead of exec()info #info For security reasons, exec should be preferred.steal exectoken dlmodinfo dynamically extend the agent using a shared-objectinfo arguments: module-name module-pathquestion 1 Enter the name of the modulequestion 2 Enter the path to the $1 module
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -