There are nine extended commands for managing topology.
The following parameters can be used by the extended commands for topology. For details about the a and t parameters, refer to Predefined Parameters and Flags.
The value of the agentPort parameter is the agent port number. If agentPort is not specified, the default value of 161 is used. The agentPort parameter is optional. This parameter is only specified if the url parameter is not specified and if you do not want the default port.
The value of the arch parameter is the architecture of the topology object.
The value of the domain parameter is the name of the Sun Management Center domain that you must specify for the setCurrentDomain command.
The value of the domainmode parameter can be follow or ignore. If the value is follow, the import command imports both the group and domain information from the file to the specified target domain. If the value is ignore, the import command ignores the domain information.
The value of the family parameter is the object family of the topology object. If this is not specified, this will be automatically obtained.
The value of the filename parameter is the name of the file. This parameter is used by export and import commands to export and import topology data.
The value of the fullDesc parameter is a text description of the entity or group being created.
The value of the isPolled parameter can be true or false. If the value is true, the entity polls for status information according to the polling type (pollType). The default value is true.
The value of the mode parameter can be append or overwrite. If the value is append, the export command adds the topology data to the end of the file. If the value is overwrite, the export command overwrites the file with the topology data.
The value of the nodemode parameter can be replace or ignore. If there is a mismatch of data in the file and in the domain, the replace value replaces the data in the domain with data in the file. The ignore value ignores any mismatch of data.
The value of the pollType parameter is the type of polling for this entity. The following values are allowed for the pollType parameter:
agroup – Identifies a group on which an active agent is installed and running
ahost – Identifies a host on which an active agent is installed and running
amod – Identifies a module that has an active agent
aprox – Identifies an agent that is running an SNMP proxy module
dummy – Identifies a device that is not monitored
ping – Identifies a host to be monitored using the ICMP ping command
snmp – Identifies a host to be monitored using the SNMP ping command
The value of the readInfo parameter is the name of the SNMPv1 read community for SNMP polled objects.
The value of the targetHost parameter is the name of the target host.
The value of the targetIP parameter is the IP address of the target host.
The value of the topoCfg parameter is configuration information for the topological representation of a managed entity.
The value of the topoType parameter is the topological representation type of a managed entity.
The value of the url parameter is the URL of the entity to be polled. The value of the url parameter can be specified in the following formats:
ping://hostname snmp://hostname:port/oid/#.#.#.# snmp://hostname:port/[mod,sym]/path
The value of the validity parameter is the duration (in days) you want the exported topology data to be valid. The value of the validity parameter can be Unlimited, 7, 15, 30, or 90.
The value of the writeInfo parameter is the name of the SNMPv1 write community for SNMP polled objects.
There are nine extended commands for managing topology.
Description
The createEntity command creates a managed entity.
Syntax
createEntity t=topoObject pollType=ahost|amod|aprox|dummy|ping|snmp [fullDesc=text] [targetHost=host] [agentPort=port] [targetIp=ip] [family=family] [isPolled=true|false] [topoType=text] [topoCfg=text] [readInfo=text] [writeInfo=text] [url=url]
Parameters
t, pollType, fullDesc, targetHost, agentPort, targetIp, family, isPolled, topoType, topoCfg, readInfo, writeInfo, and url.
If the url or agentPort parameters are specified, the default port of 161 is not used.
Description
The createGroup command creates a topology domain or group.
Syntax
createGroup t=topoObject [family=base|building-view|campus-view|network-view|subnetwork-view] [fullDesc=desc]
Parameters
t, family, and fullDesc.
If the entity being created is a group, the family parameter is mandatory.
If the entity being created is a domain, the family and fullDesc parameters are ignored.
Description
The delTopoObject command deletes a managed topology object in the managed topology hierarchy. All objects under the specified topology object are deleted as well.
Syntax
delTopoObject t=topoObject
Parameter
t
Description
The export command exports topology data in a domain or domains to a file.
Syntax
export filename=filename domain=domain|"All Domains" mode=append|overwrite validity=Unlimited|7|15|30|90 [comment=text]
Parameters
filename, domain, mode, validity, and comment.
Description
The getAgentPort command returns a port number of the Sun Management Center agent running on the specified host in a topology domain. If there are multiple agents, a list of port numbers is returned.
Syntax
getAgentPort a=host[,host]* [t=topoObject]
Parameters
a and t.
If the t parameter is not specified, the default domain is used.
Description
The getAllTopoObjects command returns a list of all managed objects in the managed topology hierarchy that satisfy conditions specified by the arch, family, or pollType parameters.
Syntax
getAllTopoObjects t=topoObject [arch=os] [family=platform] [pollType=aview|ahost|amod|aprox|dummy|ping|snmp]
Parameters
t, arch, family, and pollType.
Description
The getCurrentDomain command returns the name of the current domain.
Syntax
getCurrentDomain
Parameters
None
Description
The getDomains command returns a list of all managed domains in the current server context.
Syntax
getDomains
Parameters
None
Description
The getTopoObject command returns a list of managed topology objects directly under the topology object specified by parameter t that satisfy conditions specified by the arch, family, or pollType parameters.
Syntax
getTopoObject t=topoObject [arch=os] [family=platform] [pollType=aview|ahost|amod|aprox|dummy|ping|snmp]
Parameters
t, arch, family, and pollType.
Description
The export command imports topology data from a file to a domain.
Syntax
import filename=filename domainmode=follow|ignore nodemode=replace|ignore [domain=domain]
Parameters
filename, domainmode, nodemode, and domain.
Description
The setCurrentDomain command sets the home domain to the value specified in the domain parameter.
Syntax
setCurrentDomain domain=domainName
Parameter
domain
The following command returns a list of all Sun Management Center agent hosts on the sun4u family in group building12 in the menlo_park domain that are running SunOS 5.7 software:
> getTopoObject t=/menlo_park/building12 pollType=ahost \ arch="SunOS 5.7" family=sun4u |
The following command creates a group that is named building19 under an existing domain that is named headquarters_test:
> createGroup t=/headquarters_test/building19 \ fullDesc="test headquarters domain" family=building-location |
The following command creates a managed entity that is named myHost in the group building12 in the domain test_domain. The topology object is a host with the agent running in port 1161.
> createEntity t=/test_domain/building12/myHost \ fullDesc="my test host" family=ultra-2 topoType="" \ topoCfg="" isPolled=false pollType=ahost readInfo="" \ writeInfo="" targetHost=osftserv targetIp="" agentPort=1161 |