Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CliCommand = cli.Command{ Name: "snmp", Usage: "Manage SNMP configuration", Subcommands: []cli.Command{ { Name: "get", Usage: "Gets the SNMP configuration for a given IP address", ArgsUsage: "<ipAddress|fqdn>", Action: showSnmpConfig, Flags: []cli.Flag{ cli.StringFlag{ Name: "location, l", Usage: "Minion Location", }, }, }, { Name: "set", Usage: "Sets the SNMP Configuration for a given IP address", ArgsUsage: "<ipAddress|fqdn>", Action: setSnmpConfig, Flags: []cli.Flag{ cli.GenericFlag{ Name: "version, v", Value: model.SNMPVersions, Usage: "SNMP Version: " + model.SNMPVersions.EnumAsString(), }, cli.StringFlag{ Name: "location, l", Usage: "Minion Location", }, cli.IntFlag{ Name: "port, p", Value: 161, Usage: "The UDP Port of the SNMP agent", }, cli.IntFlag{ Name: "retry, r", Value: 2, Usage: "The number of retries before giving up", }, cli.IntFlag{ Name: "timeout, t", Value: 1800, Usage: "Timeout in milliseconds", }, cli.IntFlag{ Name: "maxRepetitions, mr", Value: 2, Usage: "Maximum repetitions", }, cli.IntFlag{ Name: "maxVarsPerPdu, mvpp", Value: 10, Usage: "Maximum variables per PDU", }, cli.StringFlag{ Name: "community, c", Usage: "Community String for SNMPv1 or SNMPv2c", }, cli.StringFlag{ Name: "securityName, sn", Usage: "SNMPv3 Security Name", }, cli.IntFlag{ Name: "securityLevel, sl", Value: 1, Usage: "SNMPv3 Security Level: 1 noAuthNoPriv, 2: authNoPriv, 3: authPriv", }, cli.GenericFlag{ Name: "privProtocol, pp", Value: model.SNMPPrivProtocols, Usage: "SNMPv3 Privacy Protocol: " + model.SNMPPrivProtocols.EnumAsString(), }, cli.StringFlag{ Name: "privPassPhrase, ppp", Usage: "SNMPv3 Password Phrase for Privacy Protocol", }, cli.GenericFlag{ Name: "authProtocol, ap", Value: model.SNMPAuthProtocols, Usage: "SNMPv3 Authentication Protocol: " + model.SNMPAuthProtocols.EnumAsString(), }, cli.StringFlag{ Name: "authPassPhrase, app", Usage: "SNMPv3 Password Phrase for Authentication Protocol", }, cli.StringFlag{ Name: "engineID, eid", Usage: "SNMPv3 Unique Engine ID of the SNMP agent", }, cli.StringFlag{ Name: "contextEngineID, ceid", Usage: "SNMPv3 Context Engine ID", }, cli.StringFlag{ Name: "enterpriseID, entid", Usage: "SNMPv3 Enterprise ID", }, cli.StringFlag{ Name: "contextName, ctx", Usage: "SNMPv3 Context Name", }, cli.IntFlag{ Name: "ttl", Usage: "Time To Live", }, }, }, { Name: "apply", Usage: "Creates or updates the SNMP configuration for a given IP address", Action: applySnmpConfig, ArgsUsage: "<ipAddress|fqdn> <yaml>", Flags: []cli.Flag{ cli.StringFlag{ Name: "file, f", Usage: "External YAML file (use '-' for STDIN Pipe)", }, }, }, }, }
CliCommand the CLI command to manage SNMP configuration
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.