Skip to content

http: add debug level request logging for failed requests#928

Merged
bazsi merged 4 commits intoaxoflow:mainfrom
OverOrion:feat/http-request-in-internal-error-log
Feb 14, 2026
Merged

http: add debug level request logging for failed requests#928
bazsi merged 4 commits intoaxoflow:mainfrom
OverOrion:feat/http-request-in-internal-error-log

Conversation

@OverOrion
Copy link
Contributor

@OverOrion OverOrion commented Jan 26, 2026

Sample configuration:

@version: 4.19

log {
 source{ example-msg-generator(num(1) template("abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc"));}; # 50 * abc
  destination { http(url("http://localhost:8080")); };
  destination{stdout();};
};

Simple dead destination:

while :; do echo -e "HTTP/1.1 429 Too Many Requests\r\nContent-Type: text/plain\r\nContent-Length: 18\r\nRetry-After: 30\r\nConnection: close\r\n\r\nSlow down, partner." | nc -lp 8080; done

Sample output - using Fedvt:

[2026-01-26T16:45:33.832864] Incoming generated message; msg='abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc'
[2026-01-26T16:45:33.832864] >>>>>> Source side message processing begin; location='http-internal-log.conf:4:11', msg='0x5f0cb6618730', rcptid='4'
[2026-01-26T16:45:33.832864] Setting value; name='HOST_FROM', value='orion-T14G3', type='string', msg='0x5f0cb6618730', rcptid='4'
[2026-01-26T16:45:33.832864] Setting value; name='HOST', value='orion-T14G3', type='string', msg='0x5f0cb6618730', rcptid='4'
[2026-01-26T16:45:33.832864] Setting tag; name='.source.#anon-source0', value='1', msg='0x5f0cb6618730'
[2026-01-26T16:45:33.832864] Setting value; name='SOURCE', value='#anon-source0', type='string', msg='0x5f0cb6618730', rcptid='4'
[2026-01-26T16:45:33.867944] Message(s) available in queue, starting inserts; driver='#anon-destination0#0', worker_index='0'
[2026-01-26T16:45:33.832864] Initializing destination file writer; template='/dev/stdout', filename='/dev/stdout', symlink_as='(null)'
[2026-01-26T16:45:33.867944] Ignoring inter-plugin communication signal, no handlers registered; signal='http::signal_header_request(HttpHeaderRequestSignalData *)', connector='0x5f0cb6668920'
[2026-01-26T16:45:33.867944] http: Sending HTTP request; url='http://localhost:8080'
[2026-01-26T16:45:33.832864] affile_open_file; path='/dev/stdout', fd='14'
[2026-01-26T16:45:33.832864] Window size adjustment; old_window_size='99', window_size_increment='1', suspended_before_increment='FALSE', last_ack_type_is_suspended='FALSE'
[2026-01-26T16:45:33.832864] <<<<<< Source side message processing finish; location='http-internal-log.conf:4:11', msg='0x5f0cb6618730', rcptid='4'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='text', data='Host localhost:8080 was resolved..'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='text', data='IPv6: ::1.'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='text', data='IPv4: 127.0.0.1.'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='text', data='  Trying [::1]:8080....'
[2026-01-26T16:45:33.868257] Outgoing message; message='Jan 26 16:45:33 orion-T14G3 abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\x0a'
Jan 26 16:45:33 orion-T14G3 abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='text', data='connect to ::1 port 8080 from ::1 port 57720 failed: Connection refused.'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='text', data='  Trying 127.0.0.1:8080....'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='text', data='Connected to localhost (127.0.0.1) port 8080.'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='header_out', data='POST / HTTP/1.1..Host: localhost:8080..User-Agent: syslog-ng 4.22.0.24.ge400703/libcurl 8.5.0..Accept: */*..Accept-Encoding: deflate, gzip, br, zstd..X-Syslog-Host: orion-T14G3..X-Syslog-Facility: user..X-Syslog-Level: notice..Content-Length: 150..Content-Type: application/x-www-form-urlencoded....'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='data_out', data='abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='header_in', data='HTTP/1.1 429 Too Many Requests..'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='header_in', data='Content-Type: text/plain..'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='header_in', data='Content-Length: 18..'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='header_in', data='Retry-After: 30..'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='header_in', data='Connection: close..'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='header_in', data='..'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='data_in', data='Slow down, partner..'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='text', data='Excess found writing body: excess = 2, size = 18, maxdownload = 18, bytecount = 18.'
[2026-01-26T16:45:33.867944] cURL debug; worker='0', type='text', data='Closing connection.'
[2026-01-26T16:45:33.867944] http: HTTP response received; url='http://localhost:8080', status_code='429', request='abcabcabcabcabcabcabcabcabcabcab...', response='Slow down, partner', body_size='150', batch_size='1', redirected='0', total_time='0.001', worker_index='0', driver='#anon-destination0#0', location='http-internal-log.conf:5:17'
[2026-01-26T16:45:33.867944] Ignoring inter-plugin communication signal, no handlers registered; signal='http::signal_response_received(HttpResponseReceivedSignalData *)', connector='0x5f0cb6668920'
[2026-01-26T16:45:33.867944] http: Server returned with a 4XX (client errors) status code, which means we are not authorized or the URL is not found; url='http://localhost:8080', status_code='429', response='Slow down, partner', driver='#anon-destination0#0', location='http-internal-log.conf:5:17'
[2026-01-26T16:45:33.867944] Load balancer target failed, removing from rotation; url='http://localhost:8080'
[2026-01-26T16:45:33.867944] http: Target server down, but no alternative server available. Falling back to retrying after time-reopen(); url='http://localhost:8080', worker_index='0', driver='#anon-destination0#0', location='http-internal-log.conf:5:17'
[2026-01-26T16:45:33.867944] Server disconnected while preparing messages for sending, trying again; driver='#anon-destination0#0', location='http-internal-log.conf:5:17', worker_index='0', time_reopen='60', batch_size='1'
^C[2026-01-26T16:45:36.752741] Running application hooks; hook='3'
[2026-01-26T16:45:36.752741] syslog-ng shutting down; version='4.22.0.24.ge400703'

