Skip to content

Host Interface

create_host_interface

create_host_interface <HOSTNAME> [OPTIONS]

Create a host interface.

Creates an SNMPv2 interface by default. Use --type to specify a different type. One of --dns and --ip is required. If both are specified, --connection is required.

NOTE: Can only create secondary host interfaces for interfaces of types that already have a default interface. (API limitation)

Examples

Create an SNMPv2 interface on host 'foo.example.com' with derived DNS name 'foo.example.com' (default)

create_host_interface foo.example.com

Create an SNMPv2 interface on host 'foo.example.com' with IP connection

create_host_interface foo.example.com --type snmp --ip 127.0.0.1

Create an SNMPv2 interface on host 'foo.example.com' with different DNS name

create_host_interface foo.example.com --type snmp --dns snmp.example.com

Create an SNMPv2 interface on host 'foo' with both IP and DNS, using DNS as enabled address

create_host_interface foo --type snmp --connection dns --dns snmp.example.com --ip 127.0.0.1

Create an SNMPv3 interface on host 'foo.example.com'

create_host_interface foo.example.com --type snmp --snmp-version 3 --snmp-context-name mycontext --snmp-security-name myuser --snmp-security-level authpriv --snmp-auth-protocol MD5 --snmp-auth-passphrase mypass --snmp-priv-protocol DES --snmp-priv-passphrase myprivpass

Create an Agent interface on host 'foo.example.com'

create_host_interface foo.example.com --type agent

Arguments

HOSTNAME
Name of host to create interface on.
Type: text
Required:

Options

--connection <CONNECTION>
Interface connection mode. Required if both --ip and --dns are specified.
Type: choice
Choices: DNS, IP, 0, 1

--type <TYPE_>
Interface type. SNMP enables --snmp- options.
Type: choice
Choices: Agent, SNMP, IPMI, JMX, 1, 2, 3, 4
Default:* SNMP

--port <PORT>
Interface port. Defaults to 10050 for agent, 161 for SNMP, 623 for IPMI, and 12345 for JMX.
Type: text

--ip <IP>
IP address of interface.
Type: text

--dns <DNS>
DNS address of interface.
Type: text

--default/--no-default
Whether this is the default interface.
Type: boolean
Default: True

--snmp-version <SNMP_VERSION>
SNMP version.
Type: integer range
Min: 1
Max: 3
Default: 2

--snmp-bulk/--no-snmp-bulk
Use bulk SNMP requests.
Type: boolean
Default: True

--snmp-community <SNMP_COMMUNITY>
SNMPv{1,2} community.
Type: text
Default: ${SNMP_COMMUNITY}

--snmp-max-repetitions <SNMP_MAX_REPETITIONS>
Max repetitions for SNMPv{2,3} bulk requests.
Type: integer range
Min: 1
Default: 10

--snmp-security-name <SNMP_SECURITY_NAME>
SNMPv3 security name.
Type: text

--snmp-context-name <SNMP_CONTEXT_NAME>
SNMPv3 context name.
Type: text

--snmp-security-level <SNMP_SECURITY_LEVEL>
SNMPv3 security level.
Type: choice
Choices: noAuthNoPriv, authNoPriv, authPriv, 0, 1, 2

--snmp-auth-protocol <SNMP_AUTH_PROTOCOL>
SNMPv3 auth protocol (authNoPriv & authPriv).
Type: choice
Choices: MD5, SHA1, SHA224, SHA256, SHA384, SHA512, 0, 1, 2, 3, 4, 5

--snmp-auth-passphrase <SNMP_AUTH_PASSPHRASE>
SNMPv3 auth passphrase (authNoPriv & authPriv).
Type: text

--snmp-priv-protocol <SNMP_PRIV_PROTOCOL>
SNMPv3 priv protocol (authPriv)
Type: choice
Choices: DES, AES, AES128, AES192, AES256, AES192C, AES256C, 0, 1, 1, 2, 3, 4, 5

--snmp-priv-passphrase <SNMP_PRIV_PASSPHRASE>
SNMPv3 priv passphrase (authPriv).
Type: text


remove_host_interface

remove_host_interface <INTERFACE_ID>

Remove a host interface.

Arguments

INTERFACE_ID
ID of interface to remove.
Type: text
Required:


show_host_interfaces

show_host_interfaces <HOSTNAME_OR_ID>

Show host interfaces.

Arguments

HOSTNAME_OR_ID
Hostname or ID
Type: text
Required:


update_host_interface

update_host_interface <INTERFACE_ID> [OPTIONS]

Update a host interface.

Host interface type cannot be changed.

Examples

Update the IP address of interface 123.

update_host_interface 123 --ip 127.0.0.1

Change connection type of interface 123 to IP.

update_host_interface 123 --connection ip

Change SNMP community of interface 234 to 'public'.

update_host_interface 234 --snmp-community public

Arguments

INTERFACE_ID
ID of interface to update.
Type: text
Required:

Options

--connection <CONNECTION>
Interface connection mode.
Type: choice
Choices: DNS, IP, 0, 1

--port <PORT>
Interface port.
Type: text

--ip <IP>
IP address of interface.
Type: text

--dns <DNS>
DNS address of interface.
Type: text

--default/--no-default
Default interface.
Type: boolean
Default: True

--snmp-version <SNMP_VERSION>
SNMP version.
Type: integer range
Min: 1
Max: 3

--snmp-bulk/--no-snmp-bulk
Use bulk SNMP requests.
Type: boolean

--snmp-community <SNMP_COMMUNITY>
SNMPv{1,2} community.
Type: text

--snmp-max-repetitions <SNMP_MAX_REPETITIONS>
Max repetitions for SNMPv{2,3} bulk requests.
Type: integer range
Min: 1

--snmp-security-name <SNMP_SECURITY_NAME>
SNMPv3 security name.
Type: text

--snmp-context-name <SNMP_CONTEXT_NAME>
SNMPv3 context name.
Type: text

--snmp-security-level <SNMP_SECURITY_LEVEL>
SNMPv3 security level.
Type: choice
Choices: noAuthNoPriv, authNoPriv, authPriv, 0, 1, 2

--snmp-auth-protocol <SNMP_AUTH_PROTOCOL>
SNMPv3 auth protocol (authNoPriv & authPriv).
Type: choice
Choices: MD5, SHA1, SHA224, SHA256, SHA384, SHA512, 0, 1, 2, 3, 4, 5

--snmp-auth-passphrase <SNMP_AUTH_PASSPHRASE>
SNMPv3 auth passphrase (authNoPriv & authPriv).
Type: text

--snmp-priv-protocol <SNMP_PRIV_PROTOCOL>
SNMPv3 priv protocol (authPriv)
Type: choice
Choices: DES, AES, AES128, AES192, AES256, AES192C, AES256C, 0, 1, 1, 2, 3, 4, 5

--snmp-priv-passphrase <SNMP_PRIV_PASSPHRASE>
SNMPv3 priv passphrase (authPriv).
Type: text