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

  • 相关阅读:
    UVa 11538 Chess Queen (排列组合计数)
    CodeForces 730H Delete Them (暴力)
    CodeForces 730G Car Repair Shop (暴力)
    汇编(assembling)简介(源:阮一峰)
    CSS骚操作
    Jquery复习总结
    CGI与ISAPI的区别(转)
    SQL中Group By的使用(转)
    05 ADO.net
    04 SqlServer
  • 原文地址:https://www.cnblogs.com/qlight/p/1726928.html
Copyright © 2011-2022 走看看