@OverOrion OverOrion self-assigned this Jan 26, 2026
OverOrion added a commit that referenced this pull request Jan 26, 2026
Signed-off-by: Szilard Parrag <[email protected]>
@OverOrion OverOrion marked this pull request as ready for review January 26, 2026 10:08
OverOrion added a commit to OverOrion/axosyslog that referenced this pull request Jan 26, 2026
Signed-off-by: Szilard Parrag <[email protected]>
@OverOrion OverOrion force-pushed the feat/http-request-in-internal-error-log branch from d0f6f20 to 1bb67fc Compare January 26, 2026 15:46
OverOrion added a commit to OverOrion/axosyslog that referenced this pull request Feb 3, 2026
Signed-off-by: Szilard Parrag <[email protected]>
@OverOrion OverOrion force-pushed the feat/http-request-in-internal-error-log branch from 1bb67fc to da9266f Compare February 3, 2026 08:00
sodomelle
sodomelle previously approved these changes Feb 9, 2026
alltilla
alltilla previously approved these changes Feb 10, 2026
@alltilla alltilla added this to the axosyslog-4.23.0 milestone Feb 13, 2026
Added a hard limit for 512 characters,
longer request will use '...' to indiciate cutoff.

Signed-off-by: Szilard Parrag <[email protected]>
Signed-off-by: Szilard Parrag <[email protected]>
@OverOrion OverOrion dismissed stale reviews from alltilla and sodomelle via 0883113 February 13, 2026 15:49
@OverOrion OverOrion force-pushed the feat/http-request-in-internal-error-log branch from da9266f to 0883113 Compare February 13, 2026 15:49
@OverOrion OverOrion requested a review from alltilla February 13, 2026 15:49
@bazsi bazsi merged commit d1b7b93 into axoflow:main Feb 14, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants