zoukankan      html  css  js  c++  java
  • ESX4 通过VMware vSphere CLI 开启snmp

    发现VMware vSphere CLI的功能实在强大,学习中。。。

    To configure the communities do the following:

    vicfg-snmp.pl –server <hostname> –username <username> –password <password> -c <com1>.

    Replace <com1> with the community name you wish to set. Each time you specify a community with this

    command, the setings you specify overwrite the previous configuration. To specify multiple communities,

    separate the community names with a comma.

    For example, to set the communities public and internal on the host host.example.com, you might type

    vicfg-snmp.pl –server host.example.com –username user –password password -c public,

    internal.

    vicfg-snmp.pl –server <hostname> –username <username> –password <password> -c <com1>.

    Replace <com1> with the community name you wish to set. Each time you specify a community with this

    command, the setings you specify overwrite the previous configuration. To specify multiple communities,

    separate the community names with a comma.

    For example, to set the communities public and internal on the host host.example.com, you might type

    vicfg-snmp.pl –server host.example.com –username user –password password -c public, internal.

    To configure the SNMP agent traps do:

    vicfg-snmp.pl –server <hostname> –username <username> –password <password> -t <target

    address>@<port>/<community>.

    Replace <target address>, <port>, and <community> with the address of the target system, the port number

    to send the traps to, and the community name, respectively. Each time you specify a target with this

    command, the settings you specify overwrite all previously specified settings. To specify multiple targets,

    separate them with a comma.

    For example, to send SNMP traps from the host host.example.com to port 162 on target.example.com using

    the public community, type

    vicfg-snmp.pl –server host.example.com –username user –password password -t

    target.example.com@162/public.

    Enable the SNMP agent by typing

    vicfg-snmp.pl –server <hostname> –username <username> –password <password> –enable.

    Send a test trap to verify that the agent is configured correctly by typing

    vicfg-snmp.pl –server <hostname> –username <username> –password <password> –test.

    The agent sends a warmStart trap to the configured target.

    To configure the SNMP agent for polling do:

    vicfg-snmp.pl –server <hostname> –username <username> –password <password> -p <port>.

    Replace <port> with the port for the embedded SNMP agent to use for listening for polling requests.

    If the SNMP agent is not enabled, enable it by typing

    vicfg-snmp.pl –server <hostname> –username <username> –password <password> –enable.

    And there you have it SNMP on ESX4i.

    本人执行以上命令后,结果如下:

    Current SNMP agent settings:
    Enabled  : 1
    UDP port : 161

    Communities :
    public

    Notification targets :
    192.168.9.3@162/public
     

    /Files/qlight/Configuring_SNMP_on_ESX4.pdf

  • 相关阅读:
    HDU 1859
    基本排序算法学习
    SQL 从指定表筛选指定行信息 获取表行数
    华为 2015 笔试题练习
    HDU 1003 maxsum
    $.ajax()方法详解
    【jQuery】jQ处理xml文件和xml字符串
    虚方法与抽象方法有什么区别
    System.IO.Path类
    FileAttributes枚举
  • 原文地址:https://www.cnblogs.com/qlight/p/1726928.html
Copyright © 2011-2022 走看看