1Apache::TS::AdminClientU(s3e)r Contributed Perl DocumentaAtpiaocnhe::TS::AdminClient(3)
2
3
4
6 Apache::TS::AdminClient - a perl interface to the statistics and
7 configuration settings stored within Apache Traffic Server.
8
10 #!/usr/bin/perl
11 use Apache::TS::AdminClient;
12
13 my $cli = Apache::TS::AdminClient->new(%input);
14 my $string = $cli->get_stat("proxy.config.product_company");
15 print "$string\n";
16
18 AdminClient opens a TCP connection to a unix domain socket on local
19 disk. When the connection is established, AdminClient will write
20 requests to the socket and wait for Apache Traffic Server to return a
21 response. Valid request strings can be found in RecordsConfig.cc which
22 is included with Apache Traffic Server source. A list of valid request
23 strings are included with this documentation, but this included list
24 may not be complete as future releases of Apache Traffic Server may
25 include new request strings or remove existing ones.
26
28 When the object is created for this module, it assumes the 'Unix Domain
29 Socket' is at the default location from the Apache Traffic Server
30 installation. This can be changed when creating the object by setting
31 'socket_path'. For example:
32
33 my $cli = AdminClient->new(socket_path=> "/var/trafficserver");
34 This would make the module look for the 'Unix Domain Socket' in the
35 directory '/var/trafficserver'. The path can optionally include the
36 name of the Socket file, without it the constructor defaults to
37 'mgmtapi.sock'.
38
40 To read a single metric (or configuration), two APIs are available:
41
42 $cli->get_stat($stats_name);
43 $cli->get_config($config_name);
44 This will return a (scalar) value for this metric or configuration.
45
47 There is a command line tool included with Apache Traffic Server called
48 traffic_ctl which overlaps with this module. traffic_ctl can be used
49 to read and write statistics or config settings that this module can.
50 Hence if you don't want to write a perl one-liner to get to this
51 information, traffic_ctl is your tool.
52
54 The Apache Traffic Server Administration Manual will explain what these
55 strings represent. (https://docs.trafficserver.apache.org/en/latest/)
56
57 proxy.config.accept_threads
58 proxy.config.task_threads
59 proxy.config.admin.synthetic_port
60 proxy.config.admin.cli_path
61 proxy.config.admin.user_id
62 proxy.config.alarm.abs_path
63 proxy.config.alarm.bin
64 proxy.config.alarm.script_runtime
65 proxy.config.bandwidth_mgmt.filename
66 proxy.config.bin_path
67 proxy.config.body_factory.enable_customizations
68 proxy.config.body_factory.enable_logging
69 proxy.config.body_factory.response_max_size
70 proxy.config.body_factory.response_suppression_mode
71 proxy.config.body_factory.template_sets_dir
72 proxy.config.cache.agg_write_backlog
73 proxy.config.cache.alt_rewrite_max_size
74 proxy.config.cache.control.filename
75 proxy.config.cache.dir.sync_frequency
76 proxy.config.cache.enable_checksum
77 proxy.config.cache.enable_read_while_writer
78 proxy.config.cache.hostdb.disable_reverse_lookup
79 proxy.config.cache.hostdb.sync_frequency
80 proxy.config.cache.hosting_filename
81 proxy.config.cache.ip_allow.filename
82 proxy.config.cache.limits.http.max_alts
83 proxy.config.cache.log.alternate.eviction
84 proxy.config.cache.max_disk_errors
85 proxy.config.cache.max_doc_size
86 proxy.config.cache.min_average_object_size
87 proxy.config.cache.volume_filename
88 proxy.config.cache.permit.pinning
89 proxy.config.cache.ram_cache_cutoff
90 proxy.config.cache.ram_cache.size
91 proxy.config.cache.select_alternate
92 proxy.config.cache.threads_per_disk
93 proxy.config.cache.mutex_retry_delay
94 proxy.config.cop.core_signal
95 proxy.config.cop.linux_min_memfree_kb
96 proxy.config.cop.linux_min_swapfree_kb
97 proxy.config.core_limit
98 proxy.config.diags.action.enabled
99 proxy.config.diags.action.tags
100 proxy.config.diags.debug.enabled
101 proxy.config.diags.debug.tags
102 proxy.config.diags.output.alert
103 proxy.config.diags.output.debug
104 proxy.config.diags.output.diag
105 proxy.config.diags.output.emergency
106 proxy.config.diags.output.error
107 proxy.config.diags.output.fatal
108 proxy.config.diags.output.note
109 proxy.config.diags.output.status
110 proxy.config.diags.output.warning
111 proxy.config.diags.show_location
112 proxy.config.dns.failover_number
113 proxy.config.dns.failover_period
114 proxy.config.dns.lookup_timeout
115 proxy.config.dns.max_dns_in_flight
116 proxy.config.dns.nameservers
117 proxy.config.dns.resolv_conf
118 proxy.config.dns.retries
119 proxy.config.dns.round_robin_nameservers
120 proxy.config.dns.search_default_domains
121 proxy.config.dns.splitDNS.enabled
122 proxy.config.dns.splitdns.filename
123 proxy.config.dump_mem_info_frequency
124 proxy.config.env_prep
125 proxy.config.exec_thread.autoconfig
126 proxy.config.exec_thread.autoconfig.scale
127 proxy.config.exec_thread.limit
128 proxy.config.header.parse.no_host_url_redirect
129 proxy.config.hostdb
130 proxy.config.hostdb.fail.timeout
131 proxy.config.hostdb.filename
132 proxy.config.hostdb.lookup_timeout
133 proxy.config.hostdb.migrate_on_demand
134 proxy.config.hostdb.re_dns_on_reload
135 proxy.config.hostdb.serve_stale_for
136 proxy.config.hostdb.size
137 proxy.config.hostdb.storage_path
138 proxy.config.hostdb.storage_size
139 proxy.config.hostdb.strict_round_robin
140 proxy.config.hostdb.timeout
141 proxy.config.hostdb.ttl_mode
142 proxy.config.hostdb.verify_after
143 proxy.config.http.accept_encoding_filter.filename
144 proxy.config.http.accept_no_activity_timeout
145 proxy.config.http.insert_client_ip
146 proxy.config.http.anonymize_other_header_list
147 proxy.config.http.anonymize_remove_client_ip
148 proxy.config.http.anonymize_remove_cookie
149 proxy.config.http.anonymize_remove_from
150 proxy.config.http.anonymize_remove_referer
151 proxy.config.http.anonymize_remove_user_agent
152 proxy.config.http.background_fill_active_timeout
153 proxy.config.http.background_fill_completed_threshold
154 proxy.config.http.cache.cache_responses_to_cookies
155 proxy.config.http.cache.cache_urls_that_look_dynamic
156 proxy.config.http.cache.guaranteed_max_lifetime
157 proxy.config.http.cache.guaranteed_min_lifetime
158 proxy.config.http.cache.heuristic_lm_factor
159 proxy.config.http.cache.heuristic_max_lifetime
160 proxy.config.http.cache.heuristic_min_lifetime
161 proxy.config.http.cache.http
162 proxy.config.http.cache.ignore_accept_charset_mismatch
163 proxy.config.http.cache.ignore_accept_encoding_mismatch
164 proxy.config.http.cache.ignore_accept_language_mismatch
165 proxy.config.http.cache.ignore_accept_mismatch
166 proxy.config.http.cache.ignore_authentication
167 proxy.config.http.cache.ignore_client_cc_max_age
168 proxy.config.http.cache.ignore_client_no_cache
169 proxy.config.http.cache.ignore_server_no_cache
170 proxy.config.http.cache.ims_on_client_no_cache
171 proxy.config.http.cache.max_open_read_retries
172 proxy.config.http.cache.max_open_write_retries
173 proxy.config.http.cache.max_stale_age
174 proxy.config.http.cache.open_read_retry_time
175 proxy.config.http.cache.range.lookup
176 proxy.config.http.cache.range.write
177 proxy.config.http.cache.required_headers
178 proxy.config.http.cache.when_to_revalidate
179 proxy.config.http.chunking_enabled
180 proxy.config.http.connect_attempts_max_retries
181 proxy.config.http.connect_attempts_max_retries_dead_server
182 proxy.config.http.connect_attempts_rr_retries
183 proxy.config.http.connect_attempts_timeout
184 proxy.config.http.connect_ports
185 proxy.config.http.default_buffer_size
186 proxy.config.http.default_buffer_water_mark
187 proxy.config.http.doc_in_cache_skip_dns
188 proxy.config.http.down_server.cache_time
189 proxy.config.http.enabled
190 proxy.config.http.enable_http_info
191 proxy.config.http.enable_http_stats
192 proxy.config.http.errors.log_error_pages
193 proxy.config.http.forward.proxy_auth_to_parent
194 proxy.config.http.global_user_agent_header
195 proxy.config.http.insert_age_in_response
196 proxy.config.http.insert_request_via_str
197 proxy.config.http.insert_response_via_str
198 proxy.config.http.insert_squid_x_forwarded_for
199 proxy.config.http.keep_alive_enabled_in
200 proxy.config.http.keep_alive_enabled_out
201 proxy.config.http.keep_alive_no_activity_timeout_in
202 proxy.config.http.keep_alive_no_activity_timeout_out
203 proxy.config.http.keep_alive_post_out
204 proxy.config.http.negative_caching_enabled
205 proxy.config.http.negative_caching_list
206 proxy.config.http.negative_caching_lifetime
207 proxy.config.http.negative_revalidating_enabled
208 proxy.config.http.negative_revalidating_lifetime
209 proxy.config.http.no_dns_just_forward_to_parent
210 proxy.config.http.no_origin_server_dns
211 proxy.config.http.normalize_ae_gzip
212 proxy.config.http.number_of_redirections
213 proxy.config.http.per_server.connection.max
214 proxy.config.http.origin_min_keep_alive_connections
215 proxy.config.http.parent_proxies
216 proxy.config.http.parent_proxy.connect_attempts_timeout
217 proxy.config.http.parent_proxy.fail_threshold
218 proxy.config.http.parent_proxy.file
219 proxy.config.http.parent_proxy.per_parent_connect_attempts
220 proxy.config.http.parent_proxy.retry_time
221 proxy.config.http.parent_proxy.total_connect_attempts
222 proxy.config.http.post_connect_attempts_timeout
223 proxy.config.http.post_copy_size
224 proxy.config.http.push_method_enabled
225 proxy.config.http.quick_filter.mask
226 proxy.config.http.record_heartbeat
227 proxy.config.http.referer_default_redirect
228 proxy.config.http.referer_filter
229 proxy.config.http.referer_format_redirect
230 proxy.config.http.request_header_max_size
231 proxy.config.http.request_via_str
232 proxy.config.http.response_header_max_size
233 proxy.config.http.response_server_enabled
234 proxy.config.http.response_server_str
235 proxy.config.http.response_via_str
236 proxy.config.http.send_http11_requests
237 proxy.config.http.server_max_connections
238 proxy.config.http.server_port
239 proxy.config.http.slow.log.threshold
240 proxy.config.http.connect_ports
241 proxy.config.http.transaction_active_timeout_in
242 proxy.config.http.transaction_active_timeout_out
243 proxy.config.http.transaction_no_activity_timeout_in
244 proxy.config.http.transaction_no_activity_timeout_out
245 proxy.config.http_ui_enabled
246 proxy.config.http.uncacheable_requests_bypass_parent
247 proxy.config.io.max_buffer_size
248 proxy.config.lm.pserver_timeout_msecs
249 proxy.config.lm.pserver_timeout_secs
250 proxy.config.local_state_dir
251 proxy.config.log.ascii_buffer_size
252 proxy.config.log.auto_delete_rolled_files
253 proxy.config.log.file_stat_frequency
254 proxy.config.log.hostname
255 proxy.config.log.log_buffer_size
256 proxy.config.log.logfile_dir
257 proxy.config.log.logfile_perm
258 proxy.config.log.logging_enabled
259 proxy.config.log.max_line_size
260 proxy.config.log.max_secs_per_buffer
261 proxy.config.log.max_space_mb_for_logs
262 proxy.config.log.max_space_mb_headroom
263 proxy.config.log.overspill_report_count
264 proxy.config.log.rolling_enabled
265 proxy.config.log.rolling_interval_sec
266 proxy.config.log.rolling_offset_hr
267 proxy.config.log.rolling_size_mb
268 proxy.config.log.sampling_frequency
269 proxy.config.log.space_used_frequency
270 proxy.config.log.config.filename
271 proxy.config.manager_binary
272 proxy.config.net.connections_throttle
273 proxy.config.net.listen_backlog
274 proxy.config.net.sock_mss_in
275 proxy.config.net.sock_option_flag_in
276 proxy.config.net.sock_option_flag_out
277 proxy.config.net.sock_recv_buffer_size_in
278 proxy.config.net.sock_recv_buffer_size_out
279 proxy.config.net.sock_send_buffer_size_in
280 proxy.config.net.sock_send_buffer_size_out
281 proxy.config.net.defer_accept
282 proxy.config.output.logfile
283 proxy.config.plugin.plugin_dir
284 proxy.config.process_manager.mgmt_port
285 proxy.config.process_manager.timeout
286 proxy.config.product_company
287 proxy.config.product_name
288 proxy.config.product_vendor
289 proxy.config.proxy.authenticate.basic.realm
290 proxy.config.proxy_binary
291 proxy.config.proxy_binary_opts
292 proxy.config.proxy_name
293 proxy.config.remap.num_remap_threads
294 proxy.config.res_track_memory
295 proxy.config.reverse_proxy.enabled
296 proxy.config.reverse_proxy.oldasxbehavior
297 proxy.config.socks.accept_enabled
298 proxy.config.socks.accept_port
299 proxy.config.socks.connection_attempts
300 proxy.config.socks.default_servers
301 proxy.config.socks.http_port
302 proxy.config.socks.per_server_connection_attempts
303 proxy.config.socks.server_connect_timeout
304 proxy.config.socks.server_fail_threshold
305 proxy.config.socks.server_retry_time
306 proxy.config.socks.server_retry_timeout
307 proxy.config.socks.socks_config_file
308 proxy.config.socks.socks_needed
309 proxy.config.socks.socks_timeout
310 proxy.config.socks.socks_version
311 proxy.config.srv_enabled
312 proxy.config.ssl.CA.cert.filename
313 proxy.config.ssl.CA.cert.path
314 proxy.config.ssl.client.CA.cert.filename
315 proxy.config.ssl.client.CA.cert.path
316 proxy.config.ssl.client.cert.filename
317 proxy.config.ssl.client.certification_level
318 proxy.config.ssl.client.cert.path
319 proxy.config.ssl.client.private_key.filename
320 proxy.config.ssl.client.private_key.path
321 proxy.config.ssl.server.cert_chain.filename
322 proxy.config.ssl.server.cert.path
323 proxy.config.ssl.server.cipher_suite
324 proxy.config.ssl.server.honor_cipher_order
325 proxy.config.ssl.server.dhparams_file
326 proxy.config.ssl.TLSv1
327 proxy.config.ssl.TLSv1_1
328 proxy.config.ssl.TLSv1_2
329 proxy.config.ssl.TLSv1_3
330 proxy.config.ssl.server.multicert.filename
331 proxy.config.ssl.server.private_key.path
332 proxy.config.ssl.keylog_file
333 proxy.config.stat_collector.interval
334 proxy.config.stat_collector.port
335 proxy.config.syslog_facility
336 proxy.config.system.file_max_pct
337 proxy.config.thread.default.stacksize
338 proxy.config.udp.free_cancelled_pkts_sec
339 proxy.config.udp.periodic_cleanup
340 proxy.config.udp.send_retries
341 proxy.config.url_remap.filename
342 proxy.config.url_remap.pristine_host_hdr
343 proxy.config.url_remap.remap_required
344
346 Simple Apache Traffic Server client object, to communicate with the local manager.
347
348 Licensed to the Apache Software Foundation (ASF) under one or more
349 contributor license agreements. See the NOTICE file distributed with
350 this work for additional information regarding copyright ownership.
351 The ASF licenses this file to You under the Apache License, Version 2.0
352 (the "License"); you may not use this file except in compliance with
353 the License. You may obtain a copy of the License at
354
355 http://www.apache.org/licenses/LICENSE-2.0
356
357 Unless required by applicable law or agreed to in writing, software
358 distributed under the License is distributed on an "AS IS" BASIS,
359 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
360 See the License for the specific language governing permissions and
361 limitations under the License.
362
363
364
365perl v5.36.1 2023-10-11 Apache::TS::AdminClient(3)