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.
data-center-local) is a single-object setting record. show and update. Command Map
The DNS publication
| Command | What it manages | Panel screen |
|---|---|---|
gtm service | The DNS service: the listened address, the queries being met, the status and the restart | Service Management |
gtm dns-domain | The domain names in the service and the working mode | Domains |
gtm dns-record | The domain name records and the answers on a data center basis | Records |
Veri merkezleri
| Command | What it manages | Panel screen |
|---|---|---|
gtm data-center-local | The local data center settings; it is a single record, it is not added and not deleted | The Local Data Center Settings |
gtm data-center-remote | The remote data centers and the access information | Remote Devices |
Health and putting into service
| Command | What it manages | Panel screen |
|---|---|---|
gtm hc | The health checks; 15 check types | Health Checks |
gtm scenario | The health scenarios: the rules that turn the check results into a decision | Health Scenarios |
gtm trigger | The triggers that come from an external source | Trigger Actions |
The auxiliary profiles
| Command | What it manages | Panel screen |
|---|---|---|
gtm forwarder-profile | The queries being forwarded to other DNS servers | DNS Forwarder Profiles |
gtm express-profile | The records being taken from an external source | Express Profiles |
The Same Five Commands on Every Resource
| Command | How the identifier is written |
|---|---|
show · delete | Right after the command, without writing the field name: show <id> |
update | With 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:
| Command | Function |
|---|---|
gtm service status list | It lists the status of all the DNS services |
gtm service status id | It shows the status of a single service |
gtm service restart | It restarts the service |
The Field Writing Rules
| Rule | How it is written |
|---|---|
| Required field | It is written without a prefix and is asked for in order: add name kurum-dns v-device <device> |
| Optional field | It takes the -- prefix: --ttl 300 |
| List field | Every item with its own index: --access.0.ip, --access.1.ip |
| Nested field | With a dot: --addr.ip, --addr.port |
| Duration field | The value and the unit are written separately: --field.val 30 --field.unit s |
| Type field | After checkType, type, triggerType is selected, only the fields of that type are asked for |
| Emptying a field | Only 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
gtm service add name kurum-dns v-device <device> namespace <route-table>gtm dns-domain add dnsId <service> name kurum.com.trgtm dns-record add dnsId <service> domainId <domain> type A name wwwgtm hc add name web-check checkType http addr.ip 10.0.0.10 addr.port 80gtm scenario add name primary-centerPermission
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.
