Skip to content
Smarter by Design.Simpler for Business

gtm ​

The gtm command branch manages the Global Traffic Manager resources of TR7 from the command line: the DNS services, the domain names and the records, the data centers, the health checks, the scenarios, the triggers and the auxiliary profiles. Its panel equivalent is the GTM (Global Traffic Manager) section.

GTM produces the answers of the domain names itself. The answer is not fixed: it is selected according to the current health of the data centers and to the configured mode. The health checks, the scenarios and the triggers feed these decisions.

10 Resources
the commands under gtm
Nine of them are collections, one of them (data-center-local) is a single-object setting record.
5 Commands
list · show · add · update · delete
In the local data center there are only show and update.
Records bound to a service
dnsId · domainId
The domain names and the records live inside a DNS service; the commands ask for the service first.
GTM permission
the permission area of the gtm branch
The view permission is required for reading and the modify permission for writing.

Command Map ​

The DNS publication

CommandWhat it managesPanel screen
gtm serviceThe DNS service: the listened address, the queries being met, the status and the restartService Management
gtm dns-domainThe domain names in the service and the working modeDomains
gtm dns-recordThe domain name records and the answers on a data center basisRecords

Veri merkezleri

CommandWhat it managesPanel screen
gtm data-center-localThe local data center settings; it is a single record, it is not added and not deletedThe Local Data Center Settings
gtm data-center-remoteThe remote data centers and the access informationRemote Devices

Health and putting into service

CommandWhat it managesPanel screen
gtm hcThe health checks; 15 check typesHealth Checks
gtm scenarioThe health scenarios: the rules that turn the check results into a decisionHealth Scenarios
gtm triggerThe triggers that come from an external sourceTrigger Actions

The auxiliary profiles

CommandWhat it managesPanel screen
gtm forwarder-profileThe queries being forwarded to other DNS serversDNS Forwarder Profiles
gtm express-profileThe records being taken from an external sourceExpress Profiles

The Same Five Commands on Every Resource ​

TR7 WEB-CLI · the five command pattern
admin@TR7LBWAF01> gtm hc list # list them all
admin@TR7LBWAF01> gtm hc show <id> # show one
admin@TR7LBWAF01> gtm hc add <fields> # a new record
admin@TR7LBWAF01> gtm hc update id <id> <fields> # change
admin@TR7LBWAF01> gtm hc delete <id> # delete
admin@TR7LBWAF01>  
CommandHow the identifier is written
show · deleteRight after the command, without writing the field name: show <id>
updateWith the id field: update id <id>; without the identifier being given the other fields are not listed

The actions outside CRUD. The own operations of the DNS service are present as commands as well:

CommandFunction
gtm service status listIt lists the status of all the DNS services
gtm service status idIt shows the status of a single service
gtm service restartIt restarts the service

The Field Writing Rules ​

RuleHow it is written
Required fieldIt is written without a prefix and is asked for in order: add name kurum-dns v-device <device>
Optional fieldIt takes the -- prefix: --ttl 300
List fieldEvery item with its own index: --access.0.ip, --access.1.ip
Nested fieldWith a dot: --addr.ip, --addr.port
Duration fieldThe value and the unit are written separately: --field.val 30 --field.unit s
Type fieldAfter checkType, type, triggerType is selected, only the fields of that type are asked for
Emptying a fieldOnly during update: --field.delete

The domain names and the records are bound to the service

The gtm dns-domain and gtm dns-record commands are not independent records. The domain name command first asks in which DNS service it will run (dnsId), and the record command additionally in which domain name it will run (domainId). Both of them are selected from the list with Tab.

Setting Up a DNS Service from Scratch ​

Step 1 Create the DNS service
The service carries the address on which the queries will be met and the context in which it will run.

gtm service add name kurum-dns v-device <device> namespace <route-table>
Step 2 Add the domain name
The domain name is added by stating which service it belongs to.

gtm dns-domain add dnsId <service> name kurum.com.tr
Step 3 Write the records
The record asks for both the service and the domain name; then the type and the name are written.

gtm dns-record add dnsId <service> domainId <domain> type A name www
Step 4 Set up the health check
After the check type is selected, the address and the port to be checked are asked for.

gtm hc add name web-check checkType http addr.ip 10.0.0.10 addr.port 80
Step 5 Bind the decision to a scenario
The scenario turns the check results into a decision; the data centers also come into or go out of service according to this decision.

gtm scenario add name primary-center

Permission ​

The gtm commands are bound to the GTM permission area: the view permission in this area is required to see and read the branch, and the modify permission to add, change or delete a record. The superAdmin role runs all the commands, and the readOnly role uses only the list and show commands. An unauthorized command is not run and the Permission denied. warning is returned (on a user whose interface language is Turkish, Yetkiniz bulunmamaktadır.). For the details, the API Commands page can be looked at.