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.max_disk_errors
84 proxy.config.cache.max_doc_size
85 proxy.config.cache.min_average_object_size
86 proxy.config.cache.volume_filename
87 proxy.config.cache.permit.pinning
88 proxy.config.cache.ram_cache_cutoff
89 proxy.config.cache.ram_cache.size
90 proxy.config.cache.select_alternate
91 proxy.config.cache.threads_per_disk
92 proxy.config.cache.mutex_retry_delay
93 proxy.config.cop.core_signal
94 proxy.config.cop.linux_min_memfree_kb
95 proxy.config.cop.linux_min_swapfree_kb
96 proxy.config.core_limit
97 proxy.config.diags.action.enabled
98 proxy.config.diags.action.tags
99 proxy.config.diags.debug.enabled
100 proxy.config.diags.debug.tags
101 proxy.config.diags.output.alert
102 proxy.config.diags.output.debug
103 proxy.config.diags.output.diag
104 proxy.config.diags.output.emergency
105 proxy.config.diags.output.error
106 proxy.config.diags.output.fatal
107 proxy.config.diags.output.note
108 proxy.config.diags.output.status
109 proxy.config.diags.output.warning
110 proxy.config.diags.show_location
111 proxy.config.dns.failover_number
112 proxy.config.dns.failover_period
113 proxy.config.dns.lookup_timeout
114 proxy.config.dns.max_dns_in_flight
115 proxy.config.dns.nameservers
116 proxy.config.dns.resolv_conf
117 proxy.config.dns.retries
118 proxy.config.dns.round_robin_nameservers
119 proxy.config.dns.search_default_domains
120 proxy.config.dns.splitDNS.enabled
121 proxy.config.dns.splitdns.filename
122 proxy.config.dump_mem_info_frequency
123 proxy.config.env_prep
124 proxy.config.exec_thread.autoconfig
125 proxy.config.exec_thread.autoconfig.scale
126 proxy.config.exec_thread.limit
127 proxy.config.header.parse.no_host_url_redirect
128 proxy.config.hostdb
129 proxy.config.hostdb.fail.timeout
130 proxy.config.hostdb.filename
131 proxy.config.hostdb.lookup_timeout
132 proxy.config.hostdb.migrate_on_demand
133 proxy.config.hostdb.re_dns_on_reload
134 proxy.config.hostdb.serve_stale_for
135 proxy.config.hostdb.size
136 proxy.config.hostdb.storage_path
137 proxy.config.hostdb.storage_size
138 proxy.config.hostdb.strict_round_robin
139 proxy.config.hostdb.timeout
140 proxy.config.hostdb.ttl_mode
141 proxy.config.hostdb.verify_after
142 proxy.config.http.accept_encoding_filter.filename
143 proxy.config.http.accept_no_activity_timeout
144 proxy.config.http.insert_client_ip
145 proxy.config.http.anonymize_other_header_list
146 proxy.config.http.anonymize_remove_client_ip
147 proxy.config.http.anonymize_remove_cookie
148 proxy.config.http.anonymize_remove_from
149 proxy.config.http.anonymize_remove_referer
150 proxy.config.http.anonymize_remove_user_agent
151 proxy.config.http.background_fill_active_timeout
152 proxy.config.http.background_fill_completed_threshold
153 proxy.config.http.cache.cache_responses_to_cookies
154 proxy.config.http.cache.cache_urls_that_look_dynamic
155 proxy.config.http.cache.guaranteed_max_lifetime
156 proxy.config.http.cache.guaranteed_min_lifetime
157 proxy.config.http.cache.heuristic_lm_factor
158 proxy.config.http.cache.heuristic_max_lifetime
159 proxy.config.http.cache.heuristic_min_lifetime
160 proxy.config.http.cache.http
161 proxy.config.http.cache.ignore_accept_charset_mismatch
162 proxy.config.http.cache.ignore_accept_encoding_mismatch
163 proxy.config.http.cache.ignore_accept_language_mismatch
164 proxy.config.http.cache.ignore_accept_mismatch
165 proxy.config.http.cache.ignore_authentication
166 proxy.config.http.cache.ignore_client_cc_max_age
167 proxy.config.http.cache.ignore_client_no_cache
168 proxy.config.http.cache.ignore_server_no_cache
169 proxy.config.http.cache.ims_on_client_no_cache
170 proxy.config.http.cache.max_open_read_retries
171 proxy.config.http.cache.max_open_write_retries
172 proxy.config.http.cache.max_stale_age
173 proxy.config.http.cache.open_read_retry_time
174 proxy.config.http.cache.range.lookup
175 proxy.config.http.cache.range.write
176 proxy.config.http.cache.required_headers
177 proxy.config.http.cache.when_to_revalidate
178 proxy.config.http.chunking_enabled
179 proxy.config.http.connect_attempts_max_retries
180 proxy.config.http.connect_attempts_max_retries_dead_server
181 proxy.config.http.connect_attempts_rr_retries
182 proxy.config.http.connect_attempts_timeout
183 proxy.config.http.connect_ports
184 proxy.config.http.default_buffer_size
185 proxy.config.http.default_buffer_water_mark
186 proxy.config.http.doc_in_cache_skip_dns
187 proxy.config.http.down_server.cache_time
188 proxy.config.http.enabled
189 proxy.config.http.enable_http_info
190 proxy.config.http.enable_http_stats
191 proxy.config.http.errors.log_error_pages
192 proxy.config.http.forward.proxy_auth_to_parent
193 proxy.config.http.global_user_agent_header
194 proxy.config.http.insert_age_in_response
195 proxy.config.http.insert_request_via_str
196 proxy.config.http.insert_response_via_str
197 proxy.config.http.insert_squid_x_forwarded_for
198 proxy.config.http.keep_alive_enabled_in
199 proxy.config.http.keep_alive_enabled_out
200 proxy.config.http.keep_alive_no_activity_timeout_in
201 proxy.config.http.keep_alive_no_activity_timeout_out
202 proxy.config.http.keep_alive_post_out
203 proxy.config.http.negative_caching_enabled
204 proxy.config.http.negative_caching_list
205 proxy.config.http.negative_caching_lifetime
206 proxy.config.http.negative_revalidating_enabled
207 proxy.config.http.negative_revalidating_lifetime
208 proxy.config.http.no_dns_just_forward_to_parent
209 proxy.config.http.no_origin_server_dns
210 proxy.config.http.normalize_ae_gzip
211 proxy.config.http.number_of_redirections
212 proxy.config.http.per_server.connection.max
213 proxy.config.http.origin_min_keep_alive_connections
214 proxy.config.http.parent_proxies
215 proxy.config.http.parent_proxy.connect_attempts_timeout
216 proxy.config.http.parent_proxy.fail_threshold
217 proxy.config.http.parent_proxy.file
218 proxy.config.http.parent_proxy.per_parent_connect_attempts
219 proxy.config.http.parent_proxy.retry_time
220 proxy.config.http.parent_proxy.total_connect_attempts
221 proxy.config.http.post_connect_attempts_timeout
222 proxy.config.http.post_copy_size
223 proxy.config.http.push_method_enabled
224 proxy.config.http.quick_filter.mask
225 proxy.config.http.record_heartbeat
226 proxy.config.http.referer_default_redirect
227 proxy.config.http.referer_filter
228 proxy.config.http.referer_format_redirect
229 proxy.config.http.request_header_max_size
230 proxy.config.http.request_via_str
231 proxy.config.http.response_header_max_size
232 proxy.config.http.response_server_enabled
233 proxy.config.http.response_server_str
234 proxy.config.http.response_via_str
235 proxy.config.http.send_http11_requests
236 proxy.config.http.server_max_connections
237 proxy.config.http.server_port
238 proxy.config.http.slow.log.threshold
239 proxy.config.http.connect_ports
240 proxy.config.http.transaction_active_timeout_in
241 proxy.config.http.transaction_active_timeout_out
242 proxy.config.http.transaction_no_activity_timeout_in
243 proxy.config.http.transaction_no_activity_timeout_out
244 proxy.config.http_ui_enabled
245 proxy.config.http.uncacheable_requests_bypass_parent
246 proxy.config.io.max_buffer_size
247 proxy.config.lm.pserver_timeout_msecs
248 proxy.config.lm.pserver_timeout_secs
249 proxy.config.local_state_dir
250 proxy.config.log.ascii_buffer_size
251 proxy.config.log.auto_delete_rolled_files
252 proxy.config.log.file_stat_frequency
253 proxy.config.log.hostname
254 proxy.config.log.log_buffer_size
255 proxy.config.log.logfile_dir
256 proxy.config.log.logfile_perm
257 proxy.config.log.logging_enabled
258 proxy.config.log.max_line_size
259 proxy.config.log.max_secs_per_buffer
260 proxy.config.log.max_space_mb_for_logs
261 proxy.config.log.max_space_mb_headroom
262 proxy.config.log.overspill_report_count
263 proxy.config.log.rolling_enabled
264 proxy.config.log.rolling_interval_sec
265 proxy.config.log.rolling_offset_hr
266 proxy.config.log.rolling_size_mb
267 proxy.config.log.sampling_frequency
268 proxy.config.log.space_used_frequency
269 proxy.config.log.config.filename
270 proxy.config.manager_binary
271 proxy.config.net.connections_throttle
272 proxy.config.net.listen_backlog
273 proxy.config.net.sock_mss_in
274 proxy.config.net.sock_option_flag_in
275 proxy.config.net.sock_option_flag_out
276 proxy.config.net.sock_recv_buffer_size_in
277 proxy.config.net.sock_recv_buffer_size_out
278 proxy.config.net.sock_send_buffer_size_in
279 proxy.config.net.sock_send_buffer_size_out
280 proxy.config.net.defer_accept
281 proxy.config.output.logfile
282 proxy.config.plugin.plugin_dir
283 proxy.config.process_manager.mgmt_port
284 proxy.config.process_manager.timeout
285 proxy.config.product_company
286 proxy.config.product_name
287 proxy.config.product_vendor
288 proxy.config.proxy.authenticate.basic.realm
289 proxy.config.proxy_binary
290 proxy.config.proxy_binary_opts
291 proxy.config.proxy_name
292 proxy.config.remap.num_remap_threads
293 proxy.config.res_track_memory
294 proxy.config.reverse_proxy.enabled
295 proxy.config.reverse_proxy.oldasxbehavior
296 proxy.config.socks.accept_enabled
297 proxy.config.socks.accept_port
298 proxy.config.socks.connection_attempts
299 proxy.config.socks.default_servers
300 proxy.config.socks.http_port
301 proxy.config.socks.per_server_connection_attempts
302 proxy.config.socks.server_connect_timeout
303 proxy.config.socks.server_fail_threshold
304 proxy.config.socks.server_retry_time
305 proxy.config.socks.server_retry_timeout
306 proxy.config.socks.socks_config_file
307 proxy.config.socks.socks_needed
308 proxy.config.socks.socks_timeout
309 proxy.config.socks.socks_version
310 proxy.config.srv_enabled
311 proxy.config.ssl.CA.cert.filename
312 proxy.config.ssl.CA.cert.path
313 proxy.config.ssl.client.CA.cert.filename
314 proxy.config.ssl.client.CA.cert.path
315 proxy.config.ssl.client.cert.filename
316 proxy.config.ssl.client.certification_level
317 proxy.config.ssl.client.cert.path
318 proxy.config.ssl.client.private_key.filename
319 proxy.config.ssl.client.private_key.path
320 proxy.config.ssl.client.verify.server
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.stat_collector.interval
333 proxy.config.stat_collector.port
334 proxy.config.syslog_facility
335 proxy.config.system.file_max_pct
336 proxy.config.thread.default.stacksize
337 proxy.config.udp.free_cancelled_pkts_sec
338 proxy.config.udp.periodic_cleanup
339 proxy.config.udp.send_retries
340 proxy.config.url_remap.filename
341 proxy.config.url_remap.pristine_host_hdr
342 proxy.config.url_remap.remap_required
343
345 Simple Apache Traffic Server client object, to communicate with the local manager.
346
347 Licensed to the Apache Software Foundation (ASF) under one or more
348 contributor license agreements. See the NOTICE file distributed with
349 this work for additional information regarding copyright ownership.
350 The ASF licenses this file to You under the Apache License, Version 2.0
351 (the "License"); you may not use this file except in compliance with
352 the License. You may obtain a copy of the License at
353
354 http://www.apache.org/licenses/LICENSE-2.0
355
356 Unless required by applicable law or agreed to in writing, software
357 distributed under the License is distributed on an "AS IS" BASIS,
358 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
359 See the License for the specific language governing permissions and
360 limitations under the License.
361
362
363
364perl v5.34.1 2022-06-13 Apache::TS::AdminClient(3)