创建SNMP对象
<h1>功能</h1>
<p>创建一个SNMP对象,可输出SNMP对象值传递给其它SNMP相关函数使用。</p>
<h1><strong>输入</strong></h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>地址[*]</td>
<td>【字符串】目标机器的IP地址,一般目标机器都需要进行SNMP安装及配置。</td>
<td>'10.10.2.17'</td>
</tr>
<tr>
<td>团体名称[*]</td>
<td>【字符串】配置SNMP时配置的团体名称,具体可以查看“SNMP分组函数使用前配置”章节。</td>
<td>'public'</td>
</tr>
</tbody>
</table>
<h1><strong>选项</strong></h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>端口</td>
<td>【Integer】SNMP协议端口,选填,常用的有snmp get UDP 161 , snmp trap udp 162,获取数据一般不填写或者填写161</td>
</tr>
<tr>
<td>版本</td>
<td>【枚举】SNMP协议版本,可选择SNMP_V1/SNMP_V2C/SNMP_V3,三个协议的区别可以登陆百度网址进行搜索查看。</td>
<td>SNMP_V1</td>
</tr>
</tbody>
</table>
<h1><strong>输出</strong></h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>SNMP</td>
<td>【TSNMP】SNMP对象,一般设置为变量进行传递。</td>
<td>创建SNMP对象变量</td>
</tr>
</tbody>
</table>
<h1><strong>注意/说明</strong></h1>
<p>1.输入表里的“地址”项所填写机器需要进行SNMP的安装与配置,可参考“SNMP分组函数使用前配置”章节。</p>
<h1><strong>相关函数</strong></h1>
<p>无</p>
<h1><strong>示例/演示</strong></h1>
<p><img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/7f951ca02b725ac0a6ae116ac38c2746" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/3fda6f590a4fbaa7b87ff098cbea6a6a" alt="" /></p>
<h1>示例附件</h1>
<p><a href="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/b5bc6775d9cb7e0c047febe343482647" title="[组件[创建SNMP对象函数示例]_20210506.db">组件[创建SNMP对象函数示例]_20210506.db</a></p